-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: UnsupportedOperationException -WAS 8.5 with Hibernate 4.2.7
PostPosted: Thu May 26, 2016 1:03 am 
Newbie

Joined: Thu May 26, 2016 12:41 am
Posts: 1
I am running into problems when persisting an Entity using hibernate (4.2.7) in an ejb application. Below are the configuration for the transaction factory and transaction manager in my hibernate configuration file.
Code:
<property name="hibernate.transaction.factory_class">
        org.hibernate.transaction.CMTTransactionFactory
    </property>
  <property name="hibernate.transaction.manager_lookup_class">
    org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
    </property>

whenever there is an SQL exception for example, passing an null value to a not null column, constraint issue etc, we are getting the below exception
Code:
[5/22/16 15:15:21:481 MYT] 000000b7 RegisteredSyn E   WTRN0074E: Exception caught from before_completion synchronization operation: java.lang.UnsupportedOperationException
        at org.hibernate.service.jta.platform.internal.WebSphereExtendedJtaPlatform$TransactionManagerAdapter.setRollbackOnly(WebSphereExtendedJtaPlatform.java:139)
        at org.hibernate.engine.transaction.internal.jta.CMTTransaction.markRollbackOnly(CMTTransaction.java:131)
        at org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.setRollbackOnly(TransactionCoordinatorImpl.java:306)
        at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.setRollbackOnly(SynchronizationCallbackCoordinatorImpl.java:127)
        at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:117)
        at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53)
        at org.hibernate.service.jta.platform.internal.WebSphereExtendedJtaPlatform$TransactionManagerAdapter$TransactionAdapter$1.invoke(WebSphereExtendedJtaPlatform.java:176)
        at com.sun.proxy.$Proxy75.beforeCompletion(Unknown Source)

Because of which we are unable to determine what is the actual issue, Our database is Oracle. Is there any way that we can get the exact SQLException thrown ?
Pls note:
After changing the same to org.hibernate.transaction.WebSphereTransactionManagerLookup, we are getting the exact SQLException.
Code:
[5/24/16 18:43:33:561 GMT+08:00] 000000b6 SystemErr     R Caused by: java.sql.SQLException: ORA-12899: value too large for column "ICMDEV"."CUST_EMPLOYMENTS"."PROFESSION_CODE" (actual: 7, maximum: 3)
[5/24/16 18:43:33:561 GMT+08:00] 000000b6 SystemErr     R
[5/24/16 18:43:33:561 GMT+08:00] 000000b6 SystemErr     R       at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
[5/24/16 18:43:33:561 GMT+08:00] 000000b6 SystemErr     R       at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
[5/24/16 18:43:33:561 GMT+08:00] 000000b6 SystemErr     R       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.ja


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.