14 Replies Latest reply on Jan 21, 2013 9:42 PM by Holger L

    enterprise application deployment on Jboss 7.1

    shaikh dahood Newbie

      Hi Guys,

       

      I developed an enterprise application and when i deploy it on server  its taking a lot of time to get deployed.

      Finally I get the below error message  in my console,

       

      00:42:25,629 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA012117: TransactionReaper::check timeout for TX 0:ffff0aaa1875:32517c93:50d2b1cb:c in state  RUN

      00:42:25,629 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012095: Abort of action id 0:ffff0aaa1875:32517c93:50d2b1cb:c invoked while multiple threads active within it.

      00:42:25,645 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012108: CheckedAction::check - atomic action 0:ffff0aaa1875:32517c93:50d2b1cb:c aborting with 1 threads active!

      00:42:25,645 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012121: TransactionReaper::doCancellations worker Thread[Transaction Reaper Worker 0,5,main] successfully canceled TX 0:ffff0aaa1875:32517c93:50d2b1cb:c

       

       

      During this when i see my deployment folder in Jboss , i see the myapp.ear.isdeploying and myapp.ear

      Once i get the above error i see that my application has silently failed to deploy on to the server.

      Can any one please help me why my app is taking lot of time to deploy on to the server and failing.

        • 1. Re: enterprise application deployment on Jboss 7.1
          Nicklas Karlsson Master

          Do you have any @Startup or other @PostConstruct stuff that accesses transactional resources? You could try do a jstack dump when the hang occurs.

          • 2. Re: enterprise application deployment on Jboss 7.1
            shaikh dahood Newbie

            Thanks Nick for replying!

             

            Yes, i do have @Startup stuff that accesses transactional resources.

            Can you please tell me how can i do jstack ?

            • 3. Re: enterprise application deployment on Jboss 7.1
              Nicklas Karlsson Master

              http://middlewaremagic.com/weblogic/?p=2281

               

              It probably goes waiting for a resource that's not there until deployment is complete and so it hangs, failing the deployment with a timeout.

              • 4. Re: enterprise application deployment on Jboss 7.1
                shaikh dahood Newbie

                Yes you are right, its waiting for an object lock.

                So how could i get rid of it, any idea please, because looking in to the jstack i see only the Waiting information of ejb module from jboss.

                • 5. Re: enterprise application deployment on Jboss 7.1
                  Nicklas Karlsson Master

                  Well if you can track down the actual bean where this is happening I guess the offending code must be moved out to a later state (lazy load on first access perhaps)

                  • 6. Re: enterprise application deployment on Jboss 7.1
                    shaikh dahood Newbie

                    Thanks Nick!

                    Now I removed the loading of the resources @startup and now i get the below error

                    05:39:34,235 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.persistenceunit."myapp.ear/myappejb.jar#ejb3DX2": org.jboss.msc.service.StartException in service jboss.persistenceunit."myapp.ear/myapp.jar#ejb3DX2": Failed to start service

                              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_14]

                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_14]

                              at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_14]

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

                              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)

                              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)

                              at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)

                              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)

                              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)

                              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                              ... 3 more

                    Caused by: org.hibernate.HibernateException: Unable to determine Dialect to use [name=DB2, majorVersion=9]; user must register resolver or explicitly set 'hibernate.dialect'

                              at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:105)

                              at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:67)

                              at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:148)

                              at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)

                              at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)

                              at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)

                              at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)

                              at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2270)

                              at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2266)

                              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1735)

                              at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)

                              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)

                              ... 9 more

                     

                    what might be going wrong?

                    • 8. Re: enterprise application deployment on Jboss 7.1
                      shaikh dahood Newbie

                      I dont use Hibernate in my app i use JPA with ejb.

                      • 9. Re: enterprise application deployment on Jboss 7.1
                        Nicklas Karlsson Master

                        The stacktrace begs to differ (hibernate is the default provider on the AS)

                        • 10. Re: enterprise application deployment on Jboss 7.1
                          shaikh dahood Newbie

                          Also One thing Nick i use db2 and do you have any idea what is wrong when we get below error

                           

                          05:59:23,765 WARN  [org.hibernate.engine.jdbc.internal.JdbcServicesImpl] (MSC service thread 1-2) HHH000341: Could not obtain connection metadata : DatabaseMetaData information is not known for server DB2DSN09015 by this version of JDBC driver

                          05:59:23,812 INFO  [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (MSC service thread 1-2) HHH000422: Disabling contextual LOB creation as connection was null

                          05:59:23,812 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.persistenceunit."mayaap.ear/mayappejb.jar#ejb3DX2": org.jboss.msc.service.StartException in service jboss.persistenceunit."myapp.ear/myappejb.jar#ejb3DX2": Failed to start service

                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_14]

                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_14]

                                    at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_14]

                          Caused by: java.lang.NullPointerException

                                    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:209)

                                    at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)

                                    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)

                                    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)

                                    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)

                                    at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2270)

                                    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2266)

                                    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1735)

                                    at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)

                                    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)

                                    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)

                                    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)

                                    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)

                                    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)

                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                                    ... 3 more

                           

                          Am i using the wrong version of db2?

                          • 11. Re: enterprise application deployment on Jboss 7.1
                            Nicklas Karlsson Master

                            Hmm. Show your complete persistence.xml

                            • 12. Re: enterprise application deployment on Jboss 7.1
                              shaikh dahood Newbie

                              <persistence version="1.0" 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">

                                <persistence-unit name="ejb3DX2">

                                           <jta-data-source>java:jboss/datasources/jdbc/dx2Datasource</jta-data-source>        

                                  <properties>

                                            <property name="openjpa.jdbc.UpdateManager" value="operation-order"/>

                                            <property name="kodo.jdbc.Schema" value="CID786"/>

                                   </properties>

                                </persistence-unit>

                              </persistence>

                              • 13. Re: enterprise application deployment on Jboss 7.1
                                Nicklas Karlsson Master

                                Try adding a dialect property from

                                 

                                • DB2 org.hibernate.dialect.DB2Dialect
                                • DB2 AS/400 org.hibernate.dialect.DB2400Dialect
                                • DB2 OS390 org.hibernate.dialect.DB2390Dialect

                                 

                                Of course, Hibernate will not do anything with your openjpa-properties.

                                • 14. Re: enterprise application deployment on Jboss 7.1
                                  Holger L Newbie

                                  Hi Shaik,

                                   

                                  Have you been able to resolve this issue? I'm hitting a very similar exception (using Sybase 12)

                                   

                                  2013-01-22 13:18:31,584 WARN  [org.hibernate.engine.jdbc.internal.JdbcServicesImpl] (MSC service thread 1-3) HHH000341: Could not obtain connection metadata : JZ0SJ: Metadata accessor information was not found on this database. Please install the required tables as mentioned in the jConnect documentation.

                                  2013-01-22 13:18:31,585 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (MSC service thread 1-3) tradingPlatform: returnConnection(466ffb14, false) [1/19]

                                  2013-01-22 13:18:31,585 INFO  [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (MSC service thread 1-3) HHH000422: Disabling contextual LOB creation as connection was null

                                  2013-01-22 13:18:31,585 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.persistenceunit."commissions.ear/commissions-db-ejb.jar#tradingPlatform": org.jboss.msc.service.StartException in service jboss.persistenceunit."commissions.ear/commissions-db-ejb.jar#tradingPlatform": Failed to start service

                                            at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

                                            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]

                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]

                                            at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]

                                  Caused by: java.lang.NullPointerException

                                            at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:207)

                                   

                                  Thanks

                                   

                                  Holger