1 2 Previous Next 28 Replies Latest reply on Oct 23, 2006 8:26 AM by Mohammad Norouzi

    problem in a simple seam application

    Mohammad Norouzi Novice

      Hi
      I am new to JBoss Seam and write a simple application but when the first page appears and I press the button to submit information a "Conversion Error" exception displays in the page. the application is a registration sample I read from a document of seam.

      web.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.4"
       xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      
      
       <!-- Seam -->
      
       <listener>
       <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
       </listener>
      
       <!-- MyFaces -->
       <!--
       <listener>
       <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
       </listener>
       -->
      
       <!-- JSF RI -->
       <listener>
       <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
       </listener>
      
       <!-- Propagate conversations across redirects -->
       <filter>
       <filter-name>Seam Redirect Filter</filter-name>
       <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>Seam Redirect Filter</filter-name>
       <url-pattern>*.seam</url-pattern>
       </filter-mapping>
      
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>client</param-value>
       </context-param>
      
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
      
       <!-- Faces Servlet Mapping -->
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.seam</url-pattern>
       </servlet-mapping>
      
      </web-app>
      


      RegisterAction.java
      package com.seam.web.action;
      
      import java.util.List;
      
      import javax.ejb.Stateless;
      import javax.persistence.EntityManager;
      import javax.persistence.PersistenceContext;
      
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Logger;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.core.FacesMessages;
      import org.jboss.seam.log.Log;
      
      import com.seam.dto.User;
      
      @Stateless
      @Name("register")
      public class RegisterAction implements Register{
      
       @In(create=true)
       private User user;
      
       @PersistenceContext
       private EntityManager em;
      
       @Logger
       private Log logger;
      
       public String register() {
       System.out.println("Start....");
       List registered = em.createQuery("select username from User where username = :u")
       .setParameter("u",user.getUsername())
       .getResultList();
       System.out.println("222222222");
       if(registered.size() == 0) {
       em.persist(user);
       logger.info("user #{user.username} registered.");
       return "/pages/registered.jsp";
       }
       FacesMessages.instance().add("user #{user.username} already exists.");
      
       return null;
       }
      
      }
      
      


      register.jsp
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="http://jboss.com/products/seam/taglib" prefix="s" %>
      <html>
       <head>
       <title>Register New User</title>
       </head>
       <body>
       <f:view>
       <h:form>
       <table border="0">
       <s:validateAll>
       <tr>
       <td>Username</td>
       <td><h:inputText value="#{user.username}" required="true"/></td>
       </tr>
       <tr>
       <td>Full Name</td>
       <td><h:inputText value="#{user.fullName}" required="true"/></td>
       </tr>
       <tr>
       <td>Password</td>
       <td><h:inputSecret value="#{user.password}" required="true"/></td>
       </tr>
       </s:validateAll>
       </table>
       <h:messages/>
       <h:commandButton type="submit" value="Register" action="#{register.register}"/>
       </h:form>
       </f:view>
       </body>
      </html>
      


      any help will be appreciated

        • 1. Re: problem in a simple seam application
          Pete Muir Master

          Please show the User class

          • 2. Re: problem in a simple seam application
            Mohammad Norouzi Novice

             

            "petemuir" wrote:
            Please show the User class


            hi, here is User class:

            package com.seam.dto;
            
            import javax.persistence.Column;
            import javax.persistence.Entity;
            import javax.persistence.Id;
            import javax.persistence.Table;
            
            import static org.jboss.seam.ScopeType.SESSION;
            
            import org.hibernate.annotations.AccessType;
            import org.jboss.seam.annotations.Name;
            import org.jboss.seam.annotations.Scope;
            
            
            @Entity
            @Name("user")
            @Table(name="user")
            @Scope(SESSION)
            @AccessType("field")
            public class User {
            
             @Id
             @Column(name="username")
             String username;
             @Column(name="password")
             String password;
             @Column(name="full_name")
             String fullName;
            
             public String getFullName() {
             return fullName;
             }
             public void setFullName(String fullName) {
             this.fullName = fullName;
             }
             public String getPassword() {
             return password;
             }
             public void setPassword(String password) {
             this.password = password;
             }
             public String getUsername() {
             return username;
             }
             public void setUsername(String username) {
             this.username = username;
             }
            
            
            }
            
            


            and components.xml :
            <components>
             <component name="org.jboss.seam.core.init">
             <!-- JNDI name pattern for JBoss EJB 3.0 -->
             <property name="jndiPattern">#{ejbName}/local</property>
             </component>
            </components>
            


            • 3. Re: problem in a simple seam application
              Pete Muir Master

              I suspect that 'user' is null when you attempt to write to it. Use your debugger to check. If so you'll need to think about desgining the application so that user isn't null at that point ;)

              e.g. (I think this should work :)

              @In(create=true)
              @Out
              private User user;



              • 4. Re: problem in a simple seam application
                Mohammad Norouzi Novice

                petemuir,

                I did it so but nothing changed. I put @In and @Out. if the user was null it would threw a NullPointerException but there is no exception and even no warning. I put some log in the action method but it seems it never reach to that code and during the jsf request cycle, response gets failed.

                any idea?

                • 5. Re: problem in a simple seam application
                  Pete Muir Master

                   

                  "mnrz" wrote:
                  if the user was null it would threw a NullPointerException


                  If you say so.

                  The action method wasn't called as the error occured in the apply request values phase not the invoke application phase.

                  Did you try an Exception breakpoint for ConverterException to see why it was thrown?

                  • 6. Re: problem in a simple seam application
                    Mohammad Norouzi Novice

                    Oh my god, I meant no exception throws.
                    I put try/catch but no exception throws.
                    sorry for my poor english.

                    • 7. Re: problem in a simple seam application
                      Mohammad Norouzi Novice

                      Hi Petemuir,

                      eventually I could find the problem, it was something with starting embedded Ejb container because I am using Tomcat and it was not starting properly, I put SeamExceptionFilter and after that all exceptions have emerged in Tomcat console.

                      after all, I've got a new problem, after click on button to submit the form following exception throws:

                      I think SeamPhaseListener diclared in faces-config.xml can not bind the RegisterAction class to action represented in jsp file.

                      (servlet.SeamExceptionFilter 119 ) uncaught exception handled by Seam
                      javax.servlet.ServletException: Error calling action method of component with id _idJsp0:_idJsp6
                       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
                       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                       at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
                       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
                       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.ja
                      va:744)
                       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
                       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
                       at java.lang.Thread.run(Thread.java:595)
                      ([/registration].[Faces Servlet] 119 ) Servlet.service() for servlet Faces Servlet threw exception
                      javax.faces.FacesException: Error calling action method of component with id _idJsp0:_idJsp6
                       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
                       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
                       at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
                       at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
                       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
                       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
                       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
                       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                       at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
                       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
                       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.ja
                      va:744)
                       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
                       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
                       at java.lang.Thread.run(Thread.java:595)
                      Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{register.register}
                       at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:165)
                       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
                       ... 26 more
                      Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: register
                       at org.jboss.seam.Component.newInstance(Component.java:735)
                       at org.jboss.seam.Component.newInstance(Component.java:1308)
                       at org.jboss.seam.Component.getInstance(Component.java:1263)
                       at org.jboss.seam.Component.getInstance(Component.java:1246)
                       at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
                       at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.j
                      ava:42)
                       at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:574
                      )
                       at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
                       at org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBindingImpl.java:455)
                       at org.apache.myfaces.el.MethodBindingImpl.resolveToBaseAndProperty(MethodBindingImpl.java:180)
                       at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:114)
                       ... 27 more
                      Caused by: javax.naming.NameNotFoundException: RegisterAction not bound
                       at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
                       at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
                       at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
                       at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
                       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
                       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
                       at javax.naming.InitialContext.lookup(InitialContext.java:351)
                       at org.jboss.seam.Component.instantiate(Component.java:774)
                       at org.jboss.seam.Component.newInstance(Component.java:731)
                       ... 37 more
                      


                      another question I have is about the role of SeamExceptionFilter. If we dont use it, won't exception messages being displayed?

                      any guide greatly appreciated

                      • 8. Re: problem in a simple seam application
                        Gavin King Master

                        Set org.jboss.seam.core.init.jndiPattern=#{ejbName}/local

                        • 9. Re: problem in a simple seam application
                          Mohammad Norouzi Novice

                           

                          "gavin.king@jboss.com" wrote:
                          Set org.jboss.seam.core.init.jndiPattern=#{ejbName}/local


                          Hi Gavin,
                          I am new to Seam, would you please tell me where should I put this? in components.xml I have

                          <components>
                           <component name="org.jboss.seam.core.init">
                           <!-- JNDI name pattern for JBoss EJB 3.0 -->
                           <property name="jndiPattern">#{ejbName}/local</property>
                           </component>
                          </components>
                          


                          do I have to put that in seam.properties?

                          thank you for your reply



                          • 10. Re: problem in a simple seam application
                            Gavin King Master

                            No, that is perfectly fine.

                            • 11. Re: problem in a simple seam application
                              Mohammad Norouzi Novice

                               


                              No, that is perfectly fine.


                              so what is the problem? what should I do?
                              Please give a suggestion, I realy stuck because of this exception and can not proceed any further.

                              • 12. Re: problem in a simple seam application
                                Swen Barth Newbie

                                 

                                "mnrz" wrote:
                                "gavin.king@jboss.com" wrote:
                                Set org.jboss.seam.core.init.jndiPattern=#{ejbName}/local


                                Hi Gavin,
                                I am new to Seam, would you please tell me where should I put this? in components.xml I have

                                <components>
                                 <component name="org.jboss.seam.core.init">
                                 <!-- JNDI name pattern for JBoss EJB 3.0 -->
                                 <property name="jndiPattern">#{ejbName}/local</property>
                                 </component>
                                </components>
                                


                                do I have to put that in seam.properties?

                                thank you for your reply



                                For me this error diappeared when I put 'jboss-seam-booking/' in front of the jndiPattern (I disovered in the JNDI view that RegisterAction was registered under this node).

                                • 13. Re: problem in a simple seam application
                                  Gavin King Master

                                   

                                  For me this error disappeared when I put 'jboss-seam-booking/' in front of the jndiPattern


                                  That is the correct value for JBoss AS, but not for embeddable EJB3. (This is all in the Seam docs, of course.)

                                  But Mohammad says he is using embeddable EJB3. His problem is almost certainly that the EJB3 container did not start successfully, and he needs to post his logs.

                                  • 14. Re: problem in a simple seam application
                                    Mohammad Norouzi Novice

                                    Hi Gavin,

                                    as you said to post the logs, here is the exception stack trace.

                                    the thing I want to say is that dusing the Tomcat startup there is no exception and everything is ok and embedded Ejb start fine but when I click on the button to submit the form this exception throws:


                                    This is the startup log:

                                    (servlet.ServletContextListener 94 ) Welcome to Seam 1.0.1.GA
                                    (init.Initialization 94 ) reading components.xml
                                    (init.Initialization 94 ) reading properties from: /seam.properties
                                    (init.Initialization 94 ) reading properties from: /jndi.properties
                                    (init.Initialization 94 ) initializing Seam
                                    (seam.Component 94 ) Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA
                                    _BEAN, class: org.jboss.seam.core.Init
                                    (seam.Component 94 ) Component: org.jboss.seam.core.pages, scope: APPLICATION, type: JAV
                                    A_BEAN, class: org.jboss.seam.core.Pages
                                    (seam.Component 94 ) Component: events, scope: APPLICATION, type: JAVA_BEAN, class: org.
                                    jboss.seam.core.Events
                                    (seam.Component 94 ) Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BE
                                    AN, class: org.jboss.seam.core.Manager
                                    (seam.Component 94 ) Component: switcher, scope: PAGE, type: JAVA_BEAN, class: org.jboss
                                    .seam.core.Switcher
                                    (seam.Component 94 ) Component: redirect, scope: CONVERSATION, type: JAVA_BEAN, class: o
                                    rg.jboss.seam.core.Redirect
                                    (seam.Component 94 ) Component: httpError, scope: APPLICATION, type: JAVA_BEAN, class: o
                                    rg.jboss.seam.core.HttpError
                                    (seam.Component 94 ) Component: userPrincipal, scope: APPLICATION, type: JAVA_BEAN, clas
                                    s: org.jboss.seam.core.UserPrincipal
                                    (seam.Component 94 ) Component: isUserInRole, scope: APPLICATION, type: JAVA_BEAN, class
                                    : org.jboss.seam.core.IsUserInRole
                                    (seam.Component 94 ) Component: conversation, scope: CONVERSATION, type: JAVA_BEAN, clas
                                    s: org.jboss.seam.core.Conversation
                                    (seam.Component 94 ) Component: conversationList, scope: PAGE, type: JAVA_BEAN, class: o
                                    rg.jboss.seam.core.ConversationList
                                    (seam.Component 94 ) Component: conversationStack, scope: PAGE, type: JAVA_BEAN, class:
                                    org.jboss.seam.core.ConversationStack
                                    (seam.Component 94 ) Component: facesContext, scope: APPLICATION, type: JAVA_BEAN, class
                                    : org.jboss.seam.core.FacesContext
                                    (seam.Component 94 ) Component: pageContext, scope: APPLICATION, type: JAVA_BEAN, class:
                                     org.jboss.seam.core.PageContext
                                    (seam.Component 94 ) Component: eventContext, scope: APPLICATION, type: JAVA_BEAN, class
                                    : org.jboss.seam.core.EventContext
                                    (seam.Component 94 ) Component: sessionContext, scope: APPLICATION, type: JAVA_BEAN, cla
                                    ss: org.jboss.seam.core.SessionContext
                                    (seam.Component 94 ) Component: statelessContext, scope: APPLICATION, type: JAVA_BEAN, c
                                    lass: org.jboss.seam.core.StatelessContext
                                    (seam.Component 94 ) Component: applicationContext, scope: APPLICATION, type: JAVA_BEAN,
                                     class: org.jboss.seam.core.ApplicationContext
                                    (seam.Component 94 ) Component: conversationContext, scope: APPLICATION, type: JAVA_BEAN
                                    , class: org.jboss.seam.core.ConversationContext
                                    (seam.Component 94 ) Component: businessProcessContext, scope: APPLICATION, type: JAVA_B
                                    EAN, class: org.jboss.seam.core.BusinessProcessContext
                                    (seam.Component 94 ) Component: locale, scope: STATELESS, type: JAVA_BEAN, class: org.jb
                                    oss.seam.core.Locale
                                    (seam.Component 94 ) Component: messages, scope: SESSION, type: JAVA_BEAN, class: org.jb
                                    oss.seam.core.Messages
                                    (seam.Component 94 ) Component: interpolator, scope: STATELESS, type: JAVA_BEAN, class:
                                    org.jboss.seam.core.Interpolator
                                    (seam.Component 94 ) Component: facesMessages, scope: CONVERSATION, type: JAVA_BEAN, cla
                                    ss: org.jboss.seam.core.FacesMessages
                                    (seam.Component 94 ) Component: resourceBundle, scope: SESSION, type: JAVA_BEAN, class:
                                    org.jboss.seam.core.ResourceBundle
                                    (seam.Component 94 ) Component: localeSelector, scope: SESSION, type: JAVA_BEAN, class:
                                    org.jboss.seam.core.LocaleSelector
                                    (seam.Component 94 ) Component: uiComponent, scope: STATELESS, type: JAVA_BEAN, class: o
                                    rg.jboss.seam.core.UiComponent
                                    (seam.Component 94 ) Component: org.jboss.seam.remoting.messaging.subscriptionRegistry,
                                    scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.remoting.messaging.SubscriptionRegistry
                                    (seam.Component 94 ) Component: pojoCache, scope: APPLICATION, type: JAVA_BEAN, class: o
                                    rg.jboss.seam.core.PojoCache
                                    (seam.Component 94 ) Component: org.jboss.seam.core.ejb, scope: APPLICATION, type: JAVA_
                                    BEAN, class: org.jboss.seam.core.Ejb
                                    (deployment.Scanner 94 ) scanning: /E:/Tomcat/jakarta-tomcat-5.5.9/webapps/registration/WEB-
                                    INF/lib/registration-web.jar
                                    (seam.Component 94 ) Component: user, scope: SESSION, type: ENTITY_BEAN, class: com.seam
                                    .dto.User
                                    (seam.Component 94 ) Component: register, scope: CONVERSATION, type: STATEFUL_SESSION_BE
                                    AN, class: com.seam.web.action.RegisterAction, JNDI: RegisterAction/local
                                    (core.Ejb 94 ) starting the embedded EJB container
                                    (xml.BeanSchemaBinding 227 ) You should use the 2.0 version of the Microcontainer xml. xmlns='ur
                                    n:jboss:bean-deployer:2.0'
                                    (local.LocalTxDataSource 117 ) Bound datasource to JNDI name 'java:/DefaultDS'
                                    (local.LocalTxDataSource 117 ) Bound datasource to JNDI name 'jdbc:/testDatasource'
                                    (ejb3.Ejb3DescriptorHandler 1699) adding class annotation org.jboss.annotation.internal.DefaultInterc
                                    eptorMarker to com.seam.web.action.RegisterAction org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@1
                                    664f1a
                                    (ejb3.Ejb3Deployment 467 ) EJB3 deployment time took: 1438
                                    (ejb3.MCKernelAbstraction 84 ) installing bean: persistence.units:jar=registration-web.jar,unitNam
                                    e=testDatabase with dependencies:
                                    (ejb3.MCKernelAbstraction 87 ) AbstractDependencyMetaData@f4e6d{dependency=jdbc:/testDatasour
                                    ce}
                                    (ejb3.MCKernelAbstraction 84 ) installing bean: jboss.j2ee:jar=registration-web,name=RegisterActio
                                    n,service=EJB3 with dependencies:
                                    (ejb3.MCKernelAbstraction 87 ) AbstractDependencyMetaData@1d4f279{dependency=persistence.unit
                                    s:jar=registration-web.jar,unitName=testDatabase}
                                    (init.Initialization 94 ) done initializing Seam
                                    (http11.Http11Protocol 94 ) Starting Coyote HTTP/1.1 on http-80
                                    (common.ChannelSocket 94 ) JK: ajp13 listening on /0.0.0.0:8009
                                    (server.JkMain 94 ) Jk running ID=0 time=0/250 config=null
                                    (storeconfig.StoreLoader 94 ) Find registry server-registry.xml at classpath resource
                                    (startup.Catalina 94 ) Server startup in 37235 ms
                                    


                                    and this is when form is submitting :
                                    (core.Pages 94 ) no pages.xml file found
                                    (config.MyfacesConfig 94 ) No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, u
                                    sing default value true
                                    (config.MyfacesConfig 94 ) No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' fou
                                    nd, using default value true
                                    (config.MyfacesConfig 94 ) Tomahawk jar not available. Autoscrolling, DetectJavascript, AddRes
                                    ourceClass and CheckExtensionsFilter are disabled now.
                                    (annotations.Version 94 ) Hibernate Annotations 3.2.0.CR1
                                    (servlet.SeamExceptionFilter 119 ) uncaught exception handled by Seam
                                    javax.servlet.ServletException: Error calling action method of component with id _idJsp0:_idJsp6
                                     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
                                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                     at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                     at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
                                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                                     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                                     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                                     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                                     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                                     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                                     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
                                     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.ja
                                    va:744)
                                     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                                     at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
                                     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
                                     at java.lang.Thread.run(Thread.java:595)
                                    ([/registration].[Faces Servlet] 119 ) Servlet.service() for servlet Faces Servlet threw exception
                                    javax.faces.FacesException: Error calling action method of component with id _idJsp0:_idJsp6
                                     at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
                                     at javax.faces.component.UICommand.broadcast(UICommand.java:106)
                                     at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
                                     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
                                     at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
                                     at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
                                     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
                                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                     at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                     at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
                                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                                     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                                     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                                     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                                     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                                     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                                     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                                     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
                                     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.ja
                                    va:744)
                                     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                                     at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
                                     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
                                     at java.lang.Thread.run(Thread.java:595)
                                    Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{register.register}
                                     at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:165)
                                     at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
                                     ... 26 more
                                    Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: register
                                     at org.jboss.seam.Component.newInstance(Component.java:735)
                                     at org.jboss.seam.Component.newInstance(Component.java:1308)
                                     at org.jboss.seam.Component.getInstance(Component.java:1263)
                                     at org.jboss.seam.Component.getInstance(Component.java:1246)
                                     at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:44)
                                     at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.j
                                    ava:42)
                                     at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:574
                                    )
                                     at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
                                     at org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBindingImpl.java:455)
                                     at org.apache.myfaces.el.MethodBindingImpl.resolveToBaseAndProperty(MethodBindingImpl.java:180)
                                     at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:114)
                                     ... 27 more
                                    Caused by: javax.naming.NameNotFoundException: RegisterAction not bound
                                     at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
                                     at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
                                     at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
                                     at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
                                     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
                                     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
                                     at javax.naming.InitialContext.lookup(InitialContext.java:351)
                                     at org.jboss.seam.Component.instantiate(Component.java:774)
                                     at org.jboss.seam.Component.newInstance(Component.java:731)
                                     ... 37 more
                                    


                                    and web.xml for more info:
                                     <!-- Seam -->
                                    
                                     <listener>
                                     <listener-class>
                                     org.jboss.seam.servlet.SeamListener
                                     </listener-class>
                                     </listener>
                                    
                                     <!-- MyFaces -->
                                     <listener>
                                     <listener-class>
                                     org.apache.myfaces.webapp.StartupServletContextListener
                                     </listener-class>
                                     </listener>
                                    
                                     <!-- JSF RI -->
                                     <!--
                                     <listener>
                                     <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
                                     </listener>
                                     -->
                                    
                                     <!-- Propagate conversations across redirects -->
                                     <filter>
                                     <filter-name>Seam Redirect Filter</filter-name>
                                     <filter-class>
                                     org.jboss.seam.servlet.SeamRedirectFilter
                                     </filter-class>
                                     </filter>
                                    
                                     <filter>
                                     <filter-name>Seam Exception Filter</filter-name>
                                     <filter-class>
                                     org.jboss.seam.servlet.SeamExceptionFilter
                                     </filter-class>
                                     </filter>
                                    
                                     <filter-mapping>
                                     <filter-name>Seam Redirect Filter</filter-name>
                                     <url-pattern>*.seam</url-pattern>
                                     </filter-mapping>
                                    
                                     <filter-mapping>
                                     <filter-name>Seam Exception Filter</filter-name>
                                     <url-pattern>/*</url-pattern>
                                     </filter-mapping>
                                    
                                     <!--
                                     <resource-ref>
                                     <res-ref-name>testDatasource</res-ref-name>
                                     <res-type>java.sql.Datasource</res-type>
                                     <res-auth>Container</res-auth>
                                     </resource-ref>
                                     -->
                                    
                                     <context-param>
                                     <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                                     <param-value>client</param-value>
                                     </context-param>
                                    
                                     <servlet>
                                     <servlet-name>Faces Servlet</servlet-name>
                                     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                                     <load-on-startup>1</load-on-startup>
                                     </servlet>
                                    
                                     <!-- Faces Servlet Mapping -->
                                     <servlet-mapping>
                                     <servlet-name>Faces Servlet</servlet-name>
                                     <url-pattern>*.seam</url-pattern>
                                     </servlet-mapping>
                                    
                                    


                                    and another thing is, I put application.xml, ejb-jar.xml, jboss-app.xml, jboss-beans.xml and persistence.xml in my application jar file (registration.jar), however, may be some of them are useless and function only in JBoss.


                                    1 2 Previous Next