1 2 Previous Next 20 Replies Latest reply on May 15, 2007 4:57 PM by alain hsiung

    seam cannot reference EJB, why?

    alain hsiung Newbie

      Hi
      I want to refer to an EJB from JSF without backing bean in the web container, but I got the following exception:

      javax.faces.el.PropertyNotFoundException: Error testing property 'departureAirport' in bean of type null

      my JSP refer to the EJB and looks like this
      <h:inputText id="departureAirportInput" value="#{bookingBean.departureAirport}">

      my EJB is specified as Seam component and looks like this
      @Stateful
      @Name("bookingbean")
      @Local(Booking.class)
      public class BookingBean implements Booking, Serializable{
      ..
       private String departureAirport;
      ..
       public String getDepartureAirport() {
       return departureAirport;
       }
      
       public void setDepartureAirport(String departureAirport) {
       this.departureAirport = departureAirport;
       }
      ..

      My faces.config integrates Seam in JSF and looks like this
      <faces-config >
       <lifecycle>
       <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
       </lifecycle>
      ..


      My components.xml configure Seam in JSF and looks like this
      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
       xmlns:core="http://jboss.com/products/seam/core"
       xmlns:security="http://jboss.com/products/seam/security"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation=
       "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd
       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.2.xsd
       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd">
      
       <core:init jndi-name="#{ejbName}/local" />
      
       <core:manager conversation-timeout="120000"
       concurrent-request-timeout="500"
       conversation-id-parameter="cid"
       conversation-is-long-running-parameter="clr"/>
      
       <!-- <core:transactionListener/> -->
      
       <!--<core:ejb installed="@embeddedEjb@"/> -->
      
       <security:identity authenticate-method="#{authenticator.authenticate}"/>
      
      </components>

      My web.xml integrates Seam in JSF and enables Seam exception handling and looks like this
      <web-app..
      <listener>
       <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
       </listener>
      
       <servlet>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <url-pattern>/seam/resource/*</url-pattern>
       </servlet-mapping>
      
       <filter>
       <filter-name>Seam Filter</filter-name>
       <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>Seam Filter</filter-name>
       <url-pattern>/*</url-pattern>
       </filter-mapping>
      ..
      </web-app>

      The ejb.jar declares the Seam interceptor and register it to the EJB and look like this
      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
       http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
       version="3.0">
      
       <interceptors>
       <interceptor>
       <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
       </interceptor>
       </interceptors>
      
       <assembly-descriptor>
       <interceptor-binding>
       <ejb-name>*</ejb-name>
       <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
       </interceptor-binding>
       </assembly-descriptor>
      
      </ejb-jar>


      What is my mistake?

      Note that I can refer to the EJB from JSF using the standard EJB lookup mechanism either local or remote. I use JBoss 4.0.5, JSF 1.0, EJB 3.0 and Seam 1.2.1GA.

      The whole stack trace looks like this
      23:43:17,521 ERROR [ProcessValidationsPhase] Error testing property 'departureAirport' in bean of type null
      javax.faces.el.PropertyNotFoundException: Error testing property 'departureAirport' in bean of type null
       at com.sun.faces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:342)
       at com.sun.faces.el.impl.ArraySuffix.getType(ArraySuffix.java:240)
       at com.sun.faces.el.impl.ComplexValue.getType(ComplexValue.java:208)
       at com.sun.faces.el.ValueBindingImpl.getType(ValueBindingImpl.java:338)
       at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:111)
       at javax.faces.component.UIInput.getConvertedValue(UIInput.java:702)
       at javax.faces.component.UIInput.validate(UIInput.java:627)
       at javax.faces.component.UIInput.executeValidate(UIInput.java:838)
       at javax.faces.component.UIInput.processValidators(UIInput.java:412)
       at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:904)
       at javax.faces.component.UIForm.processValidators(UIForm.java:170)
       at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:904)
       at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342)
       at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:78)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
       at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       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)
      23:43:17,521 ERROR [ExceptionFilter] uncaught exception
      javax.servlet.ServletException: Error testing property 'departureAirport' in bean of type null
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       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)
      23:43:17,531 ERROR [ExceptionFilter] exception root cause
      javax.faces.el.PropertyNotFoundException: Error testing property 'departureAirport' in bean of type null
       at com.sun.faces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:342)
       at com.sun.faces.el.impl.ArraySuffix.getType(ArraySuffix.java:240)
       at com.sun.faces.el.impl.ComplexValue.getType(ComplexValue.java:208)
       at com.sun.faces.el.ValueBindingImpl.getType(ValueBindingImpl.java:338)
       at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:111)
       at javax.faces.component.UIInput.getConvertedValue(UIInput.java:702)
       at javax.faces.component.UIInput.validate(UIInput.java:627)
       at javax.faces.component.UIInput.executeValidate(UIInput.java:838)
       at javax.faces.component.UIInput.processValidators(UIInput.java:412)
       at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:904)
       at javax.faces.component.UIForm.processValidators(UIForm.java:170)
       at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:904)
       at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342)
       at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:78)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
       at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       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)
      23:43:17,621 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      javax.faces.el.PropertyNotFoundException: Error testing property 'departureAirport' in bean of type null
       at com.sun.faces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:342)
       at com.sun.faces.el.impl.ArraySuffix.getType(ArraySuffix.java:240)
       at com.sun.faces.el.impl.ComplexValue.getType(ComplexValue.java:208)
       at com.sun.faces.el.ValueBindingImpl.getType(ValueBindingImpl.java:338)
       at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:111)
       at javax.faces.component.UIInput.getConvertedValue(UIInput.java:702)
       at javax.faces.component.UIInput.validate(UIInput.java:627)
       at javax.faces.component.UIInput.executeValidate(UIInput.java:838)
       at javax.faces.component.UIInput.processValidators(UIInput.java:412)
       at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:904)
       at javax.faces.component.UIForm.processValidators(UIForm.java:170)
       at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:904)
       at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342)
       at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:78)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
       at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       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)
      


        • 1. Re: seam cannot reference EJB, why?
          Ben Catherall Newbie

          It could be:

          #{bookingBean.departureAirport}
          !=
          @Name("bookingbean")


          • 2. Re: seam cannot reference EJB, why?
            alain hsiung Newbie

            You're right, thank you.
            After I correct the name I still got the same exception.

            • 3. Re: seam cannot reference EJB, why?
              Pete Muir Master

              make sure getters and setters for departureAirport are on the interface for the SFSB.

              • 4. Re: seam cannot reference EJB, why?
                alain hsiung Newbie

                yes the interface of the SFSB declares the setters and getters already

                public interface Booking {
                 ..
                 public String getDepartureAirport();
                 public void setDepartureAirport(String departureAirport);
                 ..
                


                • 5. Re: seam cannot reference EJB, why?
                  Pete Muir Master

                  That all looks basically correct to me. Show your startup log from where it says Welcome to Seam to application started

                  • 6. Re: seam cannot reference EJB, why?
                    alain hsiung Newbie

                    my startup log:

                    00:24:54,296 INFO [ServletContextListener] Welcome to Seam 1.2.1
                    00:24:54,336 INFO [Scanner] scanning: /D:/Ideartis/Software-assets/FBN/FBN-EJB/jboss-seam.jar
                    00:24:54,376 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp54865FBN-JSF-exp.war/WEB-INF/lib/jboss-seam.jar
                    00:24:54,396 INFO [Initialization] Namespace: http://jboss.com/products/seam/security, package: org.jboss.seam.security, prefix: org.jboss.seam.secur
                    ity
                    00:24:54,396 INFO [Initialization] Namespace: http://jboss.com/products/seam/drools, package: org.jboss.seam.drools, prefix: org.jboss.seam.drools
                    00:24:54,396 INFO [Initialization] Namespace: http://jboss.com/products/seam/mail, package: org.jboss.seam.mail, prefix: org.jboss.seam.mail
                    00:24:54,396 INFO [Initialization] Namespace: http://jboss.com/products/seam/web, package: org.jboss.seam.web, prefix: org.jboss.seam.web
                    00:24:54,396 INFO [Initialization] Namespace: http://jboss.com/products/seam/theme, package: org.jboss.seam.theme, prefix: org.jboss.seam.theme
                    00:24:54,396 INFO [Initialization] Namespace: http://jboss.com/products/seam/core, package: org.jboss.seam.core, prefix: org.jboss.seam.core
                    00:24:54,396 INFO [Initialization] Namespace: http://jboss.com/products/seam/jms, package: org.jboss.seam.jms, prefix: org.jboss.seam.jms
                    00:24:54,396 INFO [Initialization] Namespace: http://jboss.com/products/seam/framework, package: org.jboss.seam.framework, prefix: org.jboss.seam.cor
                    e.framework
                    00:24:54,406 INFO [Scanner] scanning: D:\opt\jboss-4.0.5\server\default\.\tmp\deploy\tmp54865FBN-JSF-exp.war\WEB-INF\classes
                    00:24:54,406 INFO [Scanner] scanning: /D:/Ideartis/Software-assets/FBN/FBN-EJB/jboss-seam-debug.jar
                    00:24:54,406 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp54865FBN-JSF-exp.war/WEB-INF/lib/jboss-seam-ui.jar
                    00:24:54,406 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp54865FBN-JSF-exp.war/WEB-INF/lib/jboss-seam-debug.jar
                    00:24:54,426 INFO [Initialization] reading /WEB-INF/components.xml
                    00:24:54,486 INFO [Initialization] reading jar:file:/D:/Ideartis/Software-assets/FBN/FBN-EJB/jboss-seam.jar!/META-INF/components.xml
                    00:24:54,496 INFO [Initialization] reading jar:file:/D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp54865FBN-JSF-exp.war/WEB-INF/lib/jboss-seam.ja
                    r!/META-INF/components.xml
                    00:24:54,527 INFO [Initialization] reading properties from: /seam.properties
                    00:24:54,547 INFO [Initialization] reading properties from: /jndi.properties
                    00:24:54,557 INFO [Initialization] initializing Seam
                    00:24:54,587 INFO [Scanner] scanning: D:\opt\jboss-4.0.5\server\default\.\tmp\deploy\tmp54865FBN-JSF-exp.war\WEB-INF\classes
                    00:24:54,617 INFO [Scanner] scanning: /D:/Ideartis/Software-assets/FBN/FBN-EJB/jboss-seam-debug.jar
                    00:24:54,627 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp54865FBN-JSF-exp.war/WEB-INF/lib/jboss-seam-ui.jar
                    00:24:54,827 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp54865FBN-JSF-exp.war/WEB-INF/lib/jboss-seam-debug.jar
                    00:24:54,837 INFO [Scanner] scanning: /D:/Ideartis/Software-assets/FBN/FBN-EJB/jboss-seam.jar
                    00:24:56,640 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp54865FBN-JSF-exp.war/WEB-INF/lib/jboss-seam.jar
                    00:24:57,401 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.security.identity
                    00:24:57,441 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.persistence.persistenceProvider
                    00:24:57,481 INFO [Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
                    00:24:57,521 INFO [Initialization] Installing components...
                    00:24:57,541 INFO [Component] Component: org.jboss.seam.core.applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Appl
                    icationContext
                    00:24:57,541 INFO [Component] Component: org.jboss.seam.core.businessProcessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.
                    BusinessProcessContext
                    00:24:57,541 INFO [Component] Component: org.jboss.seam.core.conversation, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Conversat
                    ion
                    00:24:57,541 INFO [Component] Component: org.jboss.seam.core.conversationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Con
                    versationContext
                    00:24:57,541 INFO [Component] Component: org.jboss.seam.core.conversationEntries, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.Convers
                    ationEntries
                    00:24:57,541 INFO [Component] Component: org.jboss.seam.core.conversationList, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationL
                    ist
                    00:24:57,541 INFO [Component] Component: org.jboss.seam.core.conversationStack, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Conversation
                    Stack
                    00:24:57,551 INFO [Component] Component: org.jboss.seam.core.eventContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.EventConte
                    xt
                    00:24:57,551 INFO [Component] Component: org.jboss.seam.core.events, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Events
                    00:24:57,551 INFO [Component] Component: org.jboss.seam.core.exceptions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Exceptions
                    00:24:57,571 INFO [Component] Component: org.jboss.seam.core.expressions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Expressions
                    
                    00:24:57,571 INFO [Component] Component: org.jboss.seam.core.facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesConte
                    xt
                    00:24:57,571 INFO [Component] Component: org.jboss.seam.core.facesMessages, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesMes
                    sages
                    00:24:57,571 INFO [Component] Component: org.jboss.seam.core.facesPage, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.FacesPage
                    00:24:57,581 INFO [Component] Component: org.jboss.seam.core.httpError, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.HttpError
                    00:24:57,581 INFO [Component] Component: org.jboss.seam.core.image, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Image
                    00:24:57,581 INFO [Component] Component: org.jboss.seam.core.interpolator, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Interpolator
                    
                    00:24:57,581 INFO [Component] Component: org.jboss.seam.core.isUserInRole, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.IsUserInRo
                    le
                    00:24:57,581 INFO [Component] Component: org.jboss.seam.core.locale, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Locale
                    00:24:57,581 INFO [Component] Component: org.jboss.seam.core.localeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.LocaleSelect
                    or
                    00:24:57,581 INFO [Component] Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Manager
                    00:24:58,242 INFO [Component] Component: org.jboss.seam.core.messages, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.Messages
                    00:24:58,242 INFO [Component] Component: org.jboss.seam.core.methodContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.MethodCon
                    text
                    00:24:58,242 INFO [Component] Component: org.jboss.seam.core.pageContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.PageContext
                    
                    00:24:58,252 INFO [Component] Component: org.jboss.seam.core.pages, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Pages
                    00:24:58,272 INFO [Component] Component: org.jboss.seam.core.persistenceContexts, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Pe
                    rsistenceContexts
                    00:24:58,272 INFO [Component] Component: org.jboss.seam.core.pojoCache, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.PojoCache
                    00:24:58,272 INFO [Component] Component: org.jboss.seam.core.redirect, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Redirect
                    00:24:58,272 INFO [Component] Component: org.jboss.seam.core.renderer, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.ui.facelet.FaceletsRe
                    nderer
                    00:24:58,272 INFO [Component] Component: org.jboss.seam.core.resourceBundle, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.ResourceBund
                    le
                    00:24:58,282 INFO [Component] Component: org.jboss.seam.core.safeActions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SafeActions
                    
                    00:24:58,282 INFO [Component] Component: org.jboss.seam.core.sessionContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SessionC
                    ontext
                    00:24:58,282 INFO [Component] Component: org.jboss.seam.core.switcher, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Switcher
                    00:24:58,282 INFO [Component] Component: org.jboss.seam.core.uiComponent, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.UiComponent
                    00:24:58,282 INFO [Component] Component: org.jboss.seam.core.userPrincipal, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.UserPrinc
                    ipal
                    00:24:58,622 INFO [Component] Component: org.jboss.seam.core.validation, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Validation
                    00:24:58,622 INFO [Component] Component: org.jboss.seam.core.validators, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Validators
                    00:24:58,632 INFO [Component] Component: org.jboss.seam.framework.currentDate, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.framework.Cur
                    rentDate
                    00:24:58,652 INFO [Component] Component: org.jboss.seam.framework.currentDatetime, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.framework
                    .CurrentDatetime
                    00:24:58,652 INFO [Component] Component: org.jboss.seam.framework.currentTime, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.framework.Cur
                    rentTime
                    00:24:58,662 INFO [Component] Component: org.jboss.seam.mail.mailSession, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.mail.MailSession
                    
                    00:24:58,662 INFO [Component] Component: org.jboss.seam.security.configuration, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.security.C
                    onfiguration
                    00:24:58,662 INFO [Component] Component: org.jboss.seam.security.identity, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.security.Identity
                    00:24:58,672 INFO [Component] Component: org.jboss.seam.servlet.exceptionFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.Excep
                    tionFilter
                    00:24:58,682 INFO [Component] Component: org.jboss.seam.servlet.multipartFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.Multi
                    partFilter
                    00:24:58,682 INFO [Component] Component: org.jboss.seam.servlet.redirectFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.Redire
                    ctFilter
                    00:24:58,682 INFO [Component] Component: org.jboss.seam.theme.theme, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.theme.Theme
                    00:24:58,682 INFO [Component] Component: org.jboss.seam.theme.themeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.theme.ThemeSelect
                    or
                    00:24:58,682 INFO [Component] Component: org.jboss.seam.ui.entityConverter, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.ui.EntityConv
                    erter
                    00:24:58,693 INFO [Component] Component: org.jboss.seam.ui.entityConverterStore, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.ui.EntityConvert
                    erStore
                    00:24:58,693 INFO [Component] Component: org.jboss.seam.ui.graphicImage.dynamicImageResource, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.s
                    eam.ui.graphicImage.DynamicImageResource
                    00:24:58,693 INFO [Component] Component: org.jboss.seam.ui.graphicImage.dynamicImageStore, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.ui.
                    graphicImage.DynamicImageStore
                    00:24:58,693 INFO [Component] Component: org.jboss.seam.ui.resource.webResource, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.ui.resour
                    ce.WebResource
                    00:24:58,693 INFO [Lifecycle] starting up: org.jboss.seam.servlet.exceptionFilter
                    00:24:58,713 INFO [Lifecycle] starting up: org.jboss.seam.ui.graphicImage.dynamicImageResource
                    00:24:58,713 INFO [Lifecycle] starting up: org.jboss.seam.servlet.multipartFilter
                    00:24:58,713 INFO [Lifecycle] starting up: org.jboss.seam.ui.resource.webResource
                    00:24:58,713 INFO [Lifecycle] starting up: org.jboss.seam.servlet.redirectFilter
                    00:24:58,713 INFO [Initialization] done initializing Seam
                    00:24:58,713 INFO [SeamFilter] Initializing filter: org.jboss.seam.servlet.multipartFilter
                    00:24:58,713 INFO [SeamFilter] Initializing filter: org.jboss.seam.servlet.exceptionFilter
                    00:24:58,713 INFO [SeamFilter] Initializing filter: org.jboss.seam.servlet.redirectFilter


                    • 7. Re: seam cannot reference EJB, why?
                      Pete Muir Master

                      The bookingBean isn't being loaded. Make sure you have a seam.properties file in the root your jar which you package your components.

                      • 8. Re: seam cannot reference EJB, why?
                        alain hsiung Newbie

                        I have the empty seam.properties file in META-INF directory of the JAR deployed on the EJB container.
                        As well as another seam.properties in WEB-INF of the WAR for the web container.
                        How can I see that the bookingBean seam component is not loaded?
                        Shall I put the seam.properties file outside the META-INF?
                        My IDE (Intellij) would not be happy with this but I can try.
                        I followed the Seam Reference manual that told to put it in META-INF.

                        • 9. Re: seam cannot reference EJB, why?
                          Pete Muir Master

                          The seam.properties file MUST be in the root of your jar - can you give me a link to the section of the ref manual that says it must in META-INF and I'll fix it :)

                          • 10. Re: seam cannot reference EJB, why?
                            alain hsiung Newbie

                            Ref Manual Seam 1.2.1GA p 192

                            There is one final item you need to know about. You must place a seam.properties, METAINF/
                            seam.properties
                            or META-INF/components.xml file in any archive in which your Seam components are
                            deployed


                            I misunderstood the sentence so that I have to put the seam.properties in META-INF. I will try directly under the root now..

                            • 11. Re: seam cannot reference EJB, why?
                              alain hsiung Newbie

                              I just put the seam.properties in the root instead of under META-INF directory of the JAR deployed on the EJB container but.. always the same exception:-(

                              • 12. Re: seam cannot reference EJB, why?
                                Pete Muir Master

                                My apologies, it's fine in META-INF, I missed that change! Your bookingBean component would be shown in the list of components installed if it were being.

                                I must admit I haven't the first clue as to how IDEAs packaging stuff works, and from your startup log you seem to have some jars in odd places being scanned (outside the jboss deploy directory) and I can't see your ejb jar being scanned. My best suggestion is to use a seam-gen created ant script, unless there are any IDEA users who can jump in and give you advice? Or perhaps ask on the IDEA forums...

                                • 13. Re: seam cannot reference EJB, why?
                                  alain hsiung Newbie

                                  Hi Peter

                                  sorry to disturbe you again. I just wanted to clean up some issues.

                                  "petemuir" wrote:

                                  I must admit I haven't the first clue as to how IDEAs packaging stuff works, and from your startup log you seem to have some jars in odd places being scanned (outside the jboss deploy directory)

                                  My packaging is not IDEA specific but EJB standard. The libraries are referenced in the manifest that is located in META-INF. It works without Seam. And Seam scans these seam libraries that are outside the JBoss deploy directory.
                                  Correct me if I'm wrong but if Seam scans the libraries, it means that Seams is happy with this kind of external references in the packaging.

                                  "petemuir" wrote:

                                  I can't see your ejb jar being scanned.

                                  My ejb jar is being scanned. I cannot explain why it isn't shown in the log I published, but it is definitely there in all other logs I looked at, for example:
                                  21:36:39,031 INFO [Initialization] initializing Seam
                                  21:36:39,051 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp27960FBN-JSF-exp.war/WEB-INF/lib/jboss-seam-ui.jar
                                  21:36:39,471 INFO [Scanner] scanning: /D:/Ideartis/Software-assets/FBN/FBN-EJB/jboss-seam-debug.jar
                                  21:36:39,481 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp27960FBN-JSF-exp.war/WEB-INF/lib/jboss-seam-debug.jar
                                  21:36:39,501 INFO [Scanner] scanning: D:\opt\jboss-4.0.5\server\default\.\tmp\deploy\tmp27960FBN-JSF-exp.war\WEB-INF\classes
                                  21:36:39,511 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/tmp/deploy/tmp27961FBN-EJB.jar
                                  21:36:40,493 INFO [Scanner] scanning: /D:/Ideartis/Software-assets/FBN/FBN-EJB/jboss-seam.jar
                                  21:36:41,855 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp27960FBN-JSF-exp.war/WEB-INF/lib/jboss-seam.jar

                                  So when my ejb.jar is being scanned and the location of seam.properties in my ejb.jar is correct, and the packaging was working without Seam (the EJB is deployed and accessible by lookup) do you think that there might be something wrong in the packaging?
                                  I mean which file might to wrongly packaged?

                                  • 14. Re: seam cannot reference EJB, why?
                                    Pete Muir Master

                                    Can you post the startup log for one where it does scan your ejb jar?

                                    As I don't use IDEA and do use the packaging structure we recommend you follow (that generated by seam-gen) I can't really be of much help in isolating where your problem is occurring - you seem to have the right files in the right place... My best advice is to compare the packaging and config files from seam-gen or an example and try to isolate what you've got differently.

                                    We are working on improving Seam/JEE packaging, and if you do get this sorted it would be great if you could post back what you did.

                                    1 2 Previous Next