I have a web app with Spring, Hibernate and Struts 2 and I get this error:
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoSuchFieldError: TRACE
So I googled it, found this wich says:
if you are on the Equinox Console, perform the following check:
packages org.apache.log4j
Which I did, and got this:
org.apache.log4j; version="1.2.15"<org.apache.log4j_1.2.15.v201005080500 [33]>
org.apache.velocity_1.5.0.v200905192330 [37] imports
And I don’t really know what that means… But what I’m sure of is that jar is NOT the one I’m supposed to be using.
In fact, I ran the packages command after I deleted all the log4j jars in the project and in the Tomcat libraries.
And even after deleting the log4j jars, I can still import the org.apache.log4j.Level class in any class in my project (and of course that Level class that I can import doesn’t have the TRACE field).
So, how do I find where it is? And how does it get included in my project classpath???
Thank you for your time!
Try following to find location of the jar causing the issue: