Initial testing in Oracle 9i was not promising (using the latest driver 
(Oracle JDBC Driver version - 9.0.2.0.0):

2002-06-18 23:39:05,843 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.SimpleEJB] 
Executing SQL: UPDATE SIMPLE SET booleanPrimitive=?, booleanObject=?, 
bytePrimitive=?, byteObject=?, shortPrimitive=?, shortObject=?, 
integerPrimitive=?, integerObject=?, longPrimitive=?, longObject=?, 
floatPrimitive=?, floatObject=?, doublePrimitive=?, doubleObject=?, 
stringValue=?, utilDateValue=?, sqlDateValue=?, timeValue=?, 
timestampValue=?, bigDecimalValue=?, byteArrayValue=?, objectValue=? 
WHERE id=?
2002-06-18 23:39:05,848 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.booleanPrimitive]
  Set parameter: index=1, jdbcType=BIT, value=true
2002-06-18 23:39:05,849 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.booleanObject]
  Set parameter: index=2, jdbcType=BIT, value=false
2002-06-18 23:39:05,849 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.bytePrimitive]
  Set parameter: index=3, jdbcType=TINYINT, value=11
2002-06-18 23:39:05,849 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.byteObject]
  Set parameter: index=4, jdbcType=TINYINT, value=22
2002-06-18 23:39:05,849 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.shortPrimitive]
  Set parameter: index=5, jdbcType=SMALLINT, value=33
2002-06-18 23:39:05,850 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.shortObject]
  Set parameter: index=6, jdbcType=SMALLINT, value=44
2002-06-18 23:39:05,850 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.integerPrimitive]
  Set parameter: index=7, jdbcType=INTEGER, value=55
2002-06-18 23:39:05,850 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.integerObject]
  Set parameter: index=8, jdbcType=INTEGER, value=66
2002-06-18 23:39:05,850 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.longPrimitive]
  Set parameter: index=9, jdbcType=BIGINT, value=77
2002-06-18 23:39:05,851 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.longObject]
  Set parameter: index=10, jdbcType=BIGINT, value=88
2002-06-18 23:39:05,851 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.floatPrimitive]
  Set parameter: index=11, jdbcType=REAL, value=11.11
2002-06-18 23:39:05,851 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.floatObject]
  Set parameter: index=12, jdbcType=REAL, value=22.22
2002-06-18 23:39:05,855 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.doublePrimitive]
  Set parameter: index=13, jdbcType=DOUBLE, value=33.33
2002-06-18 23:39:05,855 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.doubleObject]
  Set parameter: index=14, jdbcType=DOUBLE, value=44.44
2002-06-18 23:39:05,855 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.stringValue]
  Set parameter: index=15, jdbcType=VARCHAR, value=test string value
2002-06-18 23:39:05,856 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.utilDateValue]
  Set parameter: index=16, jdbcType=TIMESTAMP, value=Thu Jan 01 11:00:01 
EST 1970
2002-06-18 23:39:05,856 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.sqlDateValue]
  Set parameter: index=17, jdbcType=DATE, value=1981-05-05
2002-06-18 23:39:05,857 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.timeValue]
  Set parameter: index=18, jdbcType=TIME, value=22:33:44
2002-06-18 23:39:05,858 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.timestampValue]
  Set parameter: index=19, jdbcType=TIMESTAMP, value=1970-01-01 
11:00:04.444
2002-06-18 23:39:05,858 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.bigDecimalValue]
  Set parameter: index=20, jdbcType=DECIMAL, value=12345678
2002-06-18 23:39:05,859 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.SimpleEJB.byteArrayValue]
  Set parameter: index=21, jdbcType=BLOB, value=[B@2d54c5
2002-06-18 23:39:05,861 ERROR [org.jboss.ejb.GlobalTxEntityMap] Store 
failed on entity: simple
javax.ejb.EJBException: Store failed; CausedByException is:
        org.jboss.ejb.plugins.cmp.jdbc.ByteArrayBlob
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute
(JDBCStoreEntityCommand.java:94)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity
(JDBCStoreManager.java:586)
        at 
org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity
(CMPPersistenceManager.java:458)
        at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(
CachedConnectionInterceptor.java:388)
        at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:698)
        at 
org.jboss.ejb.GlobalTxEntityMap.syncEntities(GlobalTxEntityMap.java:99)
        at 
org.jboss.ejb.GlobalTxEntityMap$GlobalTxEntityMapCleanup.beforeCompletion(
GlobalTxEntityMap.java:168)
        at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1331)
        at org.jboss.tm.TxCapsule.commit(TxCapsule.java:328)
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:74)
        at org.jboss.tm.TxManager.commit(TxManager.java:138)
        at 
org.jboss.ejb.EnterpriseContext$UserTransactionImpl.commit
(EnterpriseContext.java:439)
        at 
net.sourceforge.junitejb.EJBTestRunnerBean.setUpEJB(EJBTestRunnerBean.java:
77)
        at 
net.sourceforge.junitejb.EJBTestRunnerBean.run(EJBTestRunnerBean.java:40)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke
(StatelessSessionContainer.java:606)
        at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke
(CachedConnectionInterceptor.java:186)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext
(AbstractTxInterceptor.java:96)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext
(AbstractTxInterceptorBMT.java:144)
        at 
org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
        at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke
(StatelessSessionInstanceInterceptor.java:77)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:
129)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:183)
        at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke
(ProxyFactoryFinderInterceptor.java:156)
        at 
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:
303)
        at org.jboss.ejb.Container.invoke(Container.java:687)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
        at 
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:321)
        at java.lang.reflect.Method.invoke(Native Method)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
        at sun.rmi.transport.Transport$1.run(Transport.java:152)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
        at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
        at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:
706)
        at java.lang.Thread.run(Thread.java:496)
java.lang.ClassCastException: 
org.jboss.ejb.plugins.cmp.jdbc.ByteArrayBlob
        at 
oracle.jdbc.driver.OraclePreparedStatement.setBlob
(OraclePreparedStatement.java:2056)
        at 
org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.setBlob
(LocalPreparedStatement.java:680)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter(JDBCUtil.java:220)
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgumentParameters(
JDBCAbstractCMPFieldBridge.java:283)
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInstanceParameters(
JDBCAbstractCMPFieldBridge.java:262)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute
(JDBCStoreEntityCommand.java:85)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity
(JDBCStoreManager.java:586)
        at 
org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity
(CMPPersistenceManager.java:458)
        at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(
CachedConnectionInterceptor.java:388)
        at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:698)
        at 
org.jboss.ejb.GlobalTxEntityMap.syncEntities(GlobalTxEntityMap.java:99)
        at 
org.jboss.ejb.GlobalTxEntityMap$GlobalTxEntityMapCleanup.beforeCompletion(
GlobalTxEntityMap.java:168)
        at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1331)
        at org.jboss.tm.TxCapsule.commit(TxCapsule.java:328)
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:74)
        at org.jboss.tm.TxManager.commit(TxManager.java:138)
        at 
org.jboss.ejb.EnterpriseContext$UserTransactionImpl.commit
(EnterpriseContext.java:439)
        at 
net.sourceforge.junitejb.EJBTestRunnerBean.setUpEJB(EJBTestRunnerBean.java:
77)
        at 
net.sourceforge.junitejb.EJBTestRunnerBean.run(EJBTestRunnerBean.java:40)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke
(StatelessSessionContainer.java:606)
        at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke
(CachedConnectionInterceptor.java:186)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext
(AbstractTxInterceptor.java:96)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext
(AbstractTxInterceptorBMT.java:144)
        at 
org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
        at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke
(StatelessSessionInstanceInterceptor.java:77)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:
129)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:183)
        at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke
(ProxyFactoryFinderInterceptor.java:156)
        at 
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:
303)
        at org.jboss.ejb.Container.invoke(Container.java:687)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
        at 
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:321)
        at java.lang.reflect.Method.invoke(Native Method)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
        at sun.rmi.transport.Transport$1.run(Transport.java:152)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
        at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
        at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:
706)
        at java.lang.Thread.run(Thread.java:496)

One observable difference between this driver and its predecessors is 
that java.lang.Byte and java.lang.Short mappings to TINYINT and SMALLINT 
now work from PreparedStatement.setObject. These were previously 
required to be NUMERIC, otherwise a ClassCastException like the above 
would occur.


On Sunday, June 16, 2002, at 03:28  PM, Dain Sundstrom wrote:

> I just committed the code from patch [ 525663 ] CMP and oracle blobs. 
> Can some with Oracle check if the code actually works?
>
> The following command will execute a new test I added which has a field 
> of every type:
>
> ./build.sh -Dtest=org.jboss.test.cmp2.simple.SimpleUnitTestCase one-test
>
> You'll need to change the datasource and datasource-mapping in the
> src/resources/cmp2/simple/META-INF/jbosscmp-jdbc.xml file.
>
> This won't work perfectly for every database vendor, because some 
> vendor's don't support millisecond precise time and nanosecond precise 
> timestamp values.  The test that is important for blobs is 
> testObjectValue.


----------------------------------------------------------------------------
                   Bringing you mounds of caffeinated joy
                      >>>     http://thinkgeek.com/sf    <<<

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to