I've been working on a java spring project for a few months now. I can compile it using maven. I can drop the war file into tomcat/webapps and it runs.
But I can no longer run the project from within Eclipse. I used to be able to. I'm not sure what happened, I think I may have done a mvn clean, but I haven't been able to run as server.
I'm using Eclipse Helios, with maven plugins m2e and Maven integration for Eclipse WTP I'm running Tomcat 6.0.29
This is the error I see when I try to run as->Run on server:
Apr 4, 2011 10:33:26 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\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\apps\JAXWS2.2.1-20100617\jaxws-r开发者_开发知识库i\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\apache-maven-2.2.1\bin;C:\Program Files\QuickTime\QTSystem\
Apr 4, 2011 10:33:26 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:my-adapter' did not find a matching property.
Apr 4, 2011 10:33:26 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Apr 4, 2011 10:33:26 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 534 ms
Apr 4, 2011 10:33:26 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 4, 2011 10:33:26 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Apr 4, 2011 10:33:27 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:1645)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4078)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Apr 4, 2011 10:33:27 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Apr 4, 2011 10:33:27 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Apr 4, 2011 10:33:27 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/my-adapter] startup failed due to previous errors
Your eclipse based tomcat installation cannot find the APR libraries. Adding the APR libraries path to the PATH Environment variable should fix this. In case you are not using the APR libraries, disable them through tomcat's server.xml
精彩评论