6 Replies Latest reply on Jan 26, 2011 10:59 AM by pulsarsitra

    Need help,about the example registration

    challen

      I created a seam web project with jboss developer studio 1.0
      ,jboss 4.2.0 and seam 1.2.AP.
      I copy the source code,jspx files and other xml files into the project folder.
      when i run this project,throw exceptions:



      type Exception report
      
      
      message 
      
      
      description The server encountered an internal error () that prevented it from fulfilling this request.
      
      
      exception 
      
      
      javax.servlet.ServletException: Could not instantiate Seam component: register
      
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
      
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      
      
      root cause 
      
      
      org.jboss.seam.InstantiationException: Could not instantiate Seam component: register
      
           org.jboss.seam.Component.newInstance(Component.java:1740)
      
           org.jboss.seam.Component.getInstance(Component.java:1643)
      
           org.jboss.seam.Component.getInstance(Component.java:1610)
      
           org.jboss.seam.Component.getInstance(Component.java:1604)
      
           org.jboss.seam.jsf.SeamELResolver.getValue(SeamELResolver.java:49)
      
           javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
      
           com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
      
           org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
      
           org.apache.el.parser.AstValue.getTarget(AstValue.java:42)
      
           org.apache.el.parser.AstValue.invoke(AstValue.java:127)
      
           org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      
           org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
      
           javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
      
           com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
      
           javax.faces.component.UICommand.broadcast(UICommand.java:383)
      
           org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
      
           org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
      
           org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:329)
      
           com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
      
           com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      
           com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      
      
      root cause 
      
      
      javax.naming.NameNotFoundException: RegisterAction not bound
      
           org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
      
           org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
      
           org.jnp.server.NamingServer.getObject(NamingServer.java:543)
      
           org.jnp.server.NamingServer.lookup(NamingServer.java:267)
      
           org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
      
           org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
      
           javax.naming.InitialContext.lookup(Unknown Source)
      
           org.jboss.seam.Component.instantiateSessionBean(Component.java:1107)
      
           org.jboss.seam.Component.instantiate(Component.java:1093)
      
           org.jboss.seam.Component.newInstance(Component.java:1736)
      
           org.jboss.seam.Component.getInstance(Component.java:1643)
      
           org.jboss.seam.Component.getInstance(Component.java:1610)
      
           org.jboss.seam.Component.getInstance(Component.java:1604)
      
           org.jboss.seam.jsf.SeamELResolver.getValue(SeamELResolver.java:49)
      
           javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
      
           com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
      
           org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
      
           org.apache.el.parser.AstValue.getTarget(AstValue.java:42)
      
           org.apache.el.parser.AstValue.invoke(AstValue.java:127)
      
           org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      
           org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
      
           javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
      
           com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
      
           javax.faces.component.UICommand.broadcast(UICommand.java:383)
      
           org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
      
           org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
      
           org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:329)
      
           com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
      
           com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      
           com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      
      
      note The full stack trace of the root cause is available in the JBossWeb/2.0.0.GA_CP01 logs.
      
      



      Who can help me? thanks very much.

        • 1. Re: Need help,about the example registration
          pmuir

          The examples are designed to be run via ant scripts from the command line. Try ant deploy from examples/registration

          • 2. Re: Need help,about the example registration
            challen

            Thanks Pete Muir


            I used ant scripts deploy this example success and run it no problems before submit this topic.


            I created a seam project with jboss developer studio,and copy the example's java source code and xml files into my project,and modify some parameters according my project.
            I deploy it as WAR,when i run my project,it throws exceptions looks like above.


            Is any problem of my environment or xml files or deploy parameters?


            Can you give me the email or IM tools such as MSN,Skype,then we can exchange easily.


            There are mine's
            MSN:merachen@hotmail.com
            Skype:challen2007


            Thanks





            • 3. Re: Need help,about the example registration
              nickarls

              Start with a fresh project and deploy. Does it work?
              Do one modification at a time. Deploy in between. Tell us what you did (and paste in the changes here) between the "works" and "doesn't work".

              • 4. Re: Need help,about the example registration
                challen

                Of course
                I made a new installation of jboss developer studio and created a new seam project (deploy as WAR),if I don't change any,it works.


                I copy the Register.java,RegisterAction.java,User.java,register.jspx,registered.jspx into my project,and change the project-ds.xml using mysql connection.when i click then Register button on the register.jspx page,thows exceptions.see above.



                else if i created a new seam project,the jboss tools will generated a Authenticator.java,It can write customize authentication logic,for example,i annotate a EntityManager follow the booking example,then my project doesn't work,throws Could not instantiate Seam component: authenticator
                .




                how can i resolve this problem.


                Who can help me?Remote Assistance is better.







                • 5. Re: Need help,about the example registration
                  pmuir

                  You have a jndi binding - does the jndi-pattern ear prefix match the name of your ear.

                  • 6. Re: Need help,about the example registration
                    pulsarsitra

                    I am also getting the same error, have you found the solution? please help me if you have the solution.


                    thanks.