Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Deploying a class using Oracle CLOB

Re: Deploying a class using Oracle CLOB

From: AV <avek_nospam_at_videotron.ca>
Date: Thu, 28 Nov 2002 08:14:58 -0500
Message-ID: <5FoF9.572$6X.5861@wagner.videotron.net>


Hi,

Guessing from error message:
May be there are different versions of
classes12.zip (or ojdbc14.jar) in
JDeveloper and in database.

You can create JD library with another jdbc package and connect it to you project instead of default jdbc library of JD.

AlexV.

"nk" <nkolman_at_freemail.hu> wrote in message news:b3bd0338.0211280307.60fca3e1_at_posting.google.com...
> I wrote java method that inserts a very long text to a clob field.
>
> public static void writeClob1() throws SQLException {
> StringBuffer s = new StringBuffer();
> for (int i = 0; i < 10000; i++) {
> s.append("x");
> }
> OracleCallableStatement cstmt1 = (OracleCallableStatement)
> db.prepareCall ("begin DBMS_LOB.CREATETEMPORARY(?, TRUE,
> DBMS_LOB.SESSION); end;");
> cstmt1.registerOutParameter (1, OracleTypes.CLOB);
> cstmt1.execute ();
> CLOB pCLOB = cstmt1.getCLOB (1);
> pCLOB.putString(1, s.toString());
> PreparedStatement ps = db.prepareStatement("insert into reportout
> (reportid, reportmessage) values (1, ?)");
> ps.setClob(1, pCLOB);
> ps.executeUpdate();
> }
>
> It works fine when I run it within JDeveloper but when I try to load
> it to the database I got this error message:
>
> Invoking loadjava on connection 'proba' with arguments:
> -order -resolve -thin
> errors : class PerTestPack/PT
> ORA-29534: referenced object PROBA.oracle/sql/CLOB could not be
> resolved
> ORA-29545: badly formed class: at offset 42 of
> PerTestPack.PT.writeClob expecting a class-oracle.sql.CLOB but
> encountered a class-oracle.sql.CLOB.
> at offset 69 of PerTestPack.PT.writeClob1 expecting a
> class-oracle.sql.CLOB but encountered a class-oracle.sql.CLOB.
>
> The following operations failed
> class PerTestPack/PT: resolution
> #### Deployment incomplete. #### 2002.11.28. 11:59:10
>
> Any ideas what can I do?
Received on Thu Nov 28 2002 - 07:14:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US