[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[equinox-dev] Null Pointer Exception in EclipseStarter
|
Hi,
If someone wants to take a deeper look... Stack trace at bottom of this post...
Context is a tomcat web-app a la jsp [hence, not using org.eclipse.equinox.servletbridge];
Snippet of application code (java):
if (!EclipseStarter.isRunning()) { BundleContext ctx = EclipseStarter.startup( args, null ); }
I can run the jsp, which invokes the aforementioned java code, after starting tomcat, and all is well;
However, if I restart the web-app (leaving tomcat up and running), I get an NPE for which the stack trace indicates is deep in the bowels of EclipseStarter.startup() [noting that isRunning() returned false, which I guess is correct...
On an aside, I'm not sure how to trap web-app stop/restart to invoke EclipseStarter.shutdown()... (and other clean up activities) [my ignorance on that one, presume];
Here's the stack trace:
java.lang.NullPointerException
at org.eclipse.osgi.framework.internal.core.FrameworkProperties.getPrope
rty(FrameworkProperties.java:58)
at org.eclipse.osgi.framework.internal.core.FrameworkProperties.getPrope
rty(FrameworkProperties.java:51)
at org.eclipse.osgi.framework.util.SecureAction.getProperty(SecureAction
.java:74)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFactory.cre
ateURLStreamHandler(StreamHandlerFactory.java:91)
at java.net.URL.getURLStreamHandler(URL.java:1106)
at java.net.URL.<init>(URL.java:393)
at java.net.URL.<init>(URL.java:283)
at java.net.URL.<init>(URL.java:306)
at java.io.File.toURL(File.java:623)
at org.apache.catalina.loader.WebappClassLoader.getURL(WebappClassLoader
.java:2302)
at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(Web
appClassLoader.java:1973)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
ClassLoader.java:1759)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
der.java:872)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1327)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1206)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.eclipse.osgi.framework.internal.core.Framework.installContentHand
lerFactory(Framework.java:1678)
at org.eclipse.osgi.framework.internal.core.Framework.initialize(Framewo
rk.java:236)
at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.j
ava:152)
at org.eclipse.osgi.framework.internal.core.OSGi.createFramework(OSGi.ja
va:90)
at org.eclipse.osgi.framework.internal.core.OSGi.<init>(OSGi.java:31)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarte
r.java:282)
at org.craig.cache.entry.PojoEntry.query(Unknown Source)
at org.apache.jsp.sample_jsp._jspService(sample_jsp.java:73)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
37)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:619)