ENC: another DBCP problem with tomcat 4.1.30, tomcat-5.0.27 and O racleApplicationServer-9.0.4

2004-08-27 Thread Edson Alves Pereira
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


Re: ENC: another DBCP problem with tomcat 4.1.30, tomcat-5.0.27 and O racleApplicationServer-9.0.4

2004-08-27 Thread Robert F. Hall
Hola,
Just to clarify, is it true that you can store a CLOB if the 
java.sql.Connection is
obtained directly from Oracle's DriverManager?

But when  you use a java.sql.Connection from DBCP, everything else being 
the same,
you can not store a CLOB?

If that's the situation, then there has to be some difference between 
the Connections.
I'm not familiar with Tomcat's DBCP, we use JBoss, so I don't know what 
goes into
configuring TC's DBCP.  Is should be possible to configure DBCP to user the
DriverManager in Oracle's ojdbc14.jar.

/Robert
Edson Alves Pereira wrote:
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