Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

java.lang.VerifyError Error for Log4j

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Rahul Kappor
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Marshal
Posts: 24954
61
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rahul Kappor
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
I've been selected to go to the moon! All thanks to this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!