Understand Tomcat output logs to quickly solve code errors
Mar 27,201 2 1:31:52 org. Apache. Catalina. Core. standardwrappervalve invoke
Severe: servlet. Service () for servlet JSP threw exception
Java. Lang. classnotfoundexception: org. Apache. commons. Lang. Exception. nestableruntimeexception
At org. Apache. Catalina. loader. webappclassloader. loadclass (webappclassloader. Java: 1680)
At org. Apache. Catalina. loader. webappclassloader. loadclass (webappclassloader. Java: 1526)
At java. Lang. classloader. defineclass1 (native method)
At java. Lang. classloader. defineclasscond (classloader. Java: 631)
At java. Lang. classloader. defineclass (classloader. Java: 615)
At java. Security. secureclassloader. defineclass (secureclassloader. Java: 141)
At org. Apache. Catalina. loader. webappclassloader. findclassinternal (webappclassloader. Java: 2818)
At org. Apache. Catalina. loader. webappclassloader. findclass (webappclassloader. Java: 1159)
At org. Apache. Catalina. loader. webappclassloader. loadclass (webappclassloader. Java: 1647)
At org. Apache. Catalina. loader. webappclassloader. loadclass (webappclassloader. Java: 1526)
At org. Apache. jsp. _ some. index_jsp. _ jspservice (index_jsp.java: 132)
At org. Apache. Jasper. runtime. httpjspbase. Service (httpjspbase. Java: 70)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 717)
At org. Apache. Jasper. servlet. jspservletwrapper. Service (jspservletwrapper. Java: 388)
At org. Apache. Jasper. servlet. jspservlet. servicejspfile (jspservlet. Java: 313)
At org. Apache. Jasper. servlet. jspservlet. Service (jspservlet. Java: 260)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 717)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 290)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At cn.com. tcxa. iwall. w3firewallfilter. dofilter (w3firewallfilter. Java: 315)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 235)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At cn.com. tcxa. iguard. iguardfilter. dofilter (iguardfilter. Java: 287)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 235)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At cn.com. tcxa. iwall. setcharacterencodingfilter. dofilter (setcharacterencodingfilter. Java: 26)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 235)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 206)
At org. Apache. Catalina. Core. standardwrappervalve. Invoke (standardwrappervalve. Java: 233)
At org. Apache. Catalina. Core. standardcontextvalve. Invoke (standardcontextvalve. Java: 191)
At org. Apache. Catalina. Core. standardhostvalve. Invoke (standardhostvalve. Java: 127)
At org. Apache. Catalina. Valves. errorreportvalve. Invoke (errorreportvalve. Java: 102)
At org. Apache. Catalina. Valves. accesslogvalve. Invoke (accesslogvalve. Java: 615)
At org. Apache. Catalina. Core. standardenginevalve. Invoke (standardenginevalve. Java: 109)
At org. Apache. Catalina. connector. coyoteadapter. Service (coyoteadapter. Java: 293)
At org. Apache. Coyote. http11.http11aprprocessor. Process (http11aprprocessor. Java: 877)
At org. Apache. Coyote. http11.http11aprprotocol $ http11connectionhandler. Process (http11aprprotocol. Java: 594)
At org.apache.tomcat.util.net. aprendpoint $ worker. Run (aprendpoint. Java: 1675)
At java. Lang. thread. Run (thread. Java: 662)
The first line is in red, indicating where the error occurred. here we can see that it is the org. Apache. commons. lang package.
Solution: Check whether the package is in the lib directory and check whether the package version is correct.
The second line of red indicates that the source file causing this error is/Some/index. jsp, and the error occurs in row 132 of the index. Java file.
The index. Java file is in the temporary Tomcat directory. You can search for it to find it.