[jboss-user] [JBoss Seam] - jboss seam example

koriel do-not-reply at jboss.com
Sun Jul 23 06:55:26 EDT 2006


Ok I tried to import the seam registration example to eclipse and I'm using the jboss-ide packaging to create ear,war and jar files but although the final structure is identical to jboss seam's structure I got the following error 


  | 13:42:16,395 INFO  [Pages] no pages.xml file found
  | 13:42:21,803 INFO  [MyfacesConfig] No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
  | 13:42:21,803 INFO  [MyfacesConfig] No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
  | 13:42:21,803 INFO  [MyfacesConfig] Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
  | 13:42:31,909 ERROR [[Faces Servlet]] 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.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  |         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:869)
  |         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  |         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  |         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:153)
  |         at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
  |         ... 24 more
  | Caused by: javax.ejb.EJBException: java.lang.NullPointerException
  |         at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
  |         at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
  |         at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
  |         at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
  |         at $Proxy105.register(Unknown Source)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
  |         ... 25 more
  | Caused by: java.lang.NullPointerException
  |         at org.jboss.seam.example.registration.RegisterAction.register(RegisterAction.java:34)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
  |         at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
  |         at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
  | 
  | 
  | 
  | 

this is my components.xml


  | <components>
  | 
  |     <component name="org.jboss.seam.core.init">
  |         <property name="jndiPattern">uai_sys/#{ejbName}/local</property>
  |     </component>
  |     
  | 
  | 
  | 
  | </components>
  | 
  | 

my 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>
  |     
  |     <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>
  | 

my faces-config.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE faces-config 
  | PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
  |                             "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
  | <faces-config>
  | 
  | 	<!-- Phase listener needed for all Seam applications -->
  | 	
  | 	<lifecycle>
  | 		<phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
  | 	</lifecycle>
  | 
  | </faces-config>
  | 

my ejb-jar.xml

  | 	<ejb-jar>
  |    <assembly-descriptor>
  |       <interceptor-binding>
  |          <ejb-name>*</ejb-name>
  |          <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
  |       </interceptor-binding>
  |    </assembly-descriptor>
  | </ejb-jar>
  | 

my jboss-app.xml

  | <jboss-app>
  |       <loader-repository> 
  |       seam.jboss.org:loader=uai_sys
  |       </loader-repository> 
  | </jboss-app> 
  | 

The problem occurs when I try to register the user..for somehow it can't find the ejb name but why? 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960172#3960172

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960172



More information about the jboss-user mailing list