Re: [JBoss-user] Problem with ORACLE CMP and BLOBS
one of my CMP fields is a byte[] that can get quite large JAWS creates a table with this field mapped onto a BLOB type. When I try to create the entity if the byte[] contains several k's of data I get the following exception. [docSession] javax.ejb.CreateException: Could not create entity:java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column Edit the table and change the column type to LONGVARBINARY and it should work. With the advent of JDBC 3, soon to be released as part of JDK1.4 aka Merlin, this should cease to be an issue, however Oracle is less than famous for the speed with which it responds to JDK spec changes and it may be quite a while before an Oracle JDBC 3 driver is available. For those who do not know much about LOB data (BLOB, CLOB etc) versus LONG data (LONGVARBINARY, LONGVARCHAR etc) under Oracle, I am thinking of putting a short whitepaper about this on my webserver. Give me some feedback on the level of interest, as this will not be a trivial effort. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Problem with ORACLE CMP and BLOBS
Hi, I'm trying to use CMP with an oracle data source. one of my CMP fields is a byte[] that can get quite large JAWS creates a table with this field mapped onto a BLOB type. When I try to create the entity if the byte[] contains several k's of data I get the following exception. [docSession] javax.ejb.CreateException: Could not create entity:java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column Is there a way to store large objects using CMP with Oracle? In the mailing list archive there was a similar problem using BMP which required rewritting the methods ejbCreate etc. Will I have to change to BMP and work this way? Is it possible to mix BMP and CMP in the same Entity Bean? thanks -Michael [JAWS] java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column [JAWS] [JAWS] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114) [JAWS] at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208) [JAWS] at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542) [JAWS] at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311) [JAWS] at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:738) [JAWS] at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313 ) [JAWS] at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232) [JAWS] at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1 353) [JAWS] at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760) [JAWS] at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java :1807) [JAWS] at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState ment.java:332) [JAWS] at org.opentools.minerva.jdbc.PreparedStatementInPool.executeUpdate(PreparedSta tementInPool.java:82) [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCUpdateCommand.executeStatementAndHandleR esult(JDBCUpdateCommand.java:49) [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:159 ) [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEn tityCommand.java:135) [JAWS] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersisten ceManager.java:122) [JAWS] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManag er.java:207) [JAWS] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441) [JAWS] at java.lang.reflect.Method.invoke(Native Method) [JAWS] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContaine r.java:639) [JAWS] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySync hronizationInterceptor.java:160) [JAWS] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt erceptor.java:87) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:445) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86) [JAWS] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav a:151) [JAWS] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106) [JAWS] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316) [JAWS] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai nerInvoker.java:425) [JAWS] at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:212) [JAWS] at $Proxy8.create(Unknown Source) [JAWS] at com.icl.itc.doclog.document.docSession.addDocument(docSession.java:185) [JAWS] at java.lang.reflect.Method.invoke(Native Method) [JAWS] at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulS essionContainer.java:570) [JAWS] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:17 7) [JAWS] at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSess ionInstanceInterceptor.java:206) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:263) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) [JAWS] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) [JAWS] at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java: 326) [JAWS] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI nvoker.java:381) [JAWS] at java.lang.reflect.Method.invoke(Native Method) [JAWS] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241) [JAWS] at sun.rmi.transport.Transport$1.run(Transport.java:142) [JAWS] at java.security.AccessController.doPrivileged(Native Method) [JAWS] at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
RE: [JBoss-user] Problem with ORACLE CMP and BLOBS
My friend ! CMPing a LOB has not yet been proven to be possible using jboss+oracle. Even Oracle's JServer's EJB server doesnt CMP a LOB !!! (I heard it today from Oracle support, it took them 2 months to clarify this issue for me... they say : maybe Oracle9 will do it... ye right) (If you do manage to do it somehow, cry it out loud !!!) BMP it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Noonan Michael Sent: Thursday, March 22, 2001 7:59 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] Problem with ORACLE CMP and BLOBS Hi, I'm trying to use CMP with an oracle data source. one of my CMP fields is a byte[] that can get quite large JAWS creates a table with this field mapped onto a BLOB type. When I try to create the entity if the byte[] contains several k's of data I get the following exception. [docSession] javax.ejb.CreateException: Could not create entity:java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column Is there a way to store large objects using CMP with Oracle? In the mailing list archive there was a similar problem using BMP which required rewritting the methods ejbCreate etc. Will I have to change to BMP and work this way? Is it possible to mix BMP and CMP in the same Entity Bean? thanks -Michael [JAWS] java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column [JAWS] [JAWS] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114) [JAWS] at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208) [JAWS] at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542) [JAWS] at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311) [JAWS] at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:738) [JAWS] at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313 ) [JAWS] at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232) [JAWS] at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1 353) [JAWS] at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760) [JAWS] at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java :1807) [JAWS] at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState ment.java:332) [JAWS] at org.opentools.minerva.jdbc.PreparedStatementInPool.executeUpdate(PreparedSta tementInPool.java:82) [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCUpdateCommand.executeStatementAndHandleR esult(JDBCUpdateCommand.java:49) [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:159 ) [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEn tityCommand.java:135) [JAWS] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersisten ceManager.java:122) [JAWS] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManag er.java:207) [JAWS] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441) [JAWS] at java.lang.reflect.Method.invoke(Native Method) [JAWS] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContaine r.java:639) [JAWS] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySync hronizationInterceptor.java:160) [JAWS] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt erceptor.java:87) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:445) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86) [JAWS] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav a:151) [JAWS] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106) [JAWS] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316) [JAWS] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai nerInvoker.java:425) [JAWS] at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:212) [JAWS] at $Proxy8.create(Unknown Source) [JAWS] at com.icl.itc.doclog.document.docSession.addDocument(docSession.java:185) [JAWS] at java.lang.reflect.Method.invoke(Native Method) [JAWS] at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulS essionContainer.java:570) [JAWS] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:17 7) [JAWS] at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSess ionInstanceInterceptor.java:206) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:263) [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) [JAWS] at org.jboss.ejb.plugins.LogInterceptor.invoke