I am trying to use "org.jboss.ejb.plugins.lock.JDBCOptimisticLock" in the 
"Standard CMP 2.x EntityBean" container configuration with commit option ?A? in 
conjunction with optimistic read or modified locking strategy tags of the 
entity beans in jbosscmp-jdbc.xml.
If I do not define any strategy then all seems well, As soon as I define one of 
the optimistic read or modified strategies the I get exceptions.
When specifying the read strategy: 

<optimistic-locking>
    <read-strategy/>
</optimistic-locking>

in the entity beans tags in jbosscmp-jdbc.xml
I get an exception thrown:

2005-04-24 11:39:21,546 ERROR [org.jboss.ejb.plugins.LogInterceptor] 
TransactionRolledbackLocalException in method: public abstract void 
javax.ejb.EJBLocalObject.remove() throws 
javax.ejb.RemoveException,javax.ejb.EJBException, causedBy:
java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got BLOB
 
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
      at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
      at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
      at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
      at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
      at 
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
      at 
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
      at 
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
      at 
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
      at 
org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:63)
      at 
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:335)
      at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:136)
      at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:651)
      at 
org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:369)
      at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:394)
      at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:693)
      at 
org.jboss.ejb.GlobalTxEntityMap$2.synchronize(GlobalTxEntityMap.java:134)
      at 
org.jboss.ejb.GlobalTxEntityMap$GlobalTxSynchronization.synchronize(GlobalTxEntityMap.java:253)
      at 
org.jboss.ejb.GlobalTxEntityMap.synchronizeEntities(GlobalTxEntityMap.java:166)
      at 
org.jboss.ejb.EntityContainer.synchronizeEntitiesWithinTransaction(EntityContainer.java:119)
      at org.jboss.ejb.EntityContainer.remove(EntityContainer.java:496)

When specifying the modified strategy: 

<optimistic-locking>
    <modified-strategy/>
</optimistic-locking>

The error (at a totaly different location in the application changes to:

2005-04-24 11:59:04,031 ERROR [org.jboss.ejb.plugins.LogInterceptor] 
TransactionRolledbackLocalException in method: public abstract 
com.ascom.opentas.as.element.internal.entitybeans.Simpleattribute 
com.ascom.opentas.as.element.internal.entitybeans.SimpleattributeHome.findAttribute(java.lang.Long,java.lang.String)
 throws javax.ejb.FinderException, causedBy:
javax.ejb.EJBException: Update failed. Expected one affected row: 
rowsAffected=0, id=7191
      at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:155)
      at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:651)
      at 
org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:369)
      at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:394)
      at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:693)
      at 
org.jboss.ejb.GlobalTxEntityMap$2.synchronize(GlobalTxEntityMap.java:134)
      at 
org.jboss.ejb.GlobalTxEntityMap$GlobalTxSynchronization.synchronize(GlobalTxEntityMap.java:253)
      at 
org.jboss.ejb.GlobalTxEntityMap.synchronizeEntities(GlobalTxEntityMap.java:166)
      at 
org.jboss.ejb.EntityContainer.synchronizeEntitiesWithinTransaction(EntityContainer.java:119)
      at 
org.jboss.ejb.EntityContainer.findSingleObject(EntityContainer.java:1040)
      at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:627)

Could anyone help me out here.
What am I doing wrong.

We currently are using jboss-3.2.6RC2 (with JRE 1.4.2_07) together with 
Oracle9i as DB

Thanks for any suggestion.

Christian Percy


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3875377#3875377

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3875377


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to