开发者

Java application stops working and giving exception

开发者 https://www.devze.com 2023-02-26 09:19 出处:网络
Actually I have made a locally set up of one java application in tomcat and that time its working fine but after one month its again giving below error without changing any code.

Actually I have made a locally set up of one java application in tomcat and that time its working fine but after one month its again giving below error without changing any code.

javax.servlet.ServletException: Servlet.init() for servlet action threw exception
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    org.apache.coyote.http11.Http11Proces开发者_StackOverflowsor.process(Http11Processor.java:870)
    org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    java.lang.Thread.run(Thread.java:595)

root cause

java.lang.NoClassDefFoundError
    com.lexmark.efoundations.lxpd.gui.struts.ActionServlet.init(Unknown Source)
    javax.servlet.GenericServlet.init(GenericServlet.java:212)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    java.lang.Thread.run(Thread.java:595)

I have also check that the mention class "com.lexmark.efoundations.lxpd.gui.struts.ActionServlet" is present in proper place.


Not sure if this is in any way related: but this can also be thrown if a static initializer block in the class fails (thus causing the class loading to fail, thus there's no ClassDef).


Looks like depletion of some resource to me.

Cannot be connections as they do not cause NoClassDefFound. Thus must be the memory. What exactly is the logic causing classloader suddenly to forget the class -- I'm not ready to tell, but the cure is known to any operations guy: recycle the server automatically during weekend.

P.S. What's interesting is that exception is from init() method. That means a new instance of the Servlet class is being created. Only one class instance is created per Servlet, which means that the application was re-initialized. If nobody touched the server, that might be some Tomcat failure (again, could be caused by resource shortage). Need to read logs and brood a lot.

0

精彩评论

暂无评论...
验证码 换一张
取 消