GlassFish 4 server not starting

5.3k views Asked by At

I am unable to start glassfish server 4 though when I had installed it worked smoothly and in the console following error comes up

Launching GlassFish on Felix platform
ERROR: Error creating bundle cache. (java.lang.Exception: Unable to create bundle cache lock file: java.io.FileNotFoundException: C:\Program Files\Java\glassfish4\glassfish\domains\domain1\osgi-cache\felix\cache.lock (Access is denied))
java.lang.Exception: Unable to create bundle cache lock file: java.io.FileNotFoundException: C:\Program Files\Java\glassfish4\glassfish\domains\domain1\osgi-cache\felix\cache.lock (Access is denied)
    at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:168)
    at org.apache.felix.framework.Felix.init(Felix.java:640)
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Exception in thread "Thread-1" java.lang.RuntimeException: org.osgi.framework.BundleException: Error creating bundle cache.
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:90)
Caused by: org.osgi.framework.BundleException: Error creating bundle cache.
    at org.apache.felix.framework.Felix.init(Felix.java:645)
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Caused by: java.lang.Exception: Unable to create bundle cache lock file: java.io.FileNotFoundException: C:\Program Files\Java\glassfish4\glassfish\domains\domain1\osgi-cache\felix\cache.lock (Access is denied)
    at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:168)
    at org.apache.felix.framework.Felix.init(Felix.java:640)
    ... 1 more

The cache.lock file is of size 0 kbs am unable to understand why its showing me lock problem though I can access it

1

There are 1 answers

0
JarochoEngineer On

Change permissions on the glassfish folder on Windows.

--Go to Properties, then Security --> Change permissions.

Start again the glassfish.

Cheers