Hi Stephen,

I agree that Oracle Thin JDBC Drivers have a problem. But, JBossCMP 
Does not support Oracle CLOB as well(with OCI).

If we use BMP then using Oracle API or JDBC, it is possible to use CLOB.
But, if we use CMP then even OCI drivers are of no use.

I have tried OCI Drivers with CMP and it fails.

Now comes the Apparent GOOD NEWS...

I have made some changes in JDBCCreateEntityCommand and I am able to
persist
CLOB in Oralce using JbossCMP.

I am unable to read the data in the CMP for now. I am trying to figure a
way out.

Any ideas would be more than welcome.

I will keep updating the list.

Thanks,
Saroj




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Stephen Coy
Sent: Friday, September 27, 2002 7:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] RE: Io exception: Stream closed while using
CLOB


Saroj,

This simply does not work if you are using the Oracle "thin" JDBC  
drivers. There is no work around.

You need to install Oracle client software on your JBoss machine and  
use the "oci" drivers.
Previously, you mentioned that you are using Linux. If that is the  
case, then maybe you need to do
an Oracle install, just don't start it up. You need to be in a position

where the Oracle sqlplus tool
works.


On Thursday, September 26, 2002, at 11:11  PM, Saroj Kumar wrote:

>
> Hi All,
>
> I am trying to insert a CLOB column using CMP. CLOB data is 6028
chars.
>
> I get the error "
> java.sql.SQLException: Io exception: Stream closed"
>
> I have been hunting the issue. It is JBOSS3.0.2 + Oracle 9I
>
> It appears that JDBCCreateEntityCommand invokes
> AbstractCMPFieldBridge.setInstanceParams. Method calls are
>
> JDBCCreateEntityCommand.insertEntity() ---
> ******************************************
>
> // set the parameters
> int index = 1;
> for(Iterator iter = insertFields.iterator(); iter.hasNext(); ) {
>       JDBCFieldBridge field = (JDBCFieldBridge)iter.next();
>       index = field.setInstanceParameters(ps, index, ctx);
> }
>
> field.setInstanceParameters(ps, index, ctx) makes a call to
> JDBCAbstractCMPFieldBridge.
>
> JDBCAbstractCMPFieldBridge
> **************************
> JDBCAbstractCMPFieldBridge.setInstanceParameters()
> {
> .....
>       setArgumentParameters(ps, parameterIndex, instanceValue);
> }
>
> setArgumentParameters(ps, parameterIndex, instanceValue) makes a call

> to
>
>
> JDBCUtil.setParameter(log, ps, parameterIndex++,
> jdbcTypes[i],columnValue);
>
> This sets the value in PreparedStatement and then
>
> rowsAffected = ps.executeUpdate(); is called in  
> JDBCCreateEntityCommand.
>
> Since inputStream is closed and ORACLE uses Streams to read/write
> CLOB/BLOB it gives the error that
> OutputStream is closed.
>
> Any workaround???
>
> NOTE: I tried to use getParameterMetaData for PreparedStatement but it
> fails.
>       Oracle drivers are not implementing this JDBC3.0 feature.
>
> Any idea for solving this CLOB issue would be more than welcome.
>
> TIA,
> Saroj
>
>
> -----Original Message-----
> From: Saroj Kumar [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 25, 2002 9:17 PM
> To: '[EMAIL PROTECTED]'
> Subject: Io exception: Stream closed while using CLOB
>
>
> Hi All,
>
> I am trying to insert a CLOB column using CMP.
>
> I get this error. CLOB size is 6028.
>
> java.sql.SQLException: Io exception: Stream closed
>         at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
>         at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
>         at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
>         at
>
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java 
> :
> 1460)
>         at
>
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java: 
> 1
> 371)
>         at
>
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement 
> .
> java:1900)
>         at
>
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepared 
> S
> tatement.java:363)
>         at
>
org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeUpd 
> a
> te(LocalPreparedStatement.java:308)
>         at
>
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDB 
> C
> CreateEntityCommand.java:196)
>         at
>
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCrea 
> t
> eEntityCommand.java:131)
>         at
>
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreM 
> a
> nager.java:527)
>         at
>
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistence 
> M
> anager.java:253)
>         at
>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.create 
> E
> ntity(CachedConnectionInterceptor.java:270
> )
>         at
> org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:728)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja 
> v
> a:39)
>         at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso 
> r
> Impl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at
>
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityCon 
> t
> ainer.java:1116)
>         at
>
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractIntercepto 
> r
> .java:73)
>         at
>
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(Entit 
> y
> SynchronizationInterceptor.java:209)
>         at
>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke 
> H
> ome(CachedConnectionInterceptor.java:215)
>         at
>
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstan 
> c
> eInterceptor.java:88)
>         at
>
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterc 
> e
> ptor.java:79)
>         at
>
org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreati 
> o
> nInterceptor.java:44)
>         at
>
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterc 
> e
> ptor.java:111)
>         at
>
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercepto 
> r
> CMT.java:178)
>         at
>
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java 
> :
> 52)
>         at
>
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityIntercepto 
> r
> .java:105)
>         at
>
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129 
> )
>         at
> org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
>         at org.jboss.ejb.Container.invoke(Container.java:738)
>         at
> org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
>         at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
>         at
>
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:37 
> 0
> )
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja 
> v
> a:39)
>         at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso 
> r
> Impl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
>         at sun.rmi.transport.Transport$1.run(Transport.java:148)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
>         at
>
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460 
> )
>         at
>
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.j 
> a
> va:701)
>         at java.lang.Thread.run(Thread.java:536)
> 20:57:37,909 WARN  [TxCapsule] Transaction XidImpl [FormatId=257,
> GlobalId=mdpcad110773//0, BranchQual=] timed out. status=ST
> ATUS_ACTIVE
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to