1 Reply Latest reply on Jan 26, 2012 11:51 AM by Jason Porter

    Using seam-faces in ejb project

    H Dam Newbie

      Hi,
      I using JBoss Tools in eclipse to generate maven project by archetype jboss-javaee6-webapp-ear-archetype. This project is ear project including three projects: ear, web, ejb. Everything is OK.
      However, I added dependency seam-faces to ejb project (add into ejb project's pom.xml), when deploy to Jboss AS 7.0.2.Final, I have following error


      15:14:01,250 WARN  [org.jboss.modules] (MSC service thread 1-15) Failed to define class org.jboss.seam.faces.component.UIViewAction in Module "deployment.swms-ear.ear:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/jboss/seam/faces/component/UIViewAction (Module "deployment.swms-ear.ear:main" from Service Module Loader)
              at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.as.web.deployment.jsf.JsfAnnotationProcessor.deploy(JsfAnnotationProcessor.java:109)
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_30]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_30]
              at java.lang.Thread.run(Unknown Source) [:1.6.0_30]
      Caused by: java.lang.NoClassDefFoundError: javax/faces/component/ActionSource2
              at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_30]
              at java.lang.ClassLoader.defineClassCond(Unknown Source) [:1.6.0_30]
              at java.lang.ClassLoader.defineClass(Unknown Source) [:1.6.0_30]
              at java.security.SecureClassLoader.defineClass(Unknown Source) [:1.6.0_30]
              at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]
              ... 14 more
      Caused by: java.lang.ClassNotFoundException: javax.faces.component.ActionSource2 from [Module "deployment.swms-ear.ear:main" from Service Module Loader]
              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]
              ... 19 more
      
      15:14:01,253 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-15) MSC00001: Failed to start service jboss.deployment.unit."swms-ear.ear".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."swms-ear.ear".INSTALL: Failed to process phase INSTALL of deployment "swms-ear.ear"
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_30]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_30]
              at java.lang.Thread.run(Unknown Source) [:1.6.0_30]
      Caused by: java.lang.LinkageError: Failed to link org/jboss/seam/faces/component/UIViewAction (Module "deployment.swms-ear.ear:main" from Service Module Loader)
              at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.as.web.deployment.jsf.JsfAnnotationProcessor.deploy(JsfAnnotationProcessor.java:109)
              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
              ... 5 more
      Caused by: java.lang.NoClassDefFoundError: javax/faces/component/ActionSource2
              at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_30]
              at java.lang.ClassLoader.defineClassCond(Unknown Source) [:1.6.0_30]
              at java.lang.ClassLoader.defineClass(Unknown Source) [:1.6.0_30]
              at java.security.SecureClassLoader.defineClass(Unknown Source) [:1.6.0_30]
              at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]
              ... 14 more
      Caused by: java.lang.ClassNotFoundException: javax.faces.component.ActionSource2 from [Module "deployment.swms-ear.ear:main" from Service Module Loader]
              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]
              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]
              ... 19 more
      



      But if I move seam-faces to web project, it's OK.
      I searched this forum and think this post http://www.seamframework.org/Community/SeamFacesCausesExceptionInJBossAS7EarDeployment is my resolution. But my problem is I want to using seam-faces in ejb project. Am I wrong, or what do I need to config? I am a new guy in Seam 3. I've ever used Seam 2 to develop my seam projects. So, I want to develop my seam 3 project similar seam 2 projects before. Using seam-faces into ejb project is right? Please show me. Thanks!