Mailing List
Home
Forum Home
Maven - Project building tool
Axis - Java SOAP implementation
Lucene - Full-featured text search engine APIs
Cocoon - MVC web framework based on XML/XSL
Fop - Create PDF, PCL, PS, SVG, XML driven by XSL formatting objects.
Log4J - A log library
POI - Java Excel, Word and other Microsoft Office files manipulating library
Oracle database error code ...
Subjects
log4j warning: No appenders could be found
java security AccessControlException: access denied (java io FilePermission clie
java lang InstantiationException: org apache tools ant Main
Apache Axis Tutorial
Subject: Struts <logic iterate >
log4j properties How to parse outpu to multiple files
configuring log4j with BEA Weblogic 8 1
How to use XSL FOP Java together
JSP precompile
Proposal: Adding jar manifest classpath in jar and war plugins
Servlet File Download dialog problem (IE6,Adobe 6 0)
java security AccessControlException: access denied (java io FilePermission
Unsupported major minor version 48 0 problem while running the an
   telope task
Subject: axis wsdl2java Ant Task usage
net sf hibernate MappingException: Error reading resource: test/User hbm xml
Building EAR ANT Script for websphere 5 0
CREATING WAR Files
Classpath problem
jsp data into Excel
Jboss 3 2 3+ vs Tomcat Axis Question
RE: How to include jars and add them into the MANIFEST MF/Class Path
attribute
Printing problem
Subject: InstantiationException
Couldn 't find trusted certificate
Please : How can one install ant 1 6 0 under Eclipse 2 1 ?
Excel: Too many different cell formats
Subject: AXIS: tomcat timeout ?
1 3 final: now giving me java io FileNotFoundException (Too many
open files)
XDoclet, Struts and Maven: Where to start? SOLUTION
Subject: Running junit tests fails
 
cargo plugin problems

cargo plugin problems

2007-12-01       - By Marco Mistroni

 Back
hi all,
i am trying to run selenium tests using maven2/ cargo / jetty / selenium
plugin
i am following instructions here (
http://wiki.foochal.org/index.php/Maven_Selenium)

however, when cargo starts, i am getting this exceptions

2007-12-01 16:52:53.582::WARN:  Failed startup of context
org.mortbay.jetty.webapp.WebAppContext@(protected){/BudgetWeb-1 (See http://Web-1.ora-code.com).0-SNAPSHOT
,jar:file:/home/marco/BudgetAppV2/BudgetWeb/target/BudgetWeb-
1.0-SNAPSHOT.war!/}
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@(protected) for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@(protected) for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category))
       at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
LogFactoryImpl.java:543)
       at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
LogFactoryImpl.java:235)
       at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
LogFactoryImpl.java:209)
       at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
       at org.springframework.web.context.ContextLoader.<init>(
ContextLoader.java:139)
       at
org.springframework.web.context.ContextLoaderListener.createContextLoader(
ContextLoaderListener.java:57)
       at
org.springframework.web.context.ContextLoaderListener.contextInitialized(
ContextLoaderListener.java:48)
       at org.mortbay.jetty.handler.ContextHandler.startContext(
ContextHandler.java:511)
       at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
       at org.mortbay.jetty.webapp.WebAppContext.startContext(
WebAppContext.java:1191)
       at org.mortbay.jetty.handler.ContextHandler.doStart(
ContextHandler.java:481)
       at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java
:434)
       at org.mortbay.component.AbstractLifeCycle.start(
AbstractLifeCycle.java:40)
       at org.mortbay.jetty.handler.HandlerCollection.doStart(
HandlerCollection.java:147)
       at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(
ContextHandlerCollection.java:120)
       at org.mortbay.component.AbstractLifeCycle.start(
AbstractLifeCycle.java:40)
       at org.mortbay.jetty.handler.HandlerCollection.doStart(
HandlerCollection.java:147)
       at org.mortbay.component.AbstractLifeCycle.start(
AbstractLifeCycle.java:40)
       at org.mortbay.jetty.handler.HandlerWrapper.doStart(
HandlerWrapper.java:117)
       at org.mortbay.jetty.Server.doStart(Server.java:210)
       at org.mortbay.component.AbstractLifeCycle.start(
AbstractLifeCycle.java:40)
       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:585)
       at
org.codehaus.cargo.container.jetty.internal.JettyExecutorThread.run(
JettyExecutorThread.java:68)
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable
Log constructor [Ljava.lang.Class;@(protected) for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category)
       at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
LogFactoryImpl.java:413)
       at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
LogFactoryImpl.java:529)
       ... 25 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
       at java.lang.Class.getDeclaredConstructors0(Native Method)
       at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
       at java.lang.Class.getConstructor0(Class.java:2671)
       at java.lang.Class.getConstructor(Class.java:1629)
       at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
LogFactoryImpl.java:410)
       ... 26 more
2007-12-01 16:52:53.588::INFO:  Extract
jar:file:/home/marco/BudgetAppV2/BudgetWeb/target/jetty6x/cargocpc.war!/ to
/tmp/Jetty_0_0_0_0_8080_cargocpc.war__cargocpc__xflgf3/webapp
2007-12-01 16:52:54.210::INFO:  Started SelectChannelConnector @
0.0.0.0:8080
[INFO] [beddedLocalContainer] Jetty 6.x Embedded started on port [8080]
[INFO] [cargo:deploy {execution: start-container}]
[INFO] [mbeddedLocalDeployer] Deploying
[/home/marco/BudgetAppV2/BudgetWeb/target/BudgetWeb-1 (See http://Web-1.ora-code.com).0-SNAPSHOT.war]
2007-12-01 16:52:58.114::INFO:  Extract
jar:file:/home/marco/BudgetAppV2/BudgetWeb/target/BudgetWeb-
1.0-SNAPSHOT.war!/ to /tmp/Jetty_0_0_0_0_8080_BudgetWeb-
1.0-SNAPSHOT.war__BudgetWeb-1 (See http://Web-1.ora-code.com)_0-SNAPSHOT__8a04wa/webapp
2007-12-01 16:52:59.925::WARN:  failed
org.mortbay.jetty.webapp.WebAppContext@(protected){/BudgetWeb-1 (See http://Web-1.ora-code.com).0-SNAPSHOT
,jar:file:/home/marco/BudgetAppV2/BudgetWeb/target/BudgetWeb-
1.0-SNAPSHOT.war!/}
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
       at java.security.SecureClassLoader.defineClass(
SecureClassLoader.java:124)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
       at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
       at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(
WebAppClassLoader.java:354)
       at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(
WebAppClassLoader.java:325)
       at org.mortbay.jetty.handler.ContextHandler.loadClass(
ContextHandler.java:978)
       at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(
WebXmlConfiguration.java:624)
       at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(
WebXmlConfiguration.java:366)
       at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(
WebXmlConfiguration.java:288)
       at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(
WebXmlConfiguration.java:221)
       at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(
WebXmlConfiguration.java:179)
       at org.mortbay.jetty.webapp.WebAppContext.startContext(
WebAppContext.java:1188)
       at org.mortbay.jetty.handler.ContextHandler.doStart(
ContextHandler.java:481)
       at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java
:434)
       at org.mortbay.component.AbstractLifeCycle.start(
AbstractLifeCycle.java:40)
       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:585)
       at
org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalContainer.addHandler(
Jetty6xEmbeddedLocalContainer.java:294)
       at
org.codehaus.cargo.container.jetty.Jetty6xEmbeddedLocalDeployer.deployWebApp
(Jetty6xEmbeddedLocalDeployer.java:77)
       at
org.codehaus.cargo.container.jetty.internal.AbstractJettyEmbeddedLocalDeployer
.deploy
(AbstractJettyEmbeddedLocalDeployer.java:95)
       at
org.codehaus.cargo.maven2.DeployerDeployMojo
.performDeployerActionOnSingleDeployable
(DeployerDeployMojo.java:79)
       at
org.codehaus.cargo.maven2.AbstractDeployerMojo
.performDeployerActionOnAllDeployables
(AbstractDeployerMojo.java:118)
       at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(
AbstractDeployerMojo.java:47)
       at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(
AbstractCargoMojo.java:243)
       at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:443)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:539)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:480)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:459)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:311)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:143)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
       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:585)
       at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
:315)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
       at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)
       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
[ERROR] FATAL ERROR
[INFO]
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
[INFO] Failed to deploy [/home/marco/BudgetAppV2/BudgetWeb/target/BudgetWeb-
1.0-SNAPSHOT.war]
javax/servlet/ServletContextListener


here's my pom for your reference.......
***********************************************
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
 <modelVersion>4.0.0</modelVersion>
 <groupId>BudgetApp</groupId>
 <artifactId>BudgetWeb</artifactId>
 <packaging>war</packaging>
 <version>1.0-SNAPSHOT</version>
 <name>BudgetWeb</name>
 <url>http://maven.apache.org</url>
 <ciManagement>
     <system>continuum</system>
   <url>http://localhost:8080/continuum</url>
   <notifiers>
       <notifier>
           <type>mail</type>
           <configuration>
               <address>mmistroni@(protected)</address>
           </configuration>
       </notifier>
   </notifiers>
 </ciManagement>
 <developers>
   <developer>
       <id>MistroniM</id>
       <name>Marco Mistroni</name>
       <email>mmistroni@(protected)</email>
       <roles>
           <role>Developer</role>
           <role>Continuum Admin</role>
       </roles>
       <organization>WorldCorp Services Ltd</organization>
       <timezone>0</timezone>
   </developer>
  </developers>
  <mailingLists>
   <mailingList>
       <name>COLL IT</name>
        <subscribe>dev-subscribe@(protected)</subscribe>
        <unsubscribe>dev-unsubscribe@(protected)</unsubscribe>
        <post>dev@(protected)</post>
        <archive>http://mail-archives.wakaleo.com/modmbox/dev/</archive>
    </mailingList>
   </mailingLists>

   <profiles>
       <profile>
           <id>BudgetApp</id>
           <properties>
               <deployDir>/home/marco/jboss-4 (See http://oss-4.ora-code.com).0.5.GA</deployDir>
           </properties>
           <activation>
               <activeByDefault>true</activeByDefault>
           </activation>
       </profile>
   </profiles>
 <scm>
   <connection>scm:svn:svn://localhost/trunk/BudgetWeb</connection>

<developerConnection>scm:svn:svn://localhost/trunk/BudgetWeb<
/developerConnection>
 </scm>


 <dependencies>
   <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>3.8.1</version>
     <scope>test</scope>
   </dependency>
   <dependency>
       <groupId>BudgetApp</groupId>
       <artifactId>Backend</artifactId>
       <version>1.0-SNAPSHOT</version>
   </dependency>
   <dependency>
       <groupId>springframework</groupId>
       <artifactId>spring-mock</artifactId>
       <version>1.2.6</version>
       <exclusions>
              <exclusion>
               <groupId>ehcache</groupId>
                 <artifactId>ehcache</artifactId>
           </exclusion>
       </exclusions>
   </dependency>
   <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring</artifactId>
       <version>2.0.2</version>
   </dependency>

   <dependency>
         <groupId>org.jmock</groupId>
         <artifactId>jmock-legacy</artifactId>
         <version>2.1.0</version>
   </dependency>

   <dependency>
       <groupId>opensymphony</groupId>
       <artifactId>xwork</artifactId>
       <version>2.0.3</version>
   </dependency>
   <dependency>
       <groupId>org.apache.struts</groupId>
       <artifactId>struts2-core</artifactId>
       <version>2.0.9</version>
       <exclusions>
              <exclusion>
               <groupId>freemarker</groupId>
                 <artifactId>freemarker</artifactId>
           </exclusion>
           <exclusion>
               <groupId>xwork</groupId>
                 <artifactId>xwork</artifactId>
           </exclusion>

       </exclusions>
   </dependency>
   <dependency>
       <groupId>freemarker</groupId>
       <artifactId>freemarker</artifactId>
       <version>2.3.9</version>
   </dependency>
   <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>servlet-api</artifactId>
         <version>2.4</version>
         <scope>provided</scope>
   </dependency>
   <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring</artifactId>
       <version>2.0.2</version>
   </dependency>
   <dependency>
       <groupId>poi</groupId>
       <artifactId>poi</artifactId>
       <version>2.5.1</version>
   </dependency>
   <dependency>
     <groupId>opensymphony</groupId>
     <artifactId>sitemesh</artifactId>
     <version>2.3</version>
   </dependency>
   <dependency>
     <groupId>org.apache.struts</groupId>
     <artifactId>struts2-sitemesh-plugin</artifactId>
     <version>2.0.9</version>
   </dependency>
   <dependency>
     <groupId>org.apache.struts</groupId>
     <artifactId>struts2-spring-plugin</artifactId>
     <version>2.0.9</version>
   </dependency>
   <!--  selenium dependencies -->
   <dependency>
     <groupId>org.openqa.selenium.client-drivers</groupId>
     <artifactId>selenium-java-client-driver-tests</artifactId>
     <version>0.9.2</version>
     <scope>test</scope>
   </dependency>
   <dependency>
     <groupId>org.openqa.selenium.client-drivers</groupId>
     <artifactId>selenium-java-client-driver</artifactId>
     <version>0.9.2</version>
     <scope>test</scope>
   </dependency>

 </dependencies>
 <build>
   <resources>
     <resource>
       <directory>src/main/resources</directory>
       <filtering>true</filtering>
     </resource>
   </resources>

     <plugins>
       <plugin>
             <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <configuration>
                 <source>1.5</source>
                 <target>1.5</target>
           </configuration>
      </plugin>
      <plugin>
              <groupId>org.mortbay.jetty</groupId>
           <artifactId>maven-jetty-plugin</artifactId>
           <version>6.0.1</version>
      </plugin>
      <plugin>
              <groupId>org.codehaus.mojo</groupId>
            <artifactId>selenium-maven-plugin</artifactId>

             <executions>
                <execution>
                      <id>start</id>
                      <phase>pre-integration-test</phase>
                      <goals>
                       <goal>start-server</goal>
                      </goals>
                      <configuration>
                       <background>true</background>
                       <logOutput>true</logOutput>
                       <multiWindow>true</multiWindow>
                      </configuration>
                 </execution>
                 <execution>
                      <id>stop</id>
                      <phase>post-integration-test</phase>
                      <goals>
                       <goal>stop-server</goal>
                      </goals>
                 </execution>
            </executions>
       </plugin>
       <plugin>
               <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <version>0.3-SNAPSHOT</version>
            <configuration>
                 <wait>false</wait>
                 <container>
                      <containerId>jetty6x</containerId>
                      <type>embedded</type>
                 </container>
            </configuration>
           <executions>
                 <execution>
                      <id>start-container</id>
                      <phase>pre-integration-test</phase>
                      <goals>
                       <goal>start</goal>
                       <goal>deploy</goal>
                      </goals>
             </execution>

            <execution>
                  <id>stop-container</id>
                  <phase>post-integration-test</phase>
                  <goals>
                       <goal>stop</goal>
                  </goals>
             </execution>
        </executions>
      </plugin>
      <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
           <configuration>
               <excludes>
                    <exclude>**/uattests/*Test.java</exclude>
               </excludes>
               <systemProperties>
                   <property>
                       <name>net.sourceforge.cobertura.datafile</name>
                       <value>target/cobertura/cobertura.ser</value>
                   </property>
               </systemProperties>
           </configuration>
           <executions>
               <execution>
                   <id>integration-tests</id>
                     <phase>integration-test</phase>
                         <goals>
                              <goal>test</goal>
                         </goals>
                         <configuration>
                              <skip>false</skip>
                                  <excludes>
                                   <exclude>none</exclude>
                                  </excludes>
                                  <includes>
                                   <include>**/uattests/*Test.java
</include>
                                  </includes>
                          </configuration>
                 </execution>
           </executions>
      </plugin>

      <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
           <configuration>
               <instrumentation>
                   <ignores>
                         <ignore>com.mm.budgetweb.ajax.*</ignore>
                   </ignores>
               </instrumentation>
               <check>
                   <haltOnFailure>true</haltOnFailure>
                   <totalBranchRate>60</totalBranchRate>
                   <totalLineRate>70</totalLineRate>
               </check>
           </configuration>
           <executions>
             <execution>
               <goals>
                 <goal>clean</goal>
                 <goal>check</goal>
               </goals>
             </execution>
           </executions>
         </plugin>
         <plugin>
           <artifactId>maven-war-plugin</artifactId>
           <version>2.0</version>
       <!-- <configuration>
                   <warName>BudgetWeb</warName>
             <outputDirectory>${deployDir}/webapps</outputDirectory>
           </configuration>-->
         </plugin>
     </plugins>
 </build>
 <reporting>
   <plugins>
       <plugin>
           <artifactId>maven-javadoc-plugin</artifactId>
       </plugin>
       <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-report-plugin</artifactId>
       </plugin>
       <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>cobertura-maven-plugin</artifactId>
       </plugin>
       <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-jxr-plugin</artifactId>
       </plugin>
       <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-pmd-plugin</artifactId>
       </plugin>
   </plugins>
  </reporting>

</project>
???


anyone could help m e out?
i thought jetty would take crare of javax. packages..... as it is supposed
to start webserver.


please note that, if i run in 1 window jetty, in  another one selenium
server, and in a third one my selenium tests everything works fine.....

thanks in advance and regards
marco