tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: another DBCP problem with tomcat 4.1.30, tomcat-5.0.27 and OracleApplicationServer-9.0.4
Date Fri, 27 Aug 2004 18:53:16 GMT

Hi,
Well, it could be something is trying to cast java.sql.Connection to any underlying implementation
(e.g. an oracle.jdbc connection).  That'll work when running with a DriverManager, but not
with a pool in the middle, because the pool will have its own class.  DBCP has org.apache.commons.dbcp.DelegatingConnection
for example, proxool and c3p0 have their own.

If I were you, I'd spend a bit more time and try to make CLOB writing work with standard JDBC,
rather than figuring out a hack around casting to vendor-specific types.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Edson Alves Pereira [mailto:eapereira@panamericano.com.br]
>Sent: Friday, August 27, 2004 2:38 PM
>To: Tomcat-User List (E-mail)
>Subject: ENC: another DBCP problem with tomcat 4.1.30, tomcat-5.0.27 and
>OracleApplicationServer-9.0.4
>
>	Hello again, servlet_.getDbCon( ).getCon( ) returns just a
>java.sql.Connection, with every DBCP i setup properly cause the connection
>works fine and CLOB is a oracle.sql.CLOB from oracle´s ojdbc14.jar. I tried
>once to store CLOBs in Oracle with jdbc standard and it didn´t workout, i
>just followed the Oracle´s recomendations, again this error only happens
>with DBCP.
>
>>  -----Mensagem original-----
>> De: 	Edson Alves Pereira
>> Enviada em:	sexta-feira, 27 de agosto de 2004 14:44
>> Para:	Tomcat-User List (E-mail)
>> Assunto:	another DBCP problem with tomcat 4.1.30, tomcat-5.0.27 and
>> OracleApplicationServer-9.0.4
>>
>> 	Hello dudes, i´m trying to store a value to a CLOB in my databse,
>> everything is fine with a simple Connection created with DriverManager,
>> but when i use DBCP from one of these servlet-engines i got the same
>> error:
>>
>> ava.sql.SQLException: invalid arguments in call
>> 04/08/27 11:56:44 	at
>> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
>> 04/08/27 11:56:44 	at
>> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231)
>> 04/08/27 11:56:44
>> atoracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:294)
>> 04/08/27 11:56:44 	at oracle.sql.CLOB.createTemporary(CLOB.java:527)
>> 04/08/27 11:56:44 	at appi.util.JUtils.getClob(JUtils.java:166)
>>
>> 	Here´s my code:
>>
>>       //create a new temporary CLOB
>>       tempClob = CLOB.createTemporary(
>>         servlet_.getDbCon( ).getCon( ),
>>         true,
>>         CLOB.DURATION_SESSION );
>>
>>
>> 	How can i fix it?
>>
>> 	Regards,
>> 	Edson



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message