-
1. Re: enterprise application deployment on Jboss 7.1
nickarls Dec 20, 2012 2:58 AM (in response to shaikhdahood)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
shaikhdahood Dec 20, 2012 3:27 AM (in response to nickarls)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
nickarls Dec 20, 2012 3:33 AM (in response to shaikhdahood)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
shaikhdahood Dec 20, 2012 3:55 AM (in response to nickarls)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
nickarls Dec 20, 2012 4:12 AM (in response to shaikhdahood)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
shaikhdahood Dec 20, 2012 6:44 AM (in response to nickarls)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?
-
7. Re: enterprise application deployment on Jboss 7.1
nickarls Dec 20, 2012 6:59 AM (in response to shaikhdahood)You probably need in your persistence.xml a
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
(or appropriate type)
-
8. Re: enterprise application deployment on Jboss 7.1
shaikhdahood Dec 20, 2012 7:04 AM (in response to nickarls)I dont use Hibernate in my app i use JPA with ejb.
-
9. Re: enterprise application deployment on Jboss 7.1
nickarls Dec 20, 2012 7:10 AM (in response to shaikhdahood)The stacktrace begs to differ (hibernate is the default provider on the AS)
-
10. Re: enterprise application deployment on Jboss 7.1
shaikhdahood Dec 20, 2012 7:12 AM (in response to shaikhdahood)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
nickarls Dec 20, 2012 7:16 AM (in response to shaikhdahood)Hmm. Show your complete persistence.xml
-
12. Re: enterprise application deployment on Jboss 7.1
shaikhdahood Dec 20, 2012 7:20 AM (in response to nickarls)<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
nickarls Dec 21, 2012 1:47 AM (in response to shaikhdahood)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.lierse Jan 21, 2013 9:42 PM (in response to shaikhdahood)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