Hi Aaron.
I have installed beta-prod-4 and still same results :

when jaws includes none specific jdbc-type for the CLOB column, or contains
VARCHAR, create works and findByPrimaryKey sets the column value to null.
when trying CLOB as jdbc-type, it throws :
[JAWS] java.lang.ClassCastException: java.lang.String
[JAWS]  at
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement
.java:2073)
[JAWS]  at
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement
.java:2109)
[JAWS]  at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setParameter(JDBCCommand.java:31
4)
[JAWS]  at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.setParameters(JDBCCr
eateEntityCommand.java:165)
[JAWS]  at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:157
)
[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:156)
[JAWS]  at
org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:433)
[JAWS]  at java.lang.reflect.Method.invoke(Native Method)
[JAWS]  at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContaine
r.java:591)
[JAWS]  at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySync
hronizationInterceptor.java:160)
[JAWS]  at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt
erceptor.java:86)
[JAWS]  at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[JAWS]  at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:263)
[JAWS]  at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[JAWS]  at
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav
a:126)
[JAWS]  at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[JAWS]  at
org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:315)
[JAWS]  at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
nerInvoker.java:143)
[JAWS]  at java.lang.reflect.Method.invoke(Native Method)
[JAWS]  at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
[JAWS]  at sun.rmi.transport.Transport$1.run(Unknown Source)
[JAWS]  at java.security.AccessController.doPrivileged(Native Method)
[JAWS]  at sun.rmi.transport.Transport.serviceCall(Unknown Source)
[JAWS]  at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
[JAWS]  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
Source)
[JAWS]  at java.lang.Thread.run(Unknown Source)

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Aaron Mulder
Sent: Monday, November 06, 2000 7:07 PM
To: jBoss
Subject: Re: [jBoss-User] CLOB field in CMP entity


        We had never tried CLOBs before.  I just checked a change in to
CVS that should enable you to read a CLOB if you're looking for a
String.  So make the variable a String, and see if JAWS can read
it.  You may want to try once without any specific entry in jaws.xml for
the field (it should be declared in ejb-jar.xml, of course), and if that
doesn't work, add a cmp-field entry with the sql-type CLOB and the
jdbc-type VARCHAR, and if that doesn't work try the jdbc-type CLOB.
        There may still be writing problems, but we'll take this one step
at a time.  If you do have further problems, please send a complete stack
trace as that will be much easier to work with.  Also, you could just send
me your bean class if you like, which would eliminate some of the
turnaround... :)

Aaron

On Mon, 6 Nov 2000, Shahar wrote:
> Hi jBoss users !
>
> My problem is as follows :
>
> I have an Oracle 8.1.6 table :
>
> (myID         NUMBER,
> myName        VARCHAR2(100),
> myOpinion     CLOB)
>
> I want to represent a row in this table as an entity-bean.
> I want to make it a CMP entity-bean.
>
> I would like to refer to myOpinion filed as a java.lang.String.
> i.e. ,I would like to be able to code this in the remote interface:
>
> public void setMyOpinion(java.langString myOpinion) throws
RemoteException;
> public java.lang.String getMyOpinion() throws RemoteException;
>
> I would also like the create method to have the following signature:
> (int myID,String myName,String myOpinion)
>
> Can I have jBoss manage the CLOB field persistance ?
> Can I declare the field as java.lang.String ?
> How should my jaws.xml look like for this field ?
> Should I map java.lang.String to jdbc-type CLOB ? or do something else ?
> I have tried many combinations of type declaring, mapping and coding, but
> each failed.
> Should I assume jBoss doesnt support CLOB CMP-fileds ???
>
> Please help, Shahar.
>
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
>



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to