Forums Register Login

java.lang.VerifyError Error for Log4j

+Pie Number of slices to send: Send
I am getting following error on the following statement in my servlet
PropertyConfigurator.configure(log4j_property_file_path)

I have log4j.jar in directory java\classes and WEB-INF\lib. Both are the same files and I have verified this by size of the and number of files in each jar. This error is generated occasionally when window server is rebooted which in turn restart the application server. Servlet which is using above code is set to load on start using load-on-startup tag. Could anyone have any idea why I am getting this error and as I mentioned it does not happen all the time but once a while.


java.lang.VerifyError: (class: org/apache/log4j/Hierarchy, method: updateChildren signature: (Lorg/apache/log4j/ProvisionNode;Lorg/apache/log4j/Logger;)V) Bad type in putfield/putstatic
at org.apache.log4j.LogManager.<clinit>(LogManager.java:69)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:315)
at gov.ca.aoc.vision.struts.base.VisionInitServlet.init(VisionInitServlet.java:40)
at com.sybase.jaguar.servlet.JagServlet.init(JagServlet.java:235)
at com.sybase.jaguar.servlet.ServletPool.createInitializedInstance(ServletPool.java:180)
at com.sybase.jaguar.servlet.ServletPool.getInstance(ServletPool.java:72)
at com.sybase.jaguar.servlet.ServletPool.start(ServletPool.java:292)
at com.sybase.jaguar.servlet.JagServletContext.startServlet(JagServletContext.java:2856)
at com.sybase.jaguar.servlet.JagServletContext.startWebAppServlets(JagServletContext.java:2491)
at com.sybase.jaguar.servlet.ServletEngine.startWebAppServlets(ServletEngine.java:1137)
at com.sybase.jaguar.servlet.ServletServiceImpl.startWebAppServlets(ServletServiceImpl.java:173)
at com.sybase.jaguar.servlet._sk_JaguarServlet_ServletService.remoteInvoke(_sk_JaguarServlet_ServletService.java:547)
at com.sybase.jaguar.servlet._sk_JaguarServlet_ServletService.invoke(_sk_JaguarServlet_ServletService.java:125)
+Pie Number of slices to send: Send
This might be occurring because you have the two copies of log4j.jar, try having only one (the one in the WEB-INF\lib directory)
+Pie Number of slices to send: Send
Thanks Martijn for the response.

Can I keep the log4j.jar in java\classes and delete the one WEB-INF\lib. Does it matter which one I keep.

+Pie Number of slices to send: Send
In a web application, dependent jars are supposed to be put in the WEB-INF/lib folder. But web applications don't have a java/classes folder so it's unclear what that's about.
+Pie Number of slices to send: Send
I am using EA Server as application server and it comes with log4j.jar in EA_Server_Home/java/classes folder. I believe most of J2EE servers have java/classes and java/lib folder which are used to have jar file at server level instead at individual web application level. So my question was Can I keep the log4j.jar file in EA_Server_Home/java/classes and delete from webapplication/WEB-INF/lib.

Thanks
Harman

Your mother was a hamster and your father was a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2826 times.
Similar Threads
java.lang.VerifyError
Jdom Servlet Classloading Error
java.lang.VerifyError
Linkage Error with LOG4j
ANT related problem.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:55:11.