1 2 Previous Next 19 Replies Latest reply on Oct 19, 2011 6:46 AM by Karsten Wutzke

    TransactionManager lookup fails on AS7

    Kris Verlaenen Master

      I'm looking at migrating an existing application to as7 and encountered an issue with looking up the transaction manager.  The application deploys fine (now) but fails at runtime because hibernate cannot find the transaction manager on as7.

       

      Caused by: org.hibernate.service.jndi.JndiException: Unable to lookup JNDI name [java:/TransactionManager]

           at org.hibernate.service.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:68) [hibernate-core-4.0.0.Beta1.jar:4.0.0.Beta1]

           at org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform.locateTransactionManager(JBossAppServerJtaPlatform.java:40) [hibernate-core-4.0.0.Beta1.jar:4.0.0.Beta1]

      which seems to make sense as it seems the transaction manager in as7 is registered on java:jboss/TransactionManager?

       

      Am I missing something, or is there an easy way to tell hibernate to look at another JNDI name?

       

      My persistence.xml

       

         <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">

           <provider>org.hibernate.ejb.HibernatePersistence</provider>

           <jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>      

           <mapping-file>META-INF/JBPMorm.xml</mapping-file>

           <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>

           <class>org.drools.persistence.info.SessionInfo</class>

           <class>org.drools.persistence.info.WorkItemInfo</class>

           <properties>

             <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>            

             <property name="hibernate.max_fetch_depth" value="3"/>

             <property name="hibernate.hbm2ddl.auto" value="create-drop" />

             <property name="hibernate.show_sql" value="false" />    

             <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />

           </properties>        

         </persistence-unit>

       

      Full server log attached.

       

      Kris

        • 1. Re: TransactionManager lookup fails on AS7
          Stuart Douglas Master

          The transaction manager now lives at java:jboss/TransactionManager.

           

          You should be able to just delete

           

          <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />

           

          and the AS7 integration should take case of the rest.

           

          If this works for you would you be able to file a JIRA about this? AS7 should detect and ignore the legacy jboss transaction manager lookup.

          • 2. Re: TransactionManager lookup fails on AS7
            Kris Verlaenen Master

            I actually tried that before (as I saw this in one of the as7 examples), but then I get a NPE when trying to create an entity manager.

            Looking at the code, it seems the transaction manager is null in this case:

             

            Caused by: java.lang.NullPointerException

                at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.getStatus(JtaStatusHelper.java:72) [hibernate-core-4.0.0.Beta1.jar:4.0.0.Beta1]

                at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.isActive(JtaStatusHelper.java:114) [hibernate-core-4.0.0.Beta1.jar:4.0.0.Beta1]

                at org.hibernate.engine.transaction.internal.jta.CMTTransaction.join(CMTTransaction.java:149) [hibernate-core-4.0.0.Beta1.jar:4.0.0.Beta1]

                at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1197) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                at org.hibernate.ejb.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:170) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                at org.hibernate.ejb.EntityManagerImpl.<init>(EntityManagerImpl.java:90) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:112) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:107) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                at org.drools.persistence.jpa.JpaPersistenceContextManager.getApplicationScopedPersistenceContext(JpaPersistenceContextManager.java:39) [drools-persistence-jpa-5.2.0.Final.jar:]

                at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:125) [drools-persistence-jpa-5.2.0.Final.jar:]

                ... 48 more

            • 3. Re: TransactionManager lookup fails on AS7
              Stuart Douglas Master

              Can you try it with a custom TransactionLookupClass

               

              public class MyTransactionManagerLookup implements TransactionManagerLookup {

               

               

                 public TransactionManager getTransactionManager() throws Exception {

                    return (TransactionManager) new InitialContext().lookup("java:jboss/TransactionManager");

                 }

               

               

              }

              • 4. Re: TransactionManager lookup fails on AS7
                Martin Dames Newbie

                Hi,

                 

                I have the same error. I migrated my Seam 2.2.2 App to JBoss AS 7 using the Hibernate 4 implementation of AS. The deployment is working and I get the same NPE exception as Kris second post.

                 

                I have implemented my MyTransactionManagerLookup, left the other required methods from the interface empty ( actually I don't know what to do there... ) and set the hibernate property hibernate.transaction.manager_lookup_class to MyTransactionManagerLookup. Then I get the following exception at startup:

                 

                 

                ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/MyApp]] (MSC service thread 1-2) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: org.jboss.seam.InstantiationException: Could not instantiate Seam component: entityManagerFactory

                    at org.jboss.seam.Component.newInstance(Component.java:2144) [jboss-seam.jar:]

                    at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) [jboss-seam.jar:]

                    at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) [jboss-seam.jar:]

                ..

                 

                Caused by: javax.persistence.PersistenceException: [PersistenceUnit: EuroTransport] Unable to build EntityManagerFactory

                    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:903) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:879) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                    at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                ..

                 

                Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.service.jta.platform.spi.JtaPlatform]

                    at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:170) [hibernate-core-4.0.0.Beta1.jar:4.0.0.Beta1]

                    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:137) [hibernate-core-4.0.0.Beta1.jar:4.0.0.Beta1]

                ..

                 

                I think my empty interface methods are wrong... so... what to do?

                 

                Thank you.

                • 5. Re: TransactionManager lookup fails on AS7
                  Karsten Wutzke Expert

                  May I just attach myself to this problem...

                   

                  I basically have the same setup as Martin, Seam 2.2.2, JSF 1.2, Facelets, and RichFaces 3.3.3 using JBoss AS 7. I also have no problem upgrading to Hibernate 4 in general. Deployment succeeds, however when requesting the default page the following exception occurrs:

                   

                  {code:java}

                  19:18:44,324 Schwerwiegend [facelets.viewhandler] (http--127.0.0.1-8080-2) Error Rendering View[/season-home.xhtml]: org.jboss.seam.InstantiationException: Could not instantiate Seam component: seasonHome

                      at org.jboss.seam.Component.newInstance(Component.java:2170) [jboss-seam.jar:]

                      at org.jboss.seam.Component.getInstance(Component.java:2024) [jboss-seam.jar:]

                      at org.jboss.seam.Component.getInstance(Component.java:1986) [jboss-seam.jar:]

                      at org.jboss.seam.Component.getInstance(Component.java:1980) [jboss-seam.jar:]

                      at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55) [jboss-seam.jar:]

                      at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50) [jboss-seam.jar:]

                      at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:148) [jboss-seam.jar:]

                      at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:51) [jboss-seam.jar:]

                      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175) [jboss-el-api_2.2_spec-1.0.0.Final.jar:1.0.0.Final]

                      at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72) [jsf-impl-1.2_13.jar:1.2_13-b01-FCS]

                      at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44) [jboss-el.jar:]

                      at org.jboss.el.parser.AstValue.getValue(AstValue.java:63) [jboss-el.jar:]

                      at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) [jboss-el.jar:]

                      at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71) [jsf-facelets.jar:]

                      at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:40) [jboss-el.jar:]

                      at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) [jboss-el.jar:]

                      at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71) [jsf-facelets.jar:]

                      at javax.faces.component.UIParameter.getValue(UIParameter.java:167) [jsf-api-1.2_13.jar:1.2_13-b01-FCS]

                      at org.jboss.seam.ui.util.ViewUrlBuilder.addParameter(ViewUrlBuilder.java:43) [jboss-seam-ui.jar:]


                      ... lots of RichFaces/JSF/Facelets stuff

                      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) [richfaces-impl.jar:]

                      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) [richfaces-impl.jar:]

                      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) [richfaces-impl.jar:]

                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                      at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.0.Final.jar:7.0.0.Final]

                      at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49) [jboss-as-jpa-7.0.0.Final.jar:7.0.0.Final]

                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]

                      at java.lang.Thread.run(Unknown Source) [:1.7.0]

                  Caused by: java.lang.NullPointerException

                      at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.getStatus(JtaStatusHelper.java:72) [hibernate-core-4.0.0.Beta1.jar:4.0.0.Beta1]

                      at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.isActive(JtaStatusHelper.java:114) [hibernate-core-4.0.0.Beta1.jar:4.0.0.Beta1]

                      at org.hibernate.engine.transaction.internal.jta.CMTTransaction.join(CMTTransaction.java:149) [hibernate-core-4.0.0.Beta1.jar:4.0.0.Beta1]

                      at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1197) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                      at org.hibernate.ejb.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:170) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                      at org.hibernate.ejb.EntityManagerImpl.<init>(EntityManagerImpl.java:90) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                      at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:112) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                      at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:107) [hibernate-entitymanager-4.0.0.Beta1.jar:4.0.0.Beta1]

                      at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:79) [jboss-seam.jar:]

                      at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:108) [jboss-seam.jar:]

                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0]

                      ...

                      at org.jboss.seam.Component.callComponentMethod(Component.java:2275) [jboss-seam.jar:]

                      at org.jboss.seam.Component.callCreateMethod(Component.java:2198) [jboss-seam.jar:]

                      at org.jboss.seam.Component.newInstance(Component.java:2158) [jboss-seam.jar:]

                      ... 84 more

                  {code}

                   

                  My config can be found here:

                  http://community.jboss.org/wiki/DataSourceConfigurationInAS7#comment-7163

                   

                  I'm stuck here, too. Help appreciated.

                   

                  Karsten

                  • 6. Re: TransactionManager lookup fails on AS7
                    Karsten Wutzke Expert

                    OK, if you just want to get this to work in a test environment, do the following: use the datasource without JTA.

                     

                    Done by:

                     

                    in persistence.xml:

                     

                    {code:xml}  <persistence-unit name="YourPersistenceUnit" transaction-type="RESOURCE_LOCAL">{code}

                     

                    and

                     

                    {code:xml}  <non-jta-data-source>java:jboss/datasources/YourDS</non-jta-data-source>{code}

                     

                    Then in components.xml:

                     

                    {code:xml}  <transaction:entity-transaction entity-manager="#{yourEntityManagerName}" auto-create="true" />{code}

                     

                    Voila! Of course, this is just a patch, the real answer still has to be determined.

                     

                    Post notes:

                     

                    Should you experience some exceptions surrounding Google GWT, because you're using Seam remoting, then (for whatever reason) you have to put gwt-servlet.jar into webapp classpath (it comes With Seam 2). Got it from:

                    http://www.justlogged.com/Question/1/3003715/abb4d5d74178357e7fdfc35addad08a7

                     

                    Also note this thread when using the above workaround:

                    http://community.jboss.org/thread/170092

                     

                    Cheers

                    Karsten

                    • 7. Re: TransactionManager lookup fails on AS7
                      Martin Dames Newbie

                      Hi Karsten,

                       

                      this seemed to work, the error went away if I uncomment the hibernate.transaction.manager_lookup_class in persistence.xml and added your suggestion.

                       

                      But, now I end up with an infinite loop by starting my app. The infinite loop comes somewhere from the facelets compiler and tries to add the same libraries from my WEB-INF/lib dir on and on.

                       

                      {code}

                      09:14:36,659 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jstl-fn.taglib.xml

                      09:14:36,660 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jstl-core.taglib.xml

                      09:14:36,661 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jsf-ui.taglib.xml

                      09:14:36,663 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jsf-core.taglib.xml

                      09:14:36,664 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jsf-html.taglib.xml

                      09:14:36,665 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/notify-3.3.3.Final.jar/META-INF/notify.taglib.xml

                      09:14:36,666 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/primefaces-1.1.jar/META-INF/primefaces-i.taglib.xml

                      09:14:36,669 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/primefaces-1.1.jar/META-INF/primefaces-p.taglib.xml

                      09:14:36,670 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/richfaces-ui-3.3.3.Final.jar/META-INF/jsp.taglib.xml

                      09:14:36,672 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/richfaces-ui-3.3.3.Final.jar/META-INF/ajax4jsf.taglib.xml

                      09:14:36,674 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/richfaces-ui-3.3.3.Final.jar/META-INF/richfaces.taglib.xml

                      09:14:36,675 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/richfaces-ui-3.3.3.Final.jar/META-INF/a4j.taglib.xml

                      09:14:36,677 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/richfaces-ui-3.3.3.Final.jar/META-INF/rich.taglib.xml

                      09:14:36,999 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/gmaps4jsf-1.1.3-u3.jar/META-INF/gmaps4jsf.taglib.xml

                      09:14:37,000 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jboss-seam-excel.jar/META-INF/seam-excel.taglib.xml

                      09:14:37,001 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jboss-seam-mail.jar/META-INF/seam-mail.taglib.xml

                      09:14:37,003 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jboss-seam-pdf.jar/META-INF/seam-pdf.taglib.xml

                      09:14:37,005 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jboss-seam-ui.jar/META-INF/s.taglib.xml

                      09:14:37,006 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jstl-fn.taglib.xml

                      09:14:37,007 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jstl-core.taglib.xml

                      09:14:37,008 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jsf-ui.taglib.xml

                      09:14:37,009 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jsf-core.taglib.xml

                      09:14:37,011 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.0.0.Final/standalone/deployments/MyApp.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jsf-html.taglib.xml

                      09:14:37,012 INFO  [facelets.compiler] (http--127.0.0.1-8080-2) Added Library from: vfs:/C:/dev/jboss-as-web-7.7

                      {code}

                       

                      I do not have the time to digg deeper... maybe in next few days.

                       

                      Thank you.

                      • 8. Re: TransactionManager lookup fails on AS7
                        Karsten Wutzke Expert

                        this seemed to work, the error went away if I uncomment the hibernate.transaction.manager_lookup_class in persistence.xml ... . 

                         

                        This isn't needed for AS 7 / Hibernate 4 anyway.

                         

                        Karsten

                        • 9. Re: TransactionManager lookup fails on AS7
                          Michal Huniewicz Newbie

                          I got the exact same problem as Karsten.

                           

                          I'll take a look into Hibernate source to investigate this ugly NPE.

                          • 10. Re: TransactionManager lookup fails on AS7
                            Scott Marlow Master

                            Hibernate 4 supports a new way of specifying the transaction manager, which AS7 adds automatically to the PU properties.  Instead of using "hibernate.transaction.manager_lookup_class", we  use "hibernate.transaction.jta.platform" with an instance of org.hibernate.service.jta.platform.spi.JtaPlatform (which has a reference to the transaction manager directly).

                             

                            I'm thinking that AS7 should remove the "hibernate.transaction.manager_lookup_class" property from the PU definition.  I'll submit a patch for doing that.  The workaround, would be to remove "hibernate.transaction.manager_lookup_class" from your PU definition.

                            • 11. Re: TransactionManager lookup fails on AS7
                              Michal Huniewicz Newbie

                              Hi Scott. I did that, did not help at all.

                              • 12. Re: TransactionManager lookup fails on AS7
                                Michal Huniewicz Newbie

                                As for the NPE, I raised a defect @ Hibernate JIRA: https://hibernate.onjira.com/browse/HHH-6522

                                 

                                My problem was caused by my own error. I was manipulating transaction manager programatically while I should have left it for the server to do. Still, it shouldn't have thrown a NPE in my opinion.

                                • 13. Re: TransactionManager lookup fails on AS7
                                  Michal Huniewicz Newbie

                                  settings.xml

                                   

                                  <?xml version='1.0' encoding='UTF-8'?>

                                   

                                  <server name="M1KE" xmlns="urn:jboss:domain:1.0">

                                      <extensions>

                                          <extension module="org.jboss.as.clustering.infinispan"/>

                                          <extension module="org.jboss.as.connector"/>

                                          <extension module="org.jboss.as.deployment-scanner"/>

                                          <extension module="org.jboss.as.ee"/>

                                          <extension module="org.jboss.as.ejb3"/>

                                          <extension module="org.jboss.as.jaxrs"/>

                                          <extension module="org.jboss.as.jmx"/>

                                          <extension module="org.jboss.as.jpa"/>

                                          <extension module="org.jboss.as.logging"/>

                                          <extension module="org.jboss.as.naming"/>

                                          <extension module="org.jboss.as.osgi"/>

                                          <extension module="org.jboss.as.remoting"/>

                                          <extension module="org.jboss.as.sar"/>

                                          <extension module="org.jboss.as.security"/>

                                          <extension module="org.jboss.as.threads"/>

                                          <extension module="org.jboss.as.transactions"/>

                                          <extension module="org.jboss.as.web"/>

                                          <extension module="org.jboss.as.weld"/>

                                      </extensions>

                                      <management>

                                          <security-realms>

                                              <security-realm name="PropertiesMgmtSecurityRealm">

                                                  <authentication>

                                                      <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>

                                                  </authentication>

                                              </security-realm>

                                          </security-realms>

                                          <management-interfaces>

                                              <native-interface interface="management" port="9999"/>

                                              <http-interface interface="management" port="9990"/>

                                          </management-interfaces>

                                      </management>

                                      <profile>

                                          <subsystem xmlns="urn:jboss:domain:logging:1.0">

                                              <console-handler name="CONSOLE" autoflush="true">

                                                  <level name="INFO"/>

                                                  <formatter>

                                                      <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                                                  </formatter>

                                              </console-handler>

                                              <periodic-rotating-file-handler name="FILE" autoflush="true">

                                                  <level name="INFO"/>

                                                  <formatter>

                                                      <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                                                  </formatter>

                                                  <file relative-to="jboss.server.log.dir" path="server.log"/>

                                                  <suffix value=".yyyy-MM-dd"/>

                                              </periodic-rotating-file-handler>

                                              <logger category="com.arjuna">

                                                  <level name="WARN"/>

                                              </logger>

                                              <logger category="org.apache.tomcat.util.modeler">

                                                  <level name="WARN"/>

                                              </logger>

                                              <logger category="sun.rmi">

                                                  <level name="WARN"/>

                                              </logger>

                                              <root-logger>

                                                  <level name="INFO"/>

                                                  <handlers>

                                                      <handler name="CONSOLE"/>

                                                      <handler name="FILE"/>

                                                  </handlers>

                                              </root-logger>

                                          </subsystem>

                                          <subsystem xmlns="urn:jboss:domain:datasources:1.0">

                                              <datasources>

                                                  <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="H2DS" enabled="true" jta="true" use-java-context="true" use-ccm="true">

                                                      <connection-url>

                                                          jdbc:h2:mem:test;DB_CLOSE_DELAY=-1

                                                      </connection-url>

                                                      <driver>

                                                          h2

                                                      </driver>

                                                      <pool>

                                                          <prefill>

                                                              false

                                                          </prefill>

                                                          <use-strict-min>

                                                              false

                                                          </use-strict-min>

                                                          <flush-strategy>

                                                              FailingConnectionOnly

                                                          </flush-strategy>

                                                      </pool>

                                                      <security>

                                                          <user-name>

                                                              sa

                                                          </user-name>

                                                          <password>

                                                              sa

                                                          </password>

                                                      </security>

                                                      <validation>

                                                          <validate-on-match>

                                                              false

                                                          </validate-on-match>

                                                          <background-validation>

                                                              false

                                                          </background-validation>

                                                          <useFastFail>

                                                              false

                                                          </useFastFail>

                                                      </validation>

                                                  </datasource>

                                                  <datasource jndi-name="java:jboss/datasources/AudioliciousTestDS" pool-name="AudioliciousTestDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">

                                                      <connection-url>

                                                          jdbc:mysql://localhost:3306/audiolicious_test

                                                      </connection-url>

                                                      <driver>

                                                          com.mysql

                                                      </driver>

                                                      <transaction-isolation>

                                                          TRANSACTION_READ_COMMITTED

                                                      </transaction-isolation>

                                                      <pool>

                                                          <min-pool-size>

                                                              10

                                                          </min-pool-size>

                                                          <max-pool-size>

                                                              100

                                                          </max-pool-size>

                                                          <prefill>

                                                              true

                                                          </prefill>

                                                          <use-strict-min>

                                                              false

                                                          </use-strict-min>

                                                          <flush-strategy>

                                                              FailingConnectionOnly

                                                          </flush-strategy>

                                                      </pool>

                                                      <security>

                                                          <user-name>

                                                              root

                                                          </user-name>

                                                          <password>

                                                             

                                                          </password>

                                                      </security>

                                                  </datasource>

                                                  <drivers>

                                                      <driver name="h2" module="com.h2database.h2">

                                                          <xa-datasource-class>

                                                              org.h2.jdbcx.JdbcDataSource

                                                          </xa-datasource-class>

                                                      </driver>

                                                      <driver name="com.mysql" module="com.mysql">

                                                          <xa-datasource-class>

                                                              com.mysql.jdbc.jdbc2.optional.MysqlXADataSource

                                                          </xa-datasource-class>

                                                      </driver>

                                                  </drivers>

                                              </datasources>

                                          </subsystem>

                                          <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">

                                              <deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir" deployment-timeout="60"/>

                                          </subsystem>

                                          <subsystem xmlns="urn:jboss:domain:ee:1.0"/>

                                          <subsystem xmlns="urn:jboss:domain:ejb3:1.0"/>

                                          <subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="hibernate">

                                              <cache-container name="hibernate" default-cache="local-query">

                                                  <local-cache name="entity">

                                                      <eviction strategy="LRU" max-entries="10000"/>

                                                      <expiration max-idle="100000"/>

                                                  </local-cache>

                                                  <local-cache name="local-query">

                                                      <eviction strategy="LRU" max-entries="10000"/>

                                                      <expiration max-idle="100000"/>

                                                  </local-cache>

                                                  <local-cache name="timestamps">

                                                      <eviction strategy="NONE"/>

                                                  </local-cache>

                                              </cache-container>

                                          </subsystem>

                                          <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>

                                          <subsystem xmlns="urn:jboss:domain:jca:1.0">

                                              <archive-validation enabled="false"/>

                                              <bean-validation enabled="false"/>

                                              <default-workmanager>

                                                  <short-running-threads blocking="true" allow-core-timeout="false">

                                                      <core-threads count="10" per-cpu="20"/>

                                                      <queue-length count="10" per-cpu="20"/>

                                                      <max-threads count="10" per-cpu="20"/>

                                                      <keepalive-time time="10" unit="SECONDS"/>

                                                  </short-running-threads>

                                                  <long-running-threads blocking="true" allow-core-timeout="false">

                                                      <core-threads count="10" per-cpu="20"/>

                                                      <queue-length count="10" per-cpu="20"/>

                                                      <max-threads count="10" per-cpu="20"/>

                                                      <keepalive-time time="10" unit="SECONDS"/>

                                                  </long-running-threads>

                                              </default-workmanager>

                                          </subsystem>

                                          <subsystem xmlns="urn:jboss:domain:jmx:1.0">

                                              <jmx-connector server-binding="jmx-connector-server" registry-binding="jmx-connector-registry"/>

                                          </subsystem>

                                          <subsystem xmlns="urn:jboss:domain:jpa:1.0">

                                              <jpa default-datasource=""/>

                                          </subsystem>

                                          <subsystem xmlns="urn:jboss:domain:naming:1.0"/>

                                          <subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">

                                              <configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">

                                                  <property name="manager.root">

                                                      jboss-osgi

                                                  </property>

                                              </configuration>

                                              <properties>

                                                  <property name="org.jboss.osgi.system.modules">

                                                      org.apache.commons.logging,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org.apache.log4j,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org.jboss.as.osgi,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org.slf4j,

                                                  </property>

                                                  <property name="org.osgi.framework.system.packages.extra">

                                                      org.apache.commons.logging;version=1.1.1,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org.apache.log4j;version=1.2,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org.jboss.as.osgi.service;version=7.0,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org.jboss.osgi.deployment.interceptor;version=1.0,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org.jboss.osgi.spi.capability;version=1.0,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org.jboss.osgi.spi.util;version=1.0,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org.jboss.osgi.testing;version=1.0,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org.jboss.osgi.vfs;version=1.0,

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org.slf4j;version=1.5.10,

                                                  </property>

                                                  <property name="org.osgi.framework.startlevel.beginning">

                                                      1

                                                  </property>

                                              </properties>

                                              <modules>

                                                  <module identifier="javaee.api"/>

                                                  <module identifier="org.jboss.logging"/>

                                                  <module identifier="org.apache.aries.util"/>

                                                  <module identifier="org.jboss.osgi.webconsole"/>

                                                  <module identifier="org.osgi.compendium"/>

                                                  <module identifier="org.apache.felix.log" startlevel="1"/>

                                                  <module identifier="org.jboss.osgi.logging" startlevel="1"/>

                                                  <module identifier="org.apache.felix.configadmin" startlevel="1"/>

                                                  <module identifier="org.jboss.as.osgi.configadmin" startlevel="1"/>

                                                  <module identifier="org.apache.aries.jmx" startlevel="2"/>

                                                  <module identifier="org.apache.felix.eventadmin" startlevel="2"/>

                                                  <module identifier="org.apache.felix.metatype" startlevel="2"/>

                                                  <module identifier="org.apache.felix.scr" startlevel="2"/>

                                                  <module identifier="org.apache.felix.webconsole" startlevel="2"/>

                                                  <module identifier="org.jboss.osgi.jmx" startlevel="2"/>

                                                  <module identifier="org.jboss.osgi.http" startlevel="2"/>

                                                  <module identifier="org.jboss.osgi.blueprint" startlevel="3"/>

                                                  <module identifier="org.jboss.osgi.webapp" startlevel="3"/>

                                                  <module identifier="org.jboss.osgi.xerces" startlevel="3"/>

                                              </modules>

                                          </subsystem>

                                          <subsystem xmlns="urn:jboss:domain:remoting:1.0"/>

                                          <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>

                                          <subsystem xmlns="urn:jboss:domain:sar:1.0"/>

                                          <subsystem xmlns="urn:jboss:domain:security:1.0">

                                              <security-domains>

                                                  <security-domain name="other" cache-type="default">

                                                      <authentication>

                                                          <login-module code="UsersRoles" flag="required"/>

                                                      </authentication>

                                                  </security-domain>

                                              </security-domains>

                                          </subsystem>

                                          <subsystem xmlns="urn:jboss:domain:threads:1.0"/>

                                          <subsystem xmlns="urn:jboss:domain:transactions:1.0">

                                              <core-environment>

                                                  <process-id>

                                                      <uuid/>

                                                  </process-id>

                                              </core-environment>

                                              <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

                                              <coordinator-environment default-timeout="3600"/>

                                              <object-store/>

                                          </subsystem>

                                          <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">

                                              <connector name="http" protocol="HTTP/1.1" socket-binding="http" scheme="http"/>

                                              <virtual-server name="default-host" enable-welcome-root="true">

                                                  <alias name="localhost"/>

                                                  <alias name="example.com"/>

                                              </virtual-server>

                                          </subsystem>

                                          <subsystem xmlns="urn:jboss:domain:weld:1.0"/>

                                      </profile>

                                      <interfaces>

                                          <interface name="management">

                                              <inet-address value="127.0.0.1"/>

                                          </interface>

                                          <interface name="public">

                                              <inet-address value="127.0.0.1"/>

                                          </interface>

                                      </interfaces>

                                      <socket-binding-group name="standard-sockets" default-interface="public">

                                          <socket-binding name="http" port="8080"/>

                                          <socket-binding name="https" port="8443"/>

                                          <socket-binding name="jmx-connector-registry" port="1090"/>

                                          <socket-binding name="jmx-connector-server" port="1091"/>

                                          <socket-binding name="jndi" port="1099"/>

                                          <socket-binding name="osgi-http" port="8090"/>

                                          <socket-binding name="remoting" port="4447"/>

                                          <socket-binding name="txn-recovery-environment" port="4712"/>

                                          <socket-binding name="txn-status-manager" port="4713"/>

                                      </socket-binding-group>

                                      <deployments>

                                          <deployment name="arquillian-service" runtime-name="arquillian-service">

                                              <content sha1="0dc9da68fc6bd01befdae304684d90f2afeaba31"/>

                                          </deployment>

                                      </deployments>

                                  </server>

                                  1 2 Previous Next