1 Reply Latest reply on Jan 2, 2010 7:58 PM by Ilya Dyoshin

    problem with richfaces components in seam web project

    Jaaouane Aymen Newbie
           
      Seam web project and problem with richfaces components

      I'm a Seam newbie.

      I have created a seam web project under eclipse using Jboss Tools plugin named "WebApplication1".So the project created is formed by 4 projects(WebApplication1,WebApplication1-ear,WebApplication1-ejb,WebApplication1-test).
      Then, I have created a session bean named "DataTableManagerBean" under the session bean package in WebApplication1-ejb to manage the rich faces component "rich:extendedDataTable".

      So,in the DataTableManagerBean i imported "org.richfaces.component.html.HtmlDataTable".

      The problem is that eclipse cannot resolve this type.So,I added richfaces-impl.jar and richefaces-impl.jar to the build path of WebApplication1-ejb.Thus, the problem is resolved.

      But when I started Jboss AS,I get the following Error:







      `Error installing to Real: name=vfsfile:/C:/jboss-5.1.0.GA/server/default/deploy/WebApplication1.ear/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error deploying project1.jar: org/richfaces/component/html/HtmlDataTable
              at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
              at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
              at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
              at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
              at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
              at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
              at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NoClassDefFoundError: org/richfaces/component/html/HtmlDataTable
              at java.lang.Class.getDeclaredMethods0(Native Method)
              at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
              at java.lang.Class.getDeclaredMethods(Unknown Source)
              at org.jboss.ejb3.interceptors.lang.SecurityActions$1.run(SecurityActions.java:43)
              at org.jboss.ejb3.interceptors.lang.SecurityActions$1.run(SecurityActions.java:41)
              at java.security.AccessController.doPrivileged(Native Method)
              at org.jboss.ejb3.interceptors.lang.SecurityActions.getDeclaredMethods(SecurityActions.java:39)
              at org.jboss.ejb3.interceptors.lang.ClassHelper.populateAllMethods(ClassHelper.java:219)
              at org.jboss.ejb3.interceptors.lang.ClassHelper.getAllMethods(ClassHelper.java:88)
              at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.initialise(BeanInterceptorMetaDataBridge.java:246)
              at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.<init>(BeanInterceptorMetaDataBridge.java:138)
              at org.jboss.ejb3.interceptors.metadata.AdditiveBeanInterceptorMetaDataBridge.<init>(AdditiveBeanInterceptorMetaDataBridge.java:48)
              at org.jboss.ejb3.aop.BeanContainer.initialize(BeanContainer.java:194)
              at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:249)
              at org.jboss.ejb3.session.SessionContainer.<init>(SessionContainer.java:119)
              at org.jboss.ejb3.session.SessionSpecContainer.<init>(SessionSpecContainer.java:69)
              at org.jboss.ejb3.stateless.StatelessContainer.<init>(StatelessContainer.java:112)
              at org.jboss.ejb3.Ejb3AnnotationHandler.getStatelessContainer(Ejb3AnnotationHandler.java:310)
              at org.jboss.ejb3.Ejb3DescriptorHandler.getStatelessContainer(Ejb3DescriptorHandler.java:499)
              at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:203)
              at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:718)
              at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:669)
              at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:651)
              at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:614)
              at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:491)
              at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
              ... 29 more
      Caused by: java.lang.ClassNotFoundException: org.richfaces.component.html.HtmlDataTable



      My questions are:

      1)Shall I Add the richfaces jars to the WebApplication1-ejb every time i need to use richFaces component in an ejeb session bean or
      i should create my session beans in WebApplication1 instead of WebApplication1-ejb because WebApplication1
      contain richfaces jars in its build path?

      2)What shall i do to make jboss as recongnize the org/richfaces/component/html/HtmlDataTable ?




      Thanks all.

      Regards