Issue Details (XML | Word | Printable)

Key: GLASSFISH-19624
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Sanjeeb Sahoo
Reporter: Sanjeeb Sahoo
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
glassfish
GLASSFISH-19621

NPE while starting GF on Knopflerfish 3.5.0 with existing cache

Created: 03/Feb/13 06:00 AM   Updated: 03/Feb/13 03:00 PM   Resolved: 03/Feb/13 03:00 PM
Component/s: OSGi
Affects Version/s: 4.0_b70
Fix Version/s: 4.0_b73

Time Tracking:
Not Specified

Status Whiteboard:

This is a bug with Knopflerfish as described in
https://sourceforge.net/p/gatespace/discussion/385235/thread/e5784b91/#f34b

The work around is to start with fresh cache every time which can be done by setting the following property in system or in osgi.properties file:
org.osgi.framework.storage.clean=onFirstInit

Tags:
Participants: Sanjeeb Sahoo


 Description  « Hide

We are running into an issue like this when we start GF on Knopflerfish 3.5.0 with existing cache:

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: org.glassfish.embeddable.GlassFishException: java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:169)
at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime.java:157)
at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:110)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:112)
... 6 more
Caused by: java.lang.NullPointerException
at org.knopflerfish.framework.ServiceURLStreamHandlerFactory.getServiceHandler(ServiceURLStreamHandlerFactory.java:201)
at org.knopflerfish.framework.ServiceURLStreamHandlerFactory.createURLStreamHandler(ServiceURLStreamHandlerFactory.java:129)
at java.net.URL.getURLStreamHandler(URL.java:1150)
at java.net.URL.<init>(URL.java:411)
at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:604)
at sun.misc.URLClassPath$3.run(URLClassPath.java:362)
at sun.misc.URLClassPath$3.run(URLClassPath.java:352)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:351)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:328)
at sun.misc.URLClassPath.getResource(URLClassPath.java:194)
at java.net.URLClassLoader$1.run(URLClassLoader.java:358)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:139)



Sanjeeb Sahoo added a comment - 03/Feb/13 03:00 PM

Applied the work around:
r59062 | ss141213 | 2013-02-03 20:15:06 +0530 (Sun, 03 Feb 2013) | 9 lines