7 Replies Latest reply on Feb 12, 2014 1:18 PM by Denis Cassiano

    Scaffold error in Forge 2.0

    Denis Cassiano Newbie

      Hi Guys,

       

      I attempt to run scaffold generator in my new project, but i get a simple error in Forge 2 CLI:

       

      ***ERROR*** Error generating default scaffolding: null

       

      Its a new forge project with latest version of runtime: Forge2.0.0.Final and Java 7 1.7.0.40, Hibernate, WILDFly CR1 and MySQL 5.6 with latest mysql-connector.jar.

        • 1. Re: [forge-users] Scaffold error in Forge 2.0
          George Gastaldi Master

          Hi,

           

          Can you give us more details on how to reproduce that? Look in

          ~/.forge/log/forge.log for stacktraces.

           

          Best Regards,

           

          George

           

          On 03-02-2014 15:50, forge-users@lists.jboss.org wrote:

          Hi Guys,

           

          I attempt to run scaffold generator in my new project, but i get a simple error in Forge 2 CLI:

           

          **ERROR** Error generating default scaffolding: null

           

          Its a new forge project with latest version of runtime: Forge2.0.0.Final and Java 7 1.7.0.40, Hibernate, WILDFly CR1 and MySQL 5.6 with latest mysql-connector.jar.

           

          Posted by forums

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

          _______________________________________________

          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: Scaffold error in Forge 2.0
            Denis Cassiano Newbie

            Hi George,

             

            The command line is: scaffold-generate --webRoot / --overwrite yes --targets com.package.Candidato

             

            The log is:

            17:24:29,950 WARNING [org.metawidget.config.impl.BaseConfigReader] (AeshProcess: 1) class org.jboss.forge.addon.scaffold.faces.metawidget.inspector.ForgeInspector must be immutable, but appears to have a setter method (public void org.jboss.forge.addon.scaffold.faces.metawidget.inspector.ForgeInspector.setTypeUnderInspection(java.lang.String))

            17:24:30,067 SEVERE [org.jboss.forge.addon.shell.aesh.CommandAdapter] (AeshProcess: 1) Failed to execute [scaffold-generate] due to exception.: java.lang.RuntimeException: Error generating default scaffolding: null

              at org.jboss.forge.addon.scaffold.faces.FacesScaffoldProvider.generateFromEntity(FacesScaffoldProvider.java:774)

              at org.jboss.forge.addon.scaffold.faces.FacesScaffoldProvider.generateFrom(FacesScaffoldProvider.java:222)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_40]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_40]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_40]

              at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_40]

              at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:59) [furnace-proxy-2.0.0.Final.jar:2.0.0.Final]

              at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34) [furnace-api-2.0.0.Final.jar:2.0.0.Final]

              at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:75) [furnace-proxy-2.0.0.Final.jar:2.0.0.Final]

              at org.jboss.forge.addon.facets.AbstractFacet_$$_javassist_9b860e33-ef8c-41ab-8259-49b22e97fbab.generateFrom(AbstractFacet_$$_javassist_9b860e33-ef8c-41ab-8259-49b22e97fbab.java)

              at org.jboss.forge.addon.scaffold.impl.ui.ScaffoldExecuteGenerationStep.execute(ScaffoldExecuteGenerationStep.java:63)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_40]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_40]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_40]

              at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_40]

              at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:59) [furnace-proxy-2.0.0.Final.jar:2.0.0.Final]

              at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34) [furnace-api-2.0.0.Final.jar:2.0.0.Final]

              at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:75) [furnace-proxy-2.0.0.Final.jar:2.0.0.Final]

              at org.jboss.forge.addon.scaffold.impl.ui.ScaffoldExecuteGenerationStep_$$_javassist_ac79b82d-d3b6-4b4f-9c32-9372bfcacb44.execute(ScaffoldExecuteGenerationStep_$$_javassist_ac79b82d-d3b6-4b4f-9c32-9372bfcacb44.java)

              at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.execute(WizardCommandControllerImpl.java:152) [ui-impl-2.0.0.Final.jar:2.0.0.Final]

              at org.jboss.forge.addon.ui.impl.controller.NoUIWizardControllerDecorator.execute(NoUIWizardControllerDecorator.java:149) [ui-impl-2.0.0.Final.jar:2.0.0.Final]

              at org.jboss.forge.addon.shell.aesh.CommandAdapter.execute(CommandAdapter.java:69) [shell-impl-2.0.0.Final.jar:2.0.0.Final]

              at org.jboss.aesh.console.AeshConsoleImpl$AeshConsoleCallbackImpl.execute(AeshConsoleImpl.java:295) [aesh-0.48.jar:0.48]

              at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:41) [aesh-0.48.jar:0.48]

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

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

              at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]

            Caused by: java.lang.IllegalArgumentException

              at org.eclipse.jdt.core.dom.SimpleName.setIdentifier(SimpleName.java:194)

              at org.eclipse.jdt.core.dom.AST.newSimpleName(AST.java:2045)

              at org.eclipse.jdt.core.dom.AST.newName(AST.java:1795)

              at org.jboss.forge.parser.java.impl.AbstractJavaSource.setPackage(AbstractJavaSource.java:528)

              at org.jboss.forge.parser.java.impl.AbstractJavaSource.setPackage(AbstractJavaSource.java:55)

              at org.jboss.forge.addon.scaffold.faces.FacesScaffoldProvider.generateFromEntity(FacesScaffoldProvider.java:710)

              ... 26 more

            • 3. Re: [forge-users] Scaffold error in Forge 2.0
              George Gastaldi Master

              Hi Denis,

               

              Thanks for you response. That is because your project package contains a

              reserved word (package). We already have a JIRA to fix this

              (https://issues.jboss.org/browse/FORGE-997), but it was not implemented

              yet.

               

              In the meantime, please use a valid package name.

               

              Best Regards,

               

              George Gastaldi

               

               

              On 03-02-2014 17:26, forge-users@lists.jboss.org wrote:

              Hi George,

               

              The command line is: scaffold-generate --webRoot / --overwrite yes --targets com.package.Candidato

               

              The log is:

              17:24:29,950 WARNING (AeshProcess: 1) class org.jboss.forge.addon.scaffold.faces.metawidget.inspector.ForgeInspector must be immutable, but appears to have a setter method (public void org.jboss.forge.addon.scaffold.faces.metawidget.inspector.ForgeInspector.setTypeUnderInspection(java.lang.String))

              17:24:30,067 SEVERE (AeshProcess: 1) Failed to execute due to exception.: java.lang.RuntimeException: Error generating default scaffolding: null

                 at org.jboss.forge.addon.scaffold.faces.FacesScaffoldProvider.generateFromEntity(FacesScaffoldProvider.java:774)

                 at org.jboss.forge.addon.scaffold.faces.FacesScaffoldProvider.generateFrom(FacesScaffoldProvider.java:222)

                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                 at java.lang.reflect.Method.invoke(Method.java:606)

                 at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:59)

                 at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34)

                 at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:75)

                 at org.jboss.forge.addon.facets.AbstractFacet_$$_javassist_9b860e33-ef8c-41ab-8259-49b22e97fbab.generateFrom(AbstractFacet_$$_javassist_9b860e33-ef8c-41ab-8259-49b22e97fbab.java)

                 at org.jboss.forge.addon.scaffold.impl.ui.ScaffoldExecuteGenerationStep.execute(ScaffoldExecuteGenerationStep.java:63)

                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                 at java.lang.reflect.Method.invoke(Method.java:606)

                 at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(ClassLoaderInterceptor.java:59)

                 at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:34)

                 at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(ClassLoaderInterceptor.java:75)

                 at org.jboss.forge.addon.scaffold.impl.ui.ScaffoldExecuteGenerationStep_$$_javassist_ac79b82d-d3b6-4b4f-9c32-9372bfcacb44.execute(ScaffoldExecuteGenerationStep_$$_javassist_ac79b82d-d3b6-4b4f-9c32-9372bfcacb44.java)

                 at org.jboss.forge.addon.ui.impl.controller.WizardCommandControllerImpl.execute(WizardCommandControllerImpl.java:152)

                 at org.jboss.forge.addon.ui.impl.controller.NoUIWizardControllerDecorator.execute(NoUIWizardControllerDecorator.java:149)

                 at org.jboss.forge.addon.shell.aesh.CommandAdapter.execute(CommandAdapter.java:69)

                 at org.jboss.aesh.console.AeshConsoleImpl$AeshConsoleCallbackImpl.execute(AeshConsoleImpl.java:295)

                 at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:41)

                 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:724)

              Caused by: java.lang.IllegalArgumentException

                 at org.eclipse.jdt.core.dom.SimpleName.setIdentifier(SimpleName.java:194)

                 at org.eclipse.jdt.core.dom.AST.newSimpleName(AST.java:2045)

                 at org.eclipse.jdt.core.dom.AST.newName(AST.java:1795)

                 at org.jboss.forge.parser.java.impl.AbstractJavaSource.setPackage(AbstractJavaSource.java:528)

                 at org.jboss.forge.parser.java.impl.AbstractJavaSource.setPackage(AbstractJavaSource.java:55)

                 at org.jboss.forge.addon.scaffold.faces.FacesScaffoldProvider.generateFromEntity(FacesScaffoldProvider.java:710)

                 ... 26 more

               

              Posted by forums

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

               

              _______________________________________________

              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

               

              1 of 1 people found this helpful
              • 4. Re: Scaffold error in Forge 2.0
                Denis Cassiano Newbie

                Hi George,

                 

                Sorry for my mistake, but the correct package name is com.200four.projects.pleito and no have reservers words... My issue still give me a headache, rs...

                I test with a downgrade to Forge 1.4.4 and the scaffold works file

                • 5. Re: [forge-users] Scaffold error in Forge 2.0
                  George Gastaldi Master

                  Can you provide us with the exact steps to reproduce this issue?

                   

                  Em 04/02/2014, às 14:43, forge-users@lists.jboss.org escreveu:

                   

                  Hi George,

                   

                  Sorry for my mistake, but the correct package name is com.200four.projects.pleito and no have reservers words... My issue still give me a headache, rs...

                  I test with a downgrade to Forge 1.4.4 and the scaffold works file

                   

                  Posted by forums

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

                  _______________________________________________

                  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

                   

                   

                  • 6. Re: Scaffold error in Forge 2.0
                    Vineet Reynolds Apprentice

                    Hello Denis,

                         Could you please attach a sample project so that we can reproduce this ? We're unable to reproduce this by running the usual commands, so I suspect this is something to do with the class, method or field names within your project.

                     

                    Thanks,

                    Vineet

                    1 of 1 people found this helpful
                    • 7. Re: Re: Scaffold error in Forge 2.0
                      Denis Cassiano Newbie

                      Hi Vineet and George,

                       

                      Sorry for my delay, but i still with errors in Forge 2, but, in Forge 1.44 i can run scaffould normal and without errors.

                      In attach my project with one entity. If can help in get a solution, i'm using Java 1.7.41 and Mac Os X 10.9