cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlo Pescetelli <pescete...@ksolutions.it>
Subject ESQL clob inserts
Date Wed, 21 Aug 2002 09:59:17 GMT
I've problem inserting a CLOB object in a Oracle DB.

I retrieve the object storing it in a java Vector using:

       <esql:results>
          <esql:row-results>
            <xsp:logic>
              texts.addElement(<esql:get-ascii column="TEXT"/>);
            </xsp:logic>
          </esql:row-results>
        </esql:results>

The problem arises when I try to insert this data as a CLOB using:

       insert into MY_TB
                  values
                    ( ...
                    , <xsp:expr>(CLOB)texts.elementAt(i)</xsp:expr>
                    , ...)

Data are not inserted and in the sitemap.log i find a 
  java.lang.ClassCastException: java.lang.String
message with a long stacktrace.

I think that ClassCastException occours on the CLOB cast because using
a String cast in place of the CLOB one, INSERTs are correctly 
executed *but* 2000 characters (max varchar2 size) is the upper
limit of handlable data.

I miss something?

I'm using
 - tomcat 4.0.4
 - cocoon 2.0.3
 - jdk1.4
 - classes12.jar (delivered with Oracle)

thanks in advance

carlo

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message