You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Riyaz Shaikh <ri...@gmail.com> on 2007/05/08 01:07:31 UTC

"Error allocating a servlet instance" after editing web.xml.

Problem: If I make any change to my application's web.xml (even as
small as a single space), I can't access any of Tomcat's
pages/servlets.

Info to narrow things down (hopefully):
- I think Tomcat reloads things whenever a change is made to web.xml.
But I haven't been able to find some good information on this yet.

- The application is located under CATALINA_HOME\webapps. I tried
creating a context file under conf/catalina/localhost and set
reloadable="false", but it didn't help.

- Since this problem isn't seen if I edit the web.xml of any of
Tomcat's example applications, it might have something to do with how
my application initializes. But nothing shows up in the logs anywhere,
other than the stack trace I get when I try to access any page. Would
anyone know which tomcat elements I should enable the debugging info
for, to get more info about the re-initialization.

- This is the stack trace I get if I try to access anything, after the
web.xml editing:

exception

javax.servlet.ServletException: Error allocating a servlet instance
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:135)
	org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:706)
	java.lang.Thread.run(Thread.java:595)

root cause

java.lang.NullPointerException
	org.eclipse.osgi.framework.internal.core.FrameworkProperties.getProperty(FrameworkProperties.java:58)
	org.eclipse.osgi.framework.internal.core.FrameworkProperties.getProperty(FrameworkProperties.java:51)
	org.eclipse.osgi.framework.util.SecureAction.getProperty(SecureAction.java:49)
	org.eclipse.osgi.framework.internal.protocol.StreamHandlerFactory.createURLStreamHandler(StreamHandlerFactory.java:85)
	java.net.URL.getURLStreamHandler(URL.java:1104)
	java.net.URL.<init>(URL.java:393)
	java.net.URL.<init>(URL.java:283)
	java.net.URL.<init>(URL.java:306)
	java.io.File.toURL(File.java:594)
	org.apache.catalina.loader.WebappClassLoader.getURL(WebappClassLoader.java:2292)
	org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1966)
	org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1749)
	org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:135)
	org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:706)
	java.lang.Thread.run(Thread.java:595)

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: "Error allocating a servlet instance" after editing web.xml.

Posted by Riyaz Shaikh <ri...@gmail.com>.
Here it is...

It seems like a component of our application uses the eclipse OSGI
framework (org.eclipse.birt.core.framework.osgi.OSGILauncher) during
its startup. I'm looking into how it might result in this issue. But
I'm curious as to how such an error can cause the whole Tomcat to go
down.

Thanks,
Riyaz

On 5/7/07, Martin Gainty <mg...@hotmail.com> wrote:
> Please display the web.xml for the webapp
>
> M--
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
> ----- Original Message -----
> From: "Riyaz Shaikh" <ri...@gmail.com>
> To: <us...@tomcat.apache.org>
> Sent: Monday, May 07, 2007 7:07 PM
> Subject: "Error allocating a servlet instance" after editing web.xml.
>
>
> > Problem: If I make any change to my application's web.xml (even as
> > small as a single space), I can't access any of Tomcat's
> > pages/servlets.
> >
> > Info to narrow things down (hopefully):
> > - I think Tomcat reloads things whenever a change is made to web.xml.
> > But I haven't been able to find some good information on this yet.
> >
> > - The application is located under CATALINA_HOME\webapps. I tried
> > creating a context file under conf/catalina/localhost and set
> > reloadable="false", but it didn't help.
> >
> > - Since this problem isn't seen if I edit the web.xml of any of
> > Tomcat's example applications, it might have something to do with how
> > my application initializes. But nothing shows up in the logs anywhere,
> > other than the stack trace I get when I try to access any page. Would
> > anyone know which tomcat elements I should enable the debugging info
> > for, to get more info about the re-initialization.
> >
> > - This is the stack trace I get if I try to access anything, after the
> > web.xml editing:
> >
> > exception
> >
> > javax.servlet.ServletException: Error allocating a servlet instance
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
> > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:135)
> > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:706)
> > java.lang.Thread.run(Thread.java:595)
> >
> > root cause
> >
> > java.lang.NullPointerException
> > org.eclipse.osgi.framework.internal.core.FrameworkProperties.getProperty(FrameworkProperties.java:58)
> > org.eclipse.osgi.framework.internal.core.FrameworkProperties.getProperty(FrameworkProperties.java:51)
> > org.eclipse.osgi.framework.util.SecureAction.getProperty(SecureAction.java:49)
> > org.eclipse.osgi.framework.internal.protocol.StreamHandlerFactory.createURLStreamHandler(StreamHandlerFactory.java:85)
> > java.net.URL.getURLStreamHandler(URL.java:1104)
> > java.net.URL.<init>(URL.java:393)
> > java.net.URL.<init>(URL.java:283)
> > java.net.URL.<init>(URL.java:306)
> > java.io.File.toURL(File.java:594)
> > org.apache.catalina.loader.WebappClassLoader.getURL(WebappClassLoader.java:2292)
> > org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1966)
> > org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1749)
> > org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
> > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:135)
> > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:706)
> > java.lang.Thread.run(Thread.java:595)
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: "Error allocating a servlet instance" after editing web.xml.

Posted by Martin Gainty <mg...@hotmail.com>.
Please display the web.xml for the webapp

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Riyaz Shaikh" <ri...@gmail.com>
To: <us...@tomcat.apache.org>
Sent: Monday, May 07, 2007 7:07 PM
Subject: "Error allocating a servlet instance" after editing web.xml.


> Problem: If I make any change to my application's web.xml (even as
> small as a single space), I can't access any of Tomcat's
> pages/servlets.
>
> Info to narrow things down (hopefully):
> - I think Tomcat reloads things whenever a change is made to web.xml.
> But I haven't been able to find some good information on this yet.
>
> - The application is located under CATALINA_HOME\webapps. I tried
> creating a context file under conf/catalina/localhost and set
> reloadable="false", but it didn't help.
>
> - Since this problem isn't seen if I edit the web.xml of any of
> Tomcat's example applications, it might have something to do with how
> my application initializes. But nothing shows up in the logs anywhere,
> other than the stack trace I get when I try to access any page. Would
> anyone know which tomcat elements I should enable the debugging info
> for, to get more info about the re-initialization.
>
> - This is the stack trace I get if I try to access anything, after the
> web.xml editing:
>
> exception
>
> javax.servlet.ServletException: Error allocating a servlet instance
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:135)
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:706)
> java.lang.Thread.run(Thread.java:595)
>
> root cause
>
> java.lang.NullPointerException
> org.eclipse.osgi.framework.internal.core.FrameworkProperties.getProperty(FrameworkProperties.java:58)
> org.eclipse.osgi.framework.internal.core.FrameworkProperties.getProperty(FrameworkProperties.java:51)
> org.eclipse.osgi.framework.util.SecureAction.getProperty(SecureAction.java:49)
> org.eclipse.osgi.framework.internal.protocol.StreamHandlerFactory.createURLStreamHandler(StreamHandlerFactory.java:85)
> java.net.URL.getURLStreamHandler(URL.java:1104)
> java.net.URL.<init>(URL.java:393)
> java.net.URL.<init>(URL.java:283)
> java.net.URL.<init>(URL.java:306)
> java.io.File.toURL(File.java:594)
> org.apache.catalina.loader.WebappClassLoader.getURL(WebappClassLoader.java:2292)
> org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1966)
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1749)
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:135)
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:706)
> java.lang.Thread.run(Thread.java:595)
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org