3 Replies Latest reply on Apr 17, 2014 7:35 AM by Dinesh Wijekoon

    Whole J2EE Project breaks with Forge UI Scaffolding

    Dinesh Wijekoon Newbie

      Hi,

      I have a JBoss sample project which has three modules as ear, ejb and web. The fodler ejb i have "src/main/java/org/jboss/tools/example/model/Member.java", which is an Entity. Now I need to try out how UI Scaffolding works. So I followed the following simple steps defined http://forge.jboss.org/docs/important_plugins/ui-scaffolding.html. Here I called the scaffolding command from folder "{project-name}/ejb/". And The Forge command line worked well and generated the codes without any complaints. But Now I try to run the same project with JBoss (wildfly) I get the following errors. Any idea what i going on?. In the original project I had all thease Hibernate configurations,

       

      14:53:22,112 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."zjboss-test-ejb.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."zjboss-test-ejb.jar".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "zjboss-test-ejb.jar"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]

          at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]

      Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class org.jboss.tools.example.view.MemberBean with ClassLoader ModuleClassLoader for Module "deployment.zjboss-test-ejb.jar:main" from Service Module Loader

          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]

          at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)

          at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)

          at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)

          at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]

          ... 5 more

      Caused by: java.lang.NoClassDefFoundError: javax/faces/convert/Converter

          at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_51]

          at java.lang.Class.privateGetDeclaredFields(Class.java:2397) [rt.jar:1.7.0_51]

          at java.lang.Class.getDeclaredFields(Class.java:1806) [rt.jar:1.7.0_51]

          at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]

          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]

          ... 10 more

      Caused by: java.lang.ClassNotFoundException: javax.faces.convert.Converter from [Module "deployment.zjboss-test-ejb.jar:main" from Service Module Loader]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final]

          ... 15 more

       

      14:53:22,335 INFO  [org.jboss.ws.common.management] (MSC service thread 1-6) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.3.Final

      14:53:22,337 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "zjboss-test-ejb.jar")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"zjboss-test-ejb.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"zjboss-test-ejb.jar\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"zjboss-test-ejb.jar\"

          Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class org.jboss.tools.example.view.MemberBean with ClassLoader ModuleClassLoader for Module \"deployment.zjboss-test-ejb.jar:main\" from Service Module Loader

          Caused by: java.lang.NoClassDefFoundError: javax/faces/convert/Converter

          Caused by: java.lang.ClassNotFoundException: javax.faces.convert.Converter from [Module \"deployment.zjboss-test-ejb.jar:main\" from Service Module Loader]"}}

      14:53:22,405 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "zjboss-test-ejb.jar" (runtime-name : "zjboss-test-ejb.jar")

      14:53:22,415 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.deployment.unit."zjboss-test-ejb.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."zjboss-test-ejb.jar".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "zjboss-test-ejb.jar"

        • 1. Re: [forge-users] Whole J2EE Project breaks with Forge UI      Scaffolding
          George Gastaldi Master

          Looks like this is because the generated EJB (which should be Local to

          the WAR) depends on some JSF libs.

          Try moving the generated EJBs to the web project (the ones with

          @LocalBean) and see if it works.

           

           

          On 16-04-2014 09:06, forge-users@lists.jboss.org wrote:

          Hi,

          I have a JBoss sample project which has three modules as ear, ejb and web. The fodler ejb i have "src/main/java/org/jboss/tools/example/model/Member.java", which is an Entity. Now I need to try out how UI Scaffolding works. So I followed the following simple steps defined http://forge.jboss.org/docs/important_plugins/ui-scaffolding.html. Here I called the scaffolding command from folder "{project-name}/ejb/". And The Forge command line worked well and generated the codes without any complaints. But Now I try to run the same project with JBoss (wildfly) I get the following errors. Any idea what i going on?. In the original project I had all thease Hibernate configurations,

           

          14:53:22,112 ERROR (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."zjboss-test-ejb.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."zjboss-test-ejb.jar".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "zjboss-test-ejb.jar"

               at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166)

               at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

               at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

               at java.lang.Thread.run(Thread.java:744)

          Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class org.jboss.tools.example.view.MemberBean with ClassLoader ModuleClassLoader for Module "deployment.zjboss-test-ejb.jar:main" from Service Module Loader

               at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72)

               at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)

               at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)

               at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)

               at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)

               at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159)

               ... 5 more

          Caused by: java.lang.NoClassDefFoundError: javax/faces/convert/Converter

               at java.lang.Class.getDeclaredFields0(Native Method)

               at java.lang.Class.privateGetDeclaredFields(Class.java:2397)

               at java.lang.Class.getDeclaredFields(Class.java:1806)

               at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57)

               at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68)

               ... 10 more

          Caused by: java.lang.ClassNotFoundException: javax.faces.convert.Converter from [Module "deployment.zjboss-test-ejb.jar:main" from Service Module Loader]

               at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)

               at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)

               at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)

               at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)

               at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)

               ... 15 more

           

          14:53:22,335 INFO  (MSC service thread 1-6) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.3.Final

          14:53:22,337 ERROR (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "zjboss-test-ejb.jar")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"zjboss-test-ejb.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"zjboss-test-ejb.jar\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"zjboss-test-ejb.jar\"

               Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class org.jboss.tools.example.view.MemberBean with ClassLoader ModuleClassLoader for Module \"deployment.zjboss-test-ejb.jar:main\" from Service Module Loader

               Caused by: java.lang.NoClassDefFoundError: javax/faces/convert/Converter

               Caused by: java.lang.ClassNotFoundException: javax.faces.convert.Converter from [Module \"deployment.zjboss-test-ejb.jar:main\" from Service Module Loader]"}}

          14:53:22,405 INFO  (ServerService Thread Pool -- 29) JBAS018559: Deployed "zjboss-test-ejb.jar" (runtime-name : "zjboss-test-ejb.jar")

          14:53:22,415 INFO  (Controller Boot Thread) JBAS014774: Service status report

          JBAS014777:   Services which failed to start:      service jboss.deployment.unit."zjboss-test-ejb.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."zjboss-test-ejb.jar".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "zjboss-test-ejb.jar"

           

          Posted by forums

          Original post: https://community.jboss.org/message/868899#868899

           

          _______________________________________________

          forge-users mailing list

          forge-users@lists.jboss.org

          https://lists.jboss.org/mailman/listinfo/forge-users

           

          _______________________________________________

          forge-users mailing list

          forge-users@lists.jboss.org

          https://lists.jboss.org/mailman/listinfo/forge-users

           

          • 2. Re: Whole J2EE Project breaks with Forge UI Scaffolding
            Vineet Reynolds Apprentice

            What's happening here is that Forge generates the JSF scaffold in the same project where the command was run (presumably your EJB project). I'm not sure if the changes performed to the project POM have materialized - it would have converted the EJB project packaging from JAR (I presume this is the original one) to WAR, and added a bunch of dependencies including the JSF dependency. Ideally, this should be deployable and not cause any problems.

             

            But, going through this, you might want to consider having a single web project (a WAR) instead of EAR-styled project. The current scaffolding places emphasis on scaffolding UIs for JPA entities in the same project. That's why George's recommendation above would work.

             

            Alternatively, you could start off with a single project, generate the scaffold in the same project for the JPA entities, and later perform refactoring and modularization to create the EAR-style project.

            • 3. Re: Whole J2EE Project breaks with Forge UI Scaffolding
              Dinesh Wijekoon Newbie

              Thank you for the information. I was managed to build a angular js scaffolding. Where i built the scaffolding inside ejb folder and moved the web related files out of that project manually once they are built. The building worked well and carful moving also went well.