Re: [JBoss-user] Problem with ORACLE CMP and BLOBS

2001-03-24 Thread Peter Routtier-Wone

Filip, thanks for the suggestion. I am already familiar with both the
subject matter and technet.oracle.com, but it's probably a good idea to
check for more information.

In the interim, I have published what I know about this topic along with a
helper class and a demo program at http://wamoz.com/JDBC_and_Oracle_LOB.asp



___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Problem with ORACLE CMP and BLOBS

2001-03-23 Thread Filip Hanik

technet.oracle.com has all the info you need to write your paper.

> > 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.
> 
> i'd be interested to read something about this.

Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net 

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Donald Ball
> Sent: Friday, March 23, 2001 6:00 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Problem with ORACLE CMP and BLOBS
> 
> 
> On Sat, 24 Mar 2001, Peter Routtier-Wone wrote:
> 
> > 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.
> 
> i'd be interested to read something about this.
> 
> - donald
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Problem with ORACLE CMP and BLOBS

2001-03-23 Thread Donald Ball

On Sat, 24 Mar 2001, Peter Routtier-Wone wrote:

> 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.

i'd be interested to read something about this.

- donald


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Problem with ORACLE CMP and BLOBS

2001-03-23 Thread Peter Routtier-Wone

> 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



RE: [JBoss-user] Problem with ORACLE CMP and BLOBS

2001-03-22 Thread Shahar Solomianik

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(L