9 Replies Latest reply on Aug 23, 2012 1:41 PM by Lincoln Baxter III

    Random NullPointerExceptions on faces setup, beans setup, persistence setup

    daniel.todt Newbie

      Hello, good morning.

       

      I'm having some problems to start the development using the JBoss Forge.

      Some problems are going to set up the project.

       

      See the code below.

       

       

      [no project] Desenvolvimento $ new-project --named TestFaces --topLevelPackage br.com.test --type war --projectFolder testfaces

      ***SUCCESS*** Created project [TestFaces] in new working directory [E:\/Desenvolvimento/testfaces]

      Wrote E:\/Desenvolvimento/testfaces

      Wrote E:\/Desenvolvimento/testfaces/pom.xml

      Wrote E:\/Desenvolvimento/testfaces/src/main/webapp

      Wrote E:\/Desenvolvimento/testfaces/src/main/java

      Wrote E:\/Desenvolvimento/testfaces/src/test/java

      Wrote E:\/Desenvolvimento/testfaces/src/main/resources

      Wrote E:\/Desenvolvimento/testfaces/src/test/resources

      Wrote E:\/Desenvolvimento/testfaces/src/main/java/br/com/test

      Wrote E:\/Desenvolvimento/testfaces/src/main/resources/META-INF/forge.xml

      [TestFaces] testfaces $ faces setup

      1

      Wrote E:\/Desenvolvimento/testfaces/src/main/webapp/WEB-INF/faces-config.xml

      ***ERROR*** [faces setup] Could not complete installation of facet: [forge.spec.jsf.api]. Installation was aborted by the Facet during installation.

      [TestFaces] testfaces $ beans setup

      Wrote E:\/Desenvolvimento/testfaces/src/main/webapp/WEB-INF/beans.xml

      Wrote E:\/Desenvolvimento/testfaces/pom.xml

      ***ERROR*** [beans setup] java.lang.NullPointerException

      [TestFaces] testfaces $ persistence setup

      ? [provider=ARG (of type org.jboss.forge.spec.javaee.jpa.api.JPAProvider)]: HIBERNATE

      ? [container=ARG (of type org.jboss.forge.spec.javaee.jpa.api.JPAContainer)]: JBOSS_AS7

      ***ERROR*** [persistence setup] null

      [TestFaces] testfaces $

       

       

      Note:

      - My development environment is Windows 7 32bit;

      - On my network there is a proxy, but I managed to install the plugins jboss-AS7 and primefaces without problems, so the problem should not be the proxy;

      - I tried using the JBoss Forge built into Eclipse, and it does not work but do not show up the errors;

      - One thing I realized is there is no in my folder '~.forge', a file named 'config.xml', it was not created when I ran the JBoss Forge for the first time. What would be the complete syntax for the formation of this file? That may lack the file, the JBoss Forge can not find something?

        • 1. Re: Random NullPointerExceptions on faces setup, beans setup, persistence setup
          Lincoln Baxter III Master

          I think this may actually still be a proxy issue (just create config.xml if it does not already exist, and follow these instructions to set up your proxy settings.)

           

          http://forge.jboss.org/docs/using/configure-proxy.html

           

          Let me know if that helps, but we should certainly improve the error messaging here.

           

          Thanks!

          • 2. Re: Random NullPointerExceptions on faces setup, beans setup, persistence setup
            George Gastaldi Master

            Hi Daniel,

             

            This usually indicates a proxy issue. Can you test it with the latest snapshot version ?

            Also, just to confirm, can you test in an environment without a proxy in this same OS?

             

            Best Regards,

             

            George Gastaldi

            • 3. Re: Random NullPointerExceptions on faces setup, beans setup, persistence setup
              daniel.todt Newbie

              Hi ..

               

              I understand, can be proxy issue, but this way, the Forge does not download the pluggin jboss-AS7, right?

              About proxy, yes, I could configure the proxy, but as I said before, I do not have the config.xml file, you could post a complete model of it?

              About using the latest snapshot, I'm downloading it now to test, meanwhile, could you send me a config.xml file?

               

              Thank you.

              • 4. Re: Random NullPointerExceptions on faces setup, beans setup, persistence setup
                Lincoln Baxter III Master

                1. <configuration>
                2. <proxy>
                3.   <host>proxy-host-name</host>
                4.   <port>proxy-port</port>
                5.   <!-- The entries below are necessary only if your proxy needs authentication -->
                6.   <username>proxy-user-name</username>
                7.   <password>proxy-password</password>
                8. </proxy>
                9. </configuration>
                • 5. Re: Random NullPointerExceptions on faces setup, beans setup, persistence setup
                  daniel.todt Newbie

                  I configured the proxy and restarted the Forge.

                  I am now using version 1.0.7-SNAPSHOT.

                  But still does not work.

                   

                  Is there any additional configuration, with the exception of FORGE_HOME and config.xml?

                   

                  One thing I'm having problems too, is to reopen a project, when I run the command cd <projectFolder>/ appears the error below.

                   

                  [no project] Desenvolvimento $ new-project --named Test3 --topLevelPackage br.com.test3 --type war --projectFolder test3

                  ***SUCCESS*** Created project [Test3] in new working directory [E:\/Desenvolvimento/test3]

                  Wrote E:\/Desenvolvimento/test3

                  Wrote E:\/Desenvolvimento/test3/pom.xml

                  Wrote E:\/Desenvolvimento/test3/src/main/webapp

                  Wrote E:\/Desenvolvimento/test3/src/main/java

                  Wrote E:\/Desenvolvimento/test3/src/test/java

                  Wrote E:\/Desenvolvimento/test3/src/main/resources

                  Wrote E:\/Desenvolvimento/test3/src/test/resources

                  Wrote E:\/Desenvolvimento/test3/src/main/java/br/com/test3

                  Wrote E:\/Desenvolvimento/test3/src/main/resources/META-INF/forge.xml

                  [Test3] test3 $ faces setup

                  Wrote E:\/Desenvolvimento/test3/src/main/webapp/WEB-INF/faces-config.xml

                  Wrote E:\/Desenvolvimento/test3/pom.xml

                  ***ERROR*** [faces setup] null

                  [Test3] test3 $ beans setup

                  Wrote E:\/Desenvolvimento/test3/src/main/webapp/WEB-INF/beans.xml

                  ***ERROR*** [beans setup] null

                  [Test3] test3 $ persistence setup

                  ? [provider=ARG (of type org.jboss.forge.spec.javaee.jpa.api.JPAProvider)]: HIBERNATE

                  ? [container=ARG (of type org.jboss.forge.spec.javaee.jpa.api.JPAContainer)]: JBOSS_AS7

                  ***ERROR*** [persistence setup] null

                  [Test3] test3 $

                  [Test3] test3 $ cd ..

                  [no project] Desenvolvimento $ cd test3/

                  ***ERROR*** [cd] null

                  [no project] Desenvolvimento $

                   

                   

                  Thanks.

                  • 6. Re: Random NullPointerExceptions on faces setup, beans setup, persistence setup
                    Lincoln Baxter III Master

                    Could you please type 'set VERBOSE true' and post the stack trace? Thanks.

                    • 7. Re: Random NullPointerExceptions on faces setup, beans setup, persistence setup
                      daniel.todt Newbie

                      Ok ..

                       

                      [no project] Desenvolvimento $ set VERBOSE true

                      [no project] Desenvolvimento $ cd test3/

                      ***ERROR*** [cd] null

                      org.jboss.forge.shell.exceptions.CommandExecutionException

                              at org.jboss.forge.shell.command.Execution.perform(Execution.java:139)

                              at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:109)

                              at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:47)

                              at org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:817)

                              at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:840)

                              at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:630)

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

                              at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)

                              at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)

                              at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)

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

                              at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)

                              at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)

                              at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)

                              at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)

                              at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)

                              at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)

                              at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)

                              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)

                              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)

                              at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)

                              at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)

                              at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)

                              at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)

                              at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:147)

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

                      Caused by: java.lang.reflect.InvocationTargetException

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

                              at org.jboss.forge.shell.command.Execution.perform(Execution.java:134)

                              ... 31 more

                      Caused by: java.lang.NullPointerException

                              at java.lang.String.contains(String.java:2124)

                              at org.apache.maven.model.building.DefaultModelBuilder.containsCoordinates(DefaultModelBuilder.java:1047)

                              at org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement(DefaultModelBuilder.java:948)

                              at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:403)

                              at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:374)

                              at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:365)

                              at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232)

                              at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:141)

                              at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:102)

                              at org.jboss.forge.maven.facets.MavenCoreFacetImpl.getPartialProjectBuildingResult(MavenCoreFacetImpl.java:86)

                              at org.jboss.forge.maven.facets.MavenCoreFacetImpl.resolveProperties(MavenCoreFacetImpl.java:304)

                              at org.jboss.forge.maven.facets.MavenDependencyFacet.resolveProperties(MavenDependencyFacet.java:390)

                              at org.jboss.forge.maven.facets.MavenDependencyFacet.hasEffectiveDependency(MavenDependencyFacet.java:170)

                              at org.jboss.forge.spec.javaee.BaseJavaEEFacet.isInstalled(BaseJavaEEFacet.java:64)

                              at org.jboss.forge.spec.javaee.jpa.PersistenceFacetImpl.isInstalled(PersistenceFacetImpl.java:83)

                              at org.jboss.forge.project.BaseProject.registerFacet(BaseProject.java:153)

                              at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)

                              at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:186)

                              at org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:178)

                              at org.jboss.forge.project.services.ProjectFactory.findProjectRecursively(ProjectFactory.java:117)

                              at org.jboss.forge.shell.project.ProjectInitializer.doInit(ProjectInitializer.java:91)

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

                              at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)

                              at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)

                              at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)

                              at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)

                              at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)

                              at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)

                              at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)

                              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)

                              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)

                              at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)

                              at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)

                              at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:628)

                              at org.jboss.weld.event.EventImpl.fire(EventImpl.java:75)

                              at org.jboss.forge.shell.project.CurrentProject.setCurrentResource(CurrentProject.java:80)

                              at org.jboss.forge.shell.ShellImpl.setCurrentResource(ShellImpl.java:1238)

                              at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.setCurrentResource(ShellImpl$Proxy$_$$_WeldClientProxy.java)

                              at org.jboss.forge.shell.plugins.builtin.ChangeDirectoryPlugin.run(ChangeDirectoryPlugin.java:64)

                              ... 36 more

                      [no project] Desenvolvimento $

                       

                       

                      EDIT:

                      Now, with this parameter 'VERBOSE', shows the error that occurs when I run the command 'faces setup' ..

                      It seems to me the same error.

                      • 8. Re: Random NullPointerExceptions on faces setup, beans setup, persistence setup
                        Steffen Bartsch Newbie

                        Hi,

                         

                        someone risolved that issue?

                         

                         

                        I got the same problem with same stacktrace

                        (configured proxy which seems to be working:

                             [FirstWebApp] first $ forge find-plugin

                             Connecting to remote repository [https://raw.github.com/forge/plugin-repository/master/repository.yaml]... connected!

                        )

                         

                        Thx, St.

                        • 9. Re: Random NullPointerExceptions on faces setup, beans setup, persistence setup
                          Lincoln Baxter III Master

                          I'm not really sure what's happening here. Could you create an issue and attach your project to it? https://issues.jboss.org/browse/FORGE

                           

                          Thanks,

                          Lincoln