6 Replies Latest reply on Jan 5, 2010 2:31 PM by I need a real name

    jsf numberguess on jboss-6.0.0.M1, PropertyNotFoundException

    I need a real name Newbie
      Hi!
      I have followed the instructions on http://docs.jboss.org/weld/reference/1.0.0/en-US/html/gettingstarted.html#jbossas
      -> 6.2. Deploying to JBoss AS
      But I dont get the example jsf numberguess to work.
      Please help me.

      This is the error after deploying the app, starting the server and pressing the reset button on the http://localhost:8080/weld-numberguess/home.jsf:

      type Exception report

      message
      description The server encountered an internal error () that prevented it from fulfilling this request.
      exception
      javax.servlet.ServletException: javax.el.PropertyNotFoundException: /home.xhtml @29,107 action="#{game.reset}": Target Unreachable, identifier 'game' resolved to null
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:323)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      root cause

      javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: /home.xhtml @29,107 action="#{game.reset}": Target Unreachable, identifier 'game' resolved to null
           javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:95)
           com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
           javax.faces.component.UICommand.broadcast(UICommand.java:315)
           javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:774)
           javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:942)
           com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
           com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
           com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:310)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      root cause

      javax.el.PropertyNotFoundException: /home.xhtml @29,107 action="#{game.reset}": Target Unreachable, identifier 'game' resolved to null
           com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:100)
           javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
           com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
           javax.faces.component.UICommand.broadcast(UICommand.java:315)
           javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:774)
           javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:942)
           com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
           com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
           com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:310)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      note The full stack trace of the root cause is available in the JBoss Web/2.1.6.GA logs.

      Regards
      Tiny
        • 1. Re: jsf numberguess on jboss-6.0.0.M1, PropertyNotFoundException
          Nicklas Karlsson Master

          There is no deploy-time exception? One would think that since game can't be resolved, there would have been a problem booting

          • 2. Re: jsf numberguess on jboss-6.0.0.M1, PropertyNotFoundException
            I need a real name Newbie
            Hi!
            Thanks for replying so soon.
            I'm not exactly sure where I would find that deploy-time-exception if there is one.
            After having deployed and undeployed the numberguess once, I deployed it a second time. (the first time I could not even view home.jsf - http error 404).
            The second "ant deploy"- command produced this info in command prompt:

            C:\MyPrograms\weld\examples\jsf\numberguess>ant deploy
            Buildfile: build.xml

            package:
                 [java] [INFO] Scanning for projects...
                 [java] [INFO] -------------------------------------------------------------
            -----------
                 [java] [INFO] Building Weld Examples: Numberguess
                 [java] [INFO]    task-segment: [install]
                 [java] [INFO] -------------------------------------------------------------
            -----------
                 [java] [INFO] [enforcer:enforce {execution: enforce}]
                 [java] [INFO] [build-helper:maven-version {execution: default}]
                 [java] [INFO] [build-helper:parse-version {execution: default}]
                 [java] [INFO] [buildnumber:create {execution: set-build-properties}]
                 [java] [INFO] Checking for local modifications: skipped.
                 [java] [INFO] Updating project files from SCM: skipped.
                 [java] [INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
                 [java] [INFO] Working directory: C:\MyPrograms\weld\examples\jsf\numbergues
            s
                 [java] Provider message:
                 [java] The svn command failed.
                 [java] Command output:
                 [java] 'svn' is not recognized as an internal or external command,
                 [java] operable program or batch file.
                 [java]
                 [java] [WARNING] Cannot get the revision information from the scm repositor
            y, proceeding with revision of unavailable :
                 [java] Error!
                 [java] [INFO] Storing buildNumber: unavailable at timestamp: den 4 januari
            2010 17:50:08 CET
                 [java] [INFO] [resources:resources]
                 [java] [INFO] Using 'UTF-8' encoding to copy filtered resources.
                 [java] [INFO] skip non existing resourceDirectory C:\MyPrograms\weld\exampl
            es\jsf\numberguess\src\main\resources
                 [java] [INFO] [compiler:compile]
                 [java] [INFO] Nothing to compile - all classes are up to date
                 [java] [INFO] [resources:testResources]
                 [java] [INFO] Using 'UTF-8' encoding to copy filtered resources.
                 [java] [INFO] skip non existing resourceDirectory C:\MyPrograms\weld\exampl
            es\jsf\numberguess\src\test\resources
                 [java] [INFO] [compiler:testCompile]
                 [java] [INFO] No sources to compile
                 [java] [INFO] [surefire:test]
                 [java] [INFO] No tests to run.
                 [java] [INFO] [war:war]
                 [java] [INFO] Packaging webapp
                 [java] [INFO] Assembling webapp[weld-jsf-numberguess] in [C:\MyPrograms\wel
            d\examples\jsf\numberguess\target\weld-numberguess]
                 [java] [INFO] Scope of dependency[Dependency {groupId=javax.annotation, art
            ifactId=jsr250-api, version=1.0, type=jar}] has changed (compile -> provided).
                 [java] [INFO] Scope of dependency[Dependency {groupId=javax.faces, artifact
            Id=jsf-api, version=2.0.0-RC, type=jar}] has changed (compile -> provided).
                 [java] [INFO] Dependency[Dependency {groupId=org.glassfish.web, artifactId=
            el-impl, version=2.1.2-b04, type=jar}] has changed (was Dependency {groupId=org.
            glassfish.web, artifactId=el-impl, version=2.1.2-b04, type=jar}).
                 [java] [INFO] Dependency[Dependency {groupId=javax.faces, artifactId=jsf-im
            pl, version=2.0.0-RC, type=jar}] has been removed from the project.
                 [java] [INFO] Dependency[Dependency {groupId=javax.servlet, artifactId=jstl
            , version=1.2, type=jar}] has been removed from the project.
                 [java] [INFO] Dependency[Dependency {groupId=org.jboss.weld.servlet, artifa
            ctId=weld-servlet, version=1.0.0-CR2, type=jar}] has been removed from the proje
            ct.
                 [java] [INFO] Processing war project
                 [java] [INFO] Copying webapp webResources[C:\MyPrograms\weld\examples\jsf\n
            umberguess\src/main/webapp-jboss5] to[C:\MyPrograms\weld\examples\jsf\numbergues
            s\target\weld-numberguess]
                 [java] [INFO] Copying webapp resources[C:\MyPrograms\weld\examples\jsf\numb
            erguess\src\main\webapp]
                 [java] [INFO] Webapp assembled in [469 msecs]
                 [java] [INFO] Building war: C:\MyPrograms\weld\examples\jsf\numberguess\tar
            get\weld-numberguess.war
                 [java] [INFO] Preparing source:jar
                 [java] [WARNING] Removing: jar from forked lifecycle, to prevent recursive
            invocation.
                 [java] [INFO] [enforcer:enforce {execution: enforce}]
                 [java] [INFO] [build-helper:maven-version {execution: default}]
                 [java] [INFO] [build-helper:parse-version {execution: default}]
                 [java] [INFO] [buildnumber:create {execution: set-build-properties}]
                 [java] [INFO] [source:jar {execution: attach-sources}]
                 [java] [INFO] Building jar: C:\MyPrograms\weld\examples\jsf\numberguess\tar
            get\weld-numberguess-sources.jar
                 [java] [INFO] [install:install]
                 [java] [INFO] Installing C:\MyPrograms\weld\examples\jsf\numberguess\target
            \weld-numberguess.war to C:\Documents and Settings\Administrator\.m2\repository\
            org\jboss\weld\examples\jsf\weld-jsf-numberguess\1.0.0-CR2\weld-jsf-numberguess-
            1.0.0-CR2.war
                 [java] [INFO] Installing C:\MyPrograms\weld\examples\jsf\numberguess\target
            \weld-numberguess-sources.jar to C:\Documents and Settings\Administrator\.m2\rep
            ository\org\jboss\weld\examples\jsf\weld-jsf-numberguess\1.0.0-CR2\weld-jsf-numb
            erguess-1.0.0-CR2-sources.jar
                 [java] [INFO] -------------------------------------------------------------
            -----------
                 [java] [INFO] BUILD SUCCESSFUL
                 [java] [INFO] -------------------------------------------------------------
            -----------
                 [java] [INFO] Total time: 36 seconds
                 [java] [INFO] Finished at: Mon Jan 04 17:50:18 CET 2010
                 [java] [INFO] Final Memory: 20M/39M
                 [java] [INFO] -------------------------------------------------------------
            -----------

            deploy:
                 [copy] Copying 1 file to C:\MyPrograms\JBoss\jboss-6.0.0.M1\server\default\
            deploy
                 [echo] The app can be accessed at http://localhost:8080/weld-numberguess

            BUILD SUCCESSFUL
            Total time: 41 seconds
            C:\MyPrograms\weld\examples\jsf\numberguess>

            Best reg/
            Tiny





            • 3. Re: jsf numberguess on jboss-6.0.0.M1, PropertyNotFoundException
              Nicklas Karlsson Master

              • Download a fresh JBoss 6.0.0 M1

              • Download a fresh Weld 1.0.0 (you are running CR2?)

              • build numberguess

              • drop the war into the default/deploy, startup

              • show any boot/deploy errors


              • 4. Re: jsf numberguess on jboss-6.0.0.M1, PropertyNotFoundException
                I need a real name Newbie
                Ok, just to make sure I understand correctly:

                You wrote:
                "drop the war into the default/deploy, startup"

                Do you mean
                manually drop the war in C:\...\JBoss\server\default\?

                Or do you mean
                make sure the war gets there?
                (it seams to jump in there with "ant deploy" command.)

                / T
                • 6. Re: jsf numberguess on jboss-6.0.0.M1, PropertyNotFoundException
                  I need a real name Newbie
                  OK, I've started from scratch again.
                  This time I realized that there is missing a whitespace in the reference guide. ( inexperienced to both Ant and JBoss I did not figure that out before)

                  http://docs.jboss.org/weld/reference/1.0.0/en-U/html/gettingstarted.html#prerequisites:
                  <quote>
                  6.2. Deploying to JBoss AS
                  /.../
                  In order for the build scripts to know where to deploy the example, you have to tell them where to find your JBoss AS installation (i.e., JBOSS_HOME). Create a new file namedlocal.build.properties in the examples directory of the Weld distribution and assign the path of your JBoss AS installation to the property key jboss.home, as follows:
                  </qoute>


                  Whether its the renaming from namedlocal.build.properties to
                  local.build.properties or it was a boot problem I dont know. But at least it's working now!

                  Anyway, I appreciate your help & service! Thanx.

                  / T
                  ---
                  Nothing is obvious to the unknowing =)