开发者

Tomcat failure to deploy from Cargo plugin via Hudson, NoClassDefFoundError

开发者 https://www.devze.com 2023-02-28 04:22 出处:网络
I am having some issues with a Maven profile setup to run HtmlUnit test cases.The profile uses the Maven Cargo plugin to deploy the application and then subsequently run interface tests with HtmlUnit

I am having some issues with a Maven profile setup to run HtmlUnit test cases. The profile uses the Maven Cargo plugin to deploy the application and then subsequently run interface tests with HtmlUnit on the deployed application.

On my local machine I am able to run this Maven profile cleanly without fail every time, however on my continuous integration server which is running Hudson (ver. 1.386) this profile is hit or miss whether it is able to deploy or not. My Tomcat log shows this error:

SEVERE: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.myfaces.webapp.AbstractMyFacesListener.(AbstractMyFacesListener.java:36) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4079) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) at org.apache.catalina.core.Contain开发者_开发技巧erBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491) ... 23 more

The problem is perplexing because it can happen or it could not happen without ANY changes on the code and the fact that the exact same code runs perfectly on my local machine. The problem/error is purely part of the deployment within the Cargo plugin, but there is no clear reason why it is occurring. Any thoughts, advice, or solutions would be a great deal of help for me.

Some more details:

Local machine(runs): Windows 7 64-bit, Maven 2.2.1, Tomcat 6.0.32

CIS Server(fails): Windows 2008 Server 64-bit, Maven 2.2.1, Tomcat 6.0.32, Hudson 1.386.

Maven command & goals: "mvn clover2:instrument clover2:clover site -P integration" (integration is the Maven profile)


Have you had a look at the last section of http://commons.apache.org/logging/troubleshooting.html ?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号