0 Replies Latest reply on Jan 2, 2008 6:21 AM by ruben martin

    Richfaces with Maven and Tomcat 6

    ruben martin Newbie

      Hello,

      Is there any working 'mavenized' seam application with richfaces as one of its dependencies?

      I've tried different dependencies in the pom based on some non official blogs, but none worked. Maybe some can provide one.

      Our app was based on the jboss-seam-jpa example and is deployed under tomcat6. The app runs ok when the jars are included manually.

      pom.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <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>org.fundacionctic.seam</groupId>
       <artifactId>monitor</artifactId>
       <packaging>war</packaging>
       <name>monitor</name>
       <version>0.1</version>
       <url>http://fundacionctic.org</url>
      
       <!--
       <pluginRepositories>
       <pluginRepository>
       <id>apache.snapshots</id>
       <url>
       http://people.apache.org/repo/m2-snapshot-repository/
       </url>
       </pluginRepository>
       </pluginRepositories>
       -->
      
       <build>
       <finalName>monitor</finalName>
       <plugins>
       <plugin>
       <artifactId>maven-war-plugin</artifactId>
       <configuration>
       <warSourceDirectory>WebContent</warSourceDirectory>
       </configuration>
       </plugin>
      
       <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <configuration>
       <source>1.5</source>
       <target>1.5</target>
       <encoding>utf8</encoding>
       </configuration>
       </plugin>
      
       </plugins>
       </build>
      
      
       <repositories>
       <repository>
       <id>jboss.org</id>
       <name>jboss.org</name>
       <url>http://repository.jboss.com/maven2</url>
       </repository>
       </repositories>
      
      
       <dependencies>
      
       <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>3.8.1</version>
       <scope>test</scope>
       </dependency>
      
       <!-- TestNG -->
       <dependency>
       <groupId>org.testng</groupId>
       <artifactId>testng</artifactId>
       <version>5.0</version>
       <classifier>jdk15</classifier>
       <scope>test</scope>
       </dependency>
      
       <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
       <version>2.5</version>
       <scope>test</scope>
       </dependency>
      
       <dependency>
       <groupId>javax.el</groupId>
       <artifactId>el-api</artifactId>
       <version>1.0</version>
       <scope>test</scope>
       </dependency>
      
       <!-- Seam -->
       <dependency>
       <groupId>org.jboss.seam</groupId>
       <artifactId>jboss-seam</artifactId>
       <version>2.0.0.GA</version>
       <exclusions>
       <exclusion>
       <artifactId>el-api</artifactId>
       <groupId>javax.el</groupId>
       </exclusion>
       </exclusions>
       </dependency>
      
       <dependency>
       <groupId>org.jboss.seam</groupId>
       <artifactId>jboss-seam-ui</artifactId>
       <version>2.0.0.GA</version>
       <exclusions>
       <exclusion>
       <artifactId>el-api</artifactId>
       <groupId>javax.el</groupId>
       </exclusion>
       </exclusions>
       </dependency>
      
       <dependency>
       <groupId>org.jboss.seam</groupId>
       <artifactId>jboss-seam-debug</artifactId>
       <version>2.0.0.GA</version>
       <exclusions>
       <exclusion>
       <artifactId>servlet-api</artifactId>
       <groupId>javax.servlet</groupId>
       </exclusion>
       <exclusion>
       <artifactId>el-api</artifactId>
       <groupId>javax.el</groupId>
       </exclusion>
       </exclusions>
       </dependency>
      
       <dependency>
       <groupId>org.jboss.seam</groupId>
       <artifactId>jboss-el</artifactId>
       <version>2.0.0.GA</version>
       <exclusions>
       <exclusion>
       <artifactId>el-api</artifactId>
       <groupId>javax.el</groupId>
       </exclusion>
       </exclusions>
       </dependency>
      
       <dependency>
       <groupId>org.jboss.seam</groupId>
       <artifactId>jboss-seam-mail</artifactId>
       <version>2.0.0.GA</version>
       </dependency>
      
       <!-- hibernate -->
       <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-validator</artifactId>
       <version>3.0.0.ga</version>
       </dependency>
      
       <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-annotations</artifactId>
       <version>3.3.0.ga</version>
       </dependency>
      
       <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-entitymanager</artifactId>
       <version>3.3.1.ga</version>
       </dependency>
      
       <!-- spring ldap y ldap booster pack -->
       <dependency>
       <groupId>org.springframework.ldap</groupId>
       <artifactId>spring-ldap</artifactId>
       <version>1.2</version>
       </dependency>
      
       <dependency>
       <groupId>com.sun</groupId>
       <artifactId>ldapbp</artifactId>
       <version>1.0</version>
       </dependency>
      
       <!-- log4j -->
       <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
       <version>1.2.14</version>
       </dependency>
      
       <!-- mysql -->
       <dependency>
       <groupId>mysql</groupId>
       <artifactId>mysql-connector-java</artifactId>
       <version>5.0.4</version>
       </dependency>
      
       <!-- mail -->
       <dependency>
       <groupId>javax.mail</groupId>
       <artifactId>mail</artifactId>
       <version>1.4</version>
       </dependency>
      
       <!-- faces -->
      
       <dependency>
       <groupId>com.sun.facelets</groupId>
       <artifactId>jsf-facelets</artifactId>
       <version>1.1.14</version>
       </dependency>
      
       <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>jstl</artifactId>
       <version>1.1.2</version>
       </dependency>
      
       <!-- MyFaces
       <dependency>
       <groupId>org.apache.myfaces.core</groupId>
       <artifactId>myfaces-api</artifactId>
       <version>1.2.0</version>
       </dependency>
      
       <dependency>
       <groupId>org.apache.myfaces.core</groupId>
       <artifactId>myfaces-impl</artifactId>
       <version>1.2.0</version>
       </dependency>
       -->
      
       <!-- RichFaces -->
       <dependency>
       <groupId>org.richfaces</groupId>
       <artifactId>richfaces</artifactId>
       <version>3.0.0</version>
       </dependency>
      
      <!--
       <dependency>
       <groupId>org.richfaces</groupId>
       <artifactId>framework</artifactId>
       <version>3.1.0</version>
       </dependency>
       -->
       <!--
       <dependency>
       <groupId>org.richfaces.framework</groupId>
       <artifactId>richfaces-api</artifactId>
       <version>3.1.3.GA</version>
       </dependency>
       <dependency>
       <groupId>org.richfaces.framework</groupId>
       <artifactId>richfaces-impl</artifactId>
       <version>3.1.3.GA</version>
       <exclusions>
       <exclusion>
       <groupId>javax.faces</groupId>
       <artifactId>jsf-api</artifactId>
       </exclusion>
       <exclusion>
       <groupId>javax.faces</groupId>
       <artifactId>jsf-impl</artifactId>
       </exclusion>
       </exclusions>
       </dependency>
       <dependency>
       <groupId>org.richfaces.ui</groupId>
       <artifactId>richfaces-ui</artifactId>
       <version>3.1.3.GA</version>
       <exclusions>
       <exclusion>
       <groupId>javax.faces</groupId>
       <artifactId>jsf-api</artifactId>
       </exclusion>
       <exclusion>
       <groupId>javax.faces</groupId>
       <artifactId>jsf-impl</artifactId>
       </exclusion>
       </exclusions>
       </dependency>
       -->
      
       <!-- Tomahawk -->
       <dependency>
       <groupId>org.apache.myfaces.tomahawk</groupId>
       <artifactId>tomahawk-sandbox</artifactId>
       <version>1.1.6</version>
       </dependency>
      
       <!-- tomahawk-facelets -->
       <dependency>
       <groupId>com.google.code.tomahawk</groupId>
       <artifactId>tomahawk-facelets</artifactId>
       <version>1.1.6</version>
       </dependency>
      
      
       <!-- JSF RI
       <dependency>
       <groupId>javax.faces</groupId>
       <artifactId>jsf-api</artifactId>
       <version>1.2_04-p02</version>
       </dependency>
      
      
       <dependency>
       <groupId>javax.faces</groupId>
       <artifactId>jsf-impl</artifactId>
       <version>1.2_04-p02</version>
       </dependency>
       -->
      
       <!-- RichFaces
       <dependency>
       <groupId>org.richfaces.framework</groupId>
       <artifactId>richfaces-impl</artifactId>
       <version>3.1.2.GA</version>
       </dependency>
      
       <dependency>
       <groupId>org.richfaces.framework</groupId>
       <artifactId>richfaces-api</artifactId>
       <version>3.1.2.GA</version>
       </dependency>
      
       <dependency>
       <groupId>org.richfaces.ui</groupId>
       <artifactId>richfaces-ui</artifactId>
       <version>3.1.2.GA</version>
       </dependency>
       -->
      
       </dependencies>
      </project>
      


      exception in tomcat
      02-ene-2008 11:58:41 org.apache.catalina.core.StandardContext listenerStart
      GRAVE: Error configurando escuchador de aplicación de clase com.sun.faces.config.ConfigureListener
      java.lang.NoClassDefFoundError: javax/faces/FacesException
       at java.lang.Class.getDeclaredConstructors0(Native Method)
       at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
       at java.lang.Class.getConstructor0(Unknown Source)
       at java.lang.Class.newInstance0(Unknown Source)
       at java.lang.Class.newInstance(Unknown Source)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3774)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
       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:525)
       at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
       at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
       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:566)
       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:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      02-ene-2008 11:58:41 org.apache.catalina.core.StandardContext listenerStart
      GRAVE: Error configurando escuchador de aplicación de clase com.sun.faces.application.WebappLifecycleListener
      java.lang.NoClassDefFoundError: javax/faces/FacesException
       at com.sun.faces.application.WebappLifecycleListener.<clinit>(WebappLifecycleListener.java:67)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
       at java.lang.reflect.Constructor.newInstance(Unknown Source)
       at java.lang.Class.newInstance0(Unknown Source)
       at java.lang.Class.newInstance(Unknown Source)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3774)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
       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:525)
       at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
       at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
       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:566)
       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:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      02-ene-2008 11:58:41 org.apache.catalina.core.StandardContext listenerStart
      GRAVE: Se ha saltado la instalación de escuchadores de aplicación debido a error(es) previo(s)
      02-ene-2008 11:59:08 org.apache.catalina.core.StandardContext listenerStart
      GRAVE: Excepción enviando evento inicializado de contexto a instancia de escuchador de clase com.sun.faces.config.ConfigureListener
      javax.faces.FacesException: java.lang.ClassNotFoundException: [Ljava.lang.String;
       at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:354)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
       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:525)
       at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
       at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
       at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
       at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
       at org.apache.catalina.core.ContainerBase$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(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: [Ljava.lang.String;
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
       at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:635)
       at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:422)
       at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:348)
       ... 16 more