Reputation: 12683
A few hours ago I was working on my web application and it was working alright. But somehow a rather strange problem has started occurring and I am getting the following error:
Nov 7, 2011 1:49:10 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:springatwork' did not find a matching property.
Nov 7, 2011 1:49:10 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_17\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\csvn\bin\;C:\csvn\Python25\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.6.0_17\bin;C:\Home\apache-tomcat\bin;C:\Home\apache-maven-3.0.3\bin;C:\Home\apache-ant\bin;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files\QuickTime\QTSystem\
Nov 7, 2011 1:49:10 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Nov 7, 2011 1:49:10 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 455 ms
Nov 7, 2011 1:49:10 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 7, 2011 1:49:10 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Nov 7, 2011 1:49:11 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3877)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Nov 7, 2011 1:49:11 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Nov 7, 2011 1:49:11 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Nov 7, 2011 1:49:11 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/springatwork] startup failed due to previous errors
Nov 7, 2011 1:49:11 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Nov 7, 2011 1:49:11 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 7, 2011 1:49:11 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
Nov 7, 2011 1:49:11 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 328 ms
I am using m2 maven plugin with eclipse and the project is maven webapp. The project works alright when I use the tomcat-maven-plugin but if I try to deploy it to the configured tomcat server in my Eclipse 3.5 IDE then I get the above error.
EDIT: Also, when I stop the tomcat I get the following at the end:
ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): [../../../src/share/back/util.c:820]
Only thing I remember doing was trying to do some debugging using debugging mode.
Could someone help me understand why is it happening and how to solve this problem?
Thanks.
Upvotes: 2
Views: 2820
Reputation: 4874
Make sure you have something like this in your Project properties -> Deployment Assembly:
[ Maven Dependencies :: WEB-INF/lib ]
Upvotes: 3
Reputation: 17874
This is probably an m2eclipse-wtp bug, which is the eclipse plugin that is supposed to import the maven war configuration and create the eclipse project from, including which libraries should be compile-time and which ones should be in the WEB-INF/lib. Different versions in the past have given me problems for years. I always had to manually fix these in the eclipse project settings. Different versions of eclipse set this in different places, so that doesn't make it any easier.
Upvotes: 0