[JBoss Portal] - org.jboss.util.NestedSQLException: Could not enlist in trans
by advaittrivedi
I have a jar file having following hibernate.cfg.xml
| <property name="hibernate.current_session_context_class">thread</property>
| <property name="connection.datasource">java:MyDS</property>
| <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
| <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
| <property name="show_sql">true</property>
| <property name="hbm2ddl.auto">update</property>
| <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
| <mapping resource="Ticker.hbm.xml" ></mapping>
|
MyDS is defined as:
| <datasources>
| <local-tx-datasource>
| <jndi-name>AutoworldDS</jndi-name>
| <connection-url>jdbc:mysql://localhost:3306/myds?autoReconnect=true</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>xxx</user-name>
| <password>xxx</password>
| <min-pool-size>0</min-pool-size>
| <max-pool-size>20</max-pool-size>
| <idle-timeout-minutes>300</idle-timeout-minutes>
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
| <dialect>org.hibernate.dialect.MySQLDialect</dialect>
| </local-tx-datasource>
| </datasources>
|
when I try to get hibernate session factory using:
| Configuration conf = new Configuration().configure();
| return conf.buildSessionFactory();
|
I am getting these exceptions:
| 19:52:38,843 WARN [SettingsFactory] Could not obtain connection metadata
| org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwabl
| e: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. t
| x=TransactionImple < ac, BasicAction: -53eb9fe6:4a3:47595665:106 status: ActionStatus.ABORT_ONLY >); - nested throwa
| ble: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - n
| ested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previo
| us warnings. tx=TransactionImple < ac, BasicAction: -53eb9fe6:4a3:47595665:106 status: ActionStatus.ABORT_ONLY >))
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
| at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111252#4111252
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111252
18 years, 4 months
[JBoss Seam] - Staying sane (or how do I keep up with Seam releases)?
by gmarcus
Can anyone share their strategy for updating to new releases of seam?
I am currently using Seam 2.0.0 CR1 and about to update to 2.0.0 GA.
I installed both versions and did a seam-gen with each and saw a lot of changes to the resource files and project structure.
When I have done upgrades in the past, I have done the following:
1. seam-gen a new project
2. diff the new project with my existing project
3. manually merge over any of my changes to files under resources which usually includes
import-dev.sql
import-test.sql
import-prod.sql
META-INF/persistence-dev.xml
META-INF/persistence-test.xml
META-INF/persistence-prod.xml
WEB-INF/components.xml
WEB-INF/faces-config.xml
WEB-INF/pages.xml
WEB-INF/web.xml
4. bulk copy over my view and src directories
Steps 2 and 3 are error prone and labor intensive.
I looked at using seam-gen update-project but that only copies over new libs and doesn't migrate changes to files in teh
I was thinking about moving to nightly builds on CVS, but I would go insane if I did this process everyday.
What do you do?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111247#4111247
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111247
18 years, 4 months