3 Replies Latest reply on Jul 15, 2009 6:35 PM by kaboel.repel.steel.scarlet.be

    can not  start  Seam 2.1.2GA   on jboss 5.0

    kaboel.repel.steel.scarlet.be
      can not  start  Seam 2.1.2GA   on jboss 5.0


      As  i did run a  Seam-gen I hoped  to be  able to  run  trieal application.
      It fails  and  the error messages  are  mistifying

      I've  create two  builds  



      and  notice a difference  in  the  factory  manager  not  using  glassfish   simple richfaces


               <property name="jboss.entity.manager.factory.jndi.name" value="java:comp/env/simple/pu"/>
              
               and
               <property name="jboss.entity.manager.factory.jndi.name" value="java:/seam212gaEntityManagerFactory"/>


      unless the factory  name is  just  a name , wich one  is to be  used ?



      as  i notice differences  in  components.xml in  my war


      ["

         <core:init debug="${debug}" jndi-pattern="simple/#{ejbName}/local"/>

         <core:manager concurrent-request-timeout="500"
                       conversation-timeout="120000"
                       conversation-id-parameter="cid"
                       parent-conversation-id-parameter="pid"/>

         <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
         <web:hot-deploy-filter url-pattern="*.seam"/>

         <persistence:managed-persistence-context name="entityManager" auto-create="true"
                            persistence-unit-jndi-name="@puJndiName@"/>

         <drools:rule-base name="securityRules">
            <drools:rule-files>
               <value>/security.drl</value>
            </drools:rule-files>
      "]


      and

      ["
        <core:init debug="@debug@" jndi-pattern="@jndiPattern@"/>

         <core:manager concurrent-request-timeout="500"
                       conversation-timeout="120000"
                       conversation-id-parameter="cid"
                       parent-conversation-id-parameter="pid"/>

         <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
         <web:hot-deploy-filter url-pattern="*.seam"/>

         <persistence:managed-persistence-context name="entityManager" auto-create="true"
                            persistence-unit-jndi-name="@puJndiName@"/>

         <drools:rule-base name="securityRules">
            <drools:rule-files>
               <value>/security.drl</value>
            </drools:rule-files>
         </drools:rule-base>



      "]
      i think  @..@   are  badly  filled parameters  what  is the c contend to be  used  ??




      Jboss 5.0   Hibernate(mysql)  JPA   + testsearch   - richfaces


      basic setup



      can anyone  help me
        • 1. Re: can not  start  Seam 2.1.2GA   on jboss 5.0
          norman

          kaboel kramer wrote on Jul 15, 2009 15:58:


          can not  start  Seam 2.1.2GA   on jboss 5.0


          As  i did run a  Seam-gen I hoped  to be  able to  run  trieal application.
          It fails  and  the error messages  are  mistifying



          Maybe you should post the actual error so that someone might be able to understand what your issue is?

          • 2. Re: can not  start  Seam 2.1.2GA   on jboss 5.0
            kaboel.repel.steel.scarlet.be
            can not  start  Seam 2.1.2GA   on jboss 5.0   using  simple  richfaces  no Glassfish and  hibernate  mysql 5.1

            for  more the n 3 days  i'm looking  for  an error  in my configuration  causing  a  null pointer exception in  whatever
            seam project  I attempt  to start. Even Seam-gen  generated  get punished  in the same way


            ['

                    seam212ga/AuthenticatorBean/local - EJB3.x Default Local Business Interface
                    seam212ga/AuthenticatorBean/local-com.xxyyzz.seam.sessbean.Authenticator - EJB3.x Local Business Interface

            18:14:46,660 INFO  [SessionSpecContainer] Starting jboss.j2ee:ear=seam212ga.ear,jar=seam212ga.jar,name=FormBean,service=EJB3
            18:14:46,661 INFO  [EJBContainer] STARTED EJB: com.xxyyzz.seam.sessbean.FormBean ejbName: FormBean
            18:14:46,702 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

                    seam212ga/FormBean/local - EJB3.x Default Local Business Interface
                    seam212ga/FormBean/local-com.xxyyzz.seam.sessbean.Form - EJB3.x Local Business Interface

            18:14:47,617 ERROR [TomcatDeployment] ENC setup failed
            java.lang.NullPointerException
                    at org.jboss.injection.PersistenceUnitHandler.getEntityManagerFactory(PersistenceUnitHandler.java:172)
                    at org.jboss.injection.PersistenceUnitHandler.getFactory(PersistenceUnitHandler.java:163)
                    at org.jboss.injection.PuEncInjector.inject(PuEncInjector.java:54)
                    at org.jboss.web.tomcat.service.TomcatInjectionContainer.populateEnc(TomcatInjectionContainer.java:482)
                    at org.jboss.web.tomcat.service.deployers.TomcatDeployment$EncListener.lifecycleEvent(TomcatDeployment.java:471)
                    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
                    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4388)
                    at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
                    at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
                    at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
                    at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
                    at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                    at java.lang.reflect.Method.invoke(Unknown Source)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
                    at $Proxy38.start(Unknown Source)
                    at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(St
            ']





            as I notice  persistence ...   I add  the presistence  configuration as found  in the  EAR-> .JAR


            ['
            <?xml version="1.0" encoding="UTF-8"?>
            <!-- Persistence deployment descriptor for dev profile -->
            <persistence xmlns="http://java.sun.com/xml/ns/persistence"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
                         version="1.0">
                        
               <persistence-unit name="simple">
                  <provider>org.hibernate.ejb.HibernatePersistence</provider>
                  <jta-data-source>java:/DefaultDS/</jta-data-source>
                  <!-- The <jar-file> element is necessary if you put the persistence.xml in the WAR and the classes in the JAR -->
                  <!--
                  <jar-file>../../Hibernate_modules.jar</jar-file>
                  -->
                  <properties>
                     <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
                  <!--    <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>   -->
                     <property name="hibernate.hbm2ddl.auto" value="validate"/>   <!--   update create-drop
                     <property name="hibernate.jdbc.batch_size" value="20"/>
                     <property name="hibernate.cache.use_second_level_cache" value="false"/>  -->
                     <property name="hibernate.show_sql" value="true"/>
                     <property name="hibernate.format_sql" value="true"/>
                     <property name="jboss.entity.manager.factory.jndi.name" value="java:comp/env/simple/pu"/>
                  </properties>
               </persistence-unit>
               
            </persistence>

            ']


            and components  xml  as found  in the  EAR -WAR


            ['
            <?xml version="1.0" encoding="UTF-8"?>
            <components xmlns="http://jboss.com/products/seam/components"
                        xmlns:core="http://jboss.com/products/seam/core"
                        xmlns:persistence="http://jboss.com/products/seam/persistence"
                        xmlns:drools="http://jboss.com/products/seam/drools"
                        xmlns:bpm="http://jboss.com/products/seam/bpm"
                        xmlns:security="http://jboss.com/products/seam/security"
                        xmlns:mail="http://jboss.com/products/seam/mail"
                        xmlns:web="http://jboss.com/products/seam/web"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation=
                            "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
                             http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd
                             http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.1.xsd
                             http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.1.xsd
                             http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
                             http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd
                             http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.1.xsd
                             http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd">

               <core:init debug="true" jndi-pattern="@jndiPattern@"/>

               <core:manager concurrent-request-timeout="500"
                             conversation-timeout="120000"
                             conversation-id-parameter="cid"
                             parent-conversation-id-parameter="pid"/>

               <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
               <web:hot-deploy-filter url-pattern="*.seam"/>

               <persistence:managed-persistence-context name="entityManager" auto-create="true"
                                  persistence-unit-jndi-name="java:comp/env/simple/pu"/>

               <drools:rule-base name="securityRules">
                  <drools:rule-files>
                     <value>/security.drl</value>
                  </drools:rule-files>
               </drools:rule-base>

               <security:rule-based-permission-resolver security-rules="#{securityRules}"/>

               <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>

               <event type="org.jboss.seam.security.notLoggedIn">
                  <action execute="#{redirect.captureCurrentView}"/>
               </event>
               <event type="org.jboss.seam.security.loginSuccessful">
                  <action execute="#{redirect.returnToCapturedView}"/>
               </event>

               <mail:mail-session host="localhost" port="25"/>

               <!-- For use with jBPM pageflow or process management -->
               <!--
               <bpm:jbpm>
                  <bpm:process-definitions></bpm:process-definitions>
                  <bpm:pageflow-definitions></bpm:pageflow-definitions>
               </bpm:jbpm>
               -->

            </components>
            ']




            can anyone  help me
            Many thanks  in advance
            • 3. Re: can not  start  Seam 2.1.2GA   on jboss 5.0
              kaboel.repel.steel.scarlet.be
              can not  start  Seam 2.1.2GA   on jboss 5.0   using  simple  richfaces  no Glassfish and  hibernate  mysql 5.1

              for  more the n 3 days  i'm looking  for  an error  in my configuration  causing  a  null pointer exception in  whatever
              seam project  I attempt  to start. Even Seam-gen  generated  get punished  in the same way


              ['

                   seam212ga/AuthenticatorBean/local - EJB3.x Default Local Business Interface
                   seam212ga/AuthenticatorBean/local-com.xxyyzz.seam.sessbean.Authenticator - EJB3.x Local Business Interface

              18:14:46,660 INFO  [SessionSpecContainer] Starting jboss.j2ee:ear=seam212ga.ear,jar=seam212ga.jar,name=FormBean,service=EJB3
              18:14:46,661 INFO  [EJBContainer] STARTED EJB: com.xxyyzz.seam.sessbean.FormBean ejbName: FormBean
              18:14:46,702 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

                   seam212ga/FormBean/local - EJB3.x Default Local Business Interface
                   seam212ga/FormBean/local-com.xxyyzz.seam.sessbean.Form - EJB3.x Local Business Interface

              18:14:47,617 ERROR [TomcatDeployment] ENC setup failed
              java.lang.NullPointerException
                   at org.jboss.injection.PersistenceUnitHandler.getEntityManagerFactory(PersistenceUnitHandler.java:172)
                   at org.jboss.injection.PersistenceUnitHandler.getFactory(PersistenceUnitHandler.java:163)
                   at org.jboss.injection.PuEncInjector.inject(PuEncInjector.java:54)
                   at org.jboss.web.tomcat.service.TomcatInjectionContainer.populateEnc(TomcatInjectionContainer.java:482)
                   at org.jboss.web.tomcat.service.deployers.TomcatDeployment$EncListener.lifecycleEvent(TomcatDeployment.java:471)
                   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
                   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4388)
                   at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
                   at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
                   at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
                   at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
                   at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                   at java.lang.reflect.Method.invoke(Unknown Source)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                   at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
                   at $Proxy38.start(Unknown Source)
                   at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(St
              ']





              as I notice  persistence ...   I add  the presistence  configuration as found  in the  EAR-> .JAR


              ['
              <?xml version="1.0" encoding="UTF-8"?>
              <!-- Persistence deployment descriptor for dev profile -->
              <persistence xmlns="http://java.sun.com/xml/ns/persistence"
                           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                           xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
                           version="1.0">
                          
                 <persistence-unit name="simple">
                    <provider>org.hibernate.ejb.HibernatePersistence</provider>
                    <jta-data-source>java:/DefaultDS/</jta-data-source>
                    <!-- The <jar-file> element is necessary if you put the persistence.xml in the WAR and the classes in the JAR -->
                    <!--
                    <jar-file>../../Hibernate_modules.jar</jar-file>
                    -->
                    <properties>
                       <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
                    <!--    <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>   -->
                       <property name="hibernate.hbm2ddl.auto" value="validate"/>   <!--   update create-drop
                       <property name="hibernate.jdbc.batch_size" value="20"/>
                       <property name="hibernate.cache.use_second_level_cache" value="false"/>  -->
                       <property name="hibernate.show_sql" value="true"/>
                       <property name="hibernate.format_sql" value="true"/>
                       <property name="jboss.entity.manager.factory.jndi.name" value="java:comp/env/simple/pu"/>
                    </properties>
                 </persistence-unit>
                 
              </persistence>

              ']


              and components  xml  as found  in the  EAR -WAR


              ['
              <?xml version="1.0" encoding="UTF-8"?>
              <components xmlns="http://jboss.com/products/seam/components"
                          xmlns:core="http://jboss.com/products/seam/core"
                          xmlns:persistence="http://jboss.com/products/seam/persistence"
                          xmlns:drools="http://jboss.com/products/seam/drools"
                          xmlns:bpm="http://jboss.com/products/seam/bpm"
                          xmlns:security="http://jboss.com/products/seam/security"
                          xmlns:mail="http://jboss.com/products/seam/mail"
                          xmlns:web="http://jboss.com/products/seam/web"
                          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                          xsi:schemaLocation=
                              "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
                               http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd
                               http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.1.xsd
                               http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.1.xsd
                               http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
                               http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd
                               http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.1.xsd
                               http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd">

                 <core:init debug="true" jndi-pattern="@jndiPattern@"/>

                 <core:manager concurrent-request-timeout="500"
                               conversation-timeout="120000"
                               conversation-id-parameter="cid"
                               parent-conversation-id-parameter="pid"/>

                 <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
                 <web:hot-deploy-filter url-pattern="*.seam"/>

                 <persistence:managed-persistence-context name="entityManager" auto-create="true"
                                    persistence-unit-jndi-name="java:comp/env/simple/pu"/>

                 <drools:rule-base name="securityRules">
                    <drools:rule-files>
                       <value>/security.drl</value>
                    </drools:rule-files>
                 </drools:rule-base>

                 <security:rule-based-permission-resolver security-rules="#{securityRules}"/>

                 <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/>

                 <event type="org.jboss.seam.security.notLoggedIn">
                    <action execute="#{redirect.captureCurrentView}"/>
                 </event>
                 <event type="org.jboss.seam.security.loginSuccessful">
                    <action execute="#{redirect.returnToCapturedView}"/>
                 </event>

                 <mail:mail-session host="localhost" port="25"/>

                 <!-- For use with jBPM pageflow or process management -->
                 <!--
                 <bpm:jbpm>
                    <bpm:process-definitions></bpm:process-definitions>
                    <bpm:pageflow-definitions></bpm:pageflow-definitions>
                 </bpm:jbpm>
                 -->

              </components>
              ']




              can anyone  help me
              Many thanks  in advance