You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Suresh Addagalla <su...@wipro.com> on 2005/06/15 10:49:55 UTC

[DBCP] Problem creating array descriptor

Hi,
 
I am facing a problem using DBCP 1.2.1 with stored procedures; if someone
has a solution/workaround, please do suggest.
 
I have the following code to create an array descriptor:
 
                Connection conn = dbcp.getConnection() ;
                Connection dconn = ((DelegatingConnection)
conn).getInnermostDelegate();
                ArrayDescriptor descriptor =
ArrayDescriptor.createDescriptor("ROPARAMETERLIST", dconn) ;

and it throws the following exception:
 
java.sql.SQLException: Fail to construct descriptor: Invalid arguments
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
        at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1130)
        at
oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:104)
        at
com.nokia.ipdc.ecs.dbapi.roparameters.RoParametersDbApi.storeRoParameters(Ro
ParametersDbApi.java:119)

Earlier I was passing the "conn" (instead of "dconn") to createDescriptor
method, but that too did not work.
 
This seems to be a known bug
(http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200309.mbox/%
3C3F60EB37.4060601@pandora.be%3E), but it seems that the fix is not
available in the latest release.
 
If it cannot be solved with DBCP, can someone suggest viable alternatives
(implementation alternatives of DB connection pool)?
 
Thanks
Suresh



Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

Re: [DBCP] Problem creating array descriptor

Posted by Dirk Verbeeck <di...@pandora.be>.
If you are using a BasicDataSource (the default one if you are using 
tomcat) then your code should work.

2 things you can try:
	print the classname of dconn
	make sure you only have one copy of the oracle driver present.

-- Dirk

Suresh Addagalla wrote:
> Hi,
>  
> I am facing a problem using DBCP 1.2.1 with stored procedures; if someone
> has a solution/workaround, please do suggest.
>  
> I have the following code to create an array descriptor:
>  
>                 Connection conn = dbcp.getConnection() ;
>                 Connection dconn = ((DelegatingConnection)
> conn).getInnermostDelegate();
>                 ArrayDescriptor descriptor =
> ArrayDescriptor.createDescriptor("ROPARAMETERLIST", dconn) ;
> 
> and it throws the following exception:
>  
> java.sql.SQLException: Fail to construct descriptor: Invalid arguments
>         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
>         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1130)
>         at
> oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:104)
>         at
> com.nokia.ipdc.ecs.dbapi.roparameters.RoParametersDbApi.storeRoParameters(Ro
> ParametersDbApi.java:119)
> 
> Earlier I was passing the "conn" (instead of "dconn") to createDescriptor
> method, but that too did not work.
>  
> This seems to be a known bug
> (http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200309.mbox/%
> 3C3F60EB37.4060601@pandora.be%3E), but it seems that the fix is not
> available in the latest release.
>  
> If it cannot be solved with DBCP, can someone suggest viable alternatives
> (implementation alternatives of DB connection pool)?
>  
> Thanks
> Suresh
> 
> 
> 
> Confidentiality Notice 
> 
> The information contained in this electronic message and any attachments to this message are intended
> for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
> you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
> and destroy all copies of this message and any attachments.



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


Re: [DBCP] Problem creating array descriptor (repost)

Posted by Dirk Verbeeck <di...@pandora.be>.
If you are using a BasicDataSource (the default one if you are using 
tomcat) then your code should work.

2 things you can try:
     print the classname of dconn
     make sure you only have one copy of the oracle driver present.

-- Dirk

Suresh Addagalla wrote:
> Hi,
> 
> Excuse me for re-posting, just hoping for some reply.
> 
> If anyone has successfully created an ArrayDescriptor using Oracle driver &
> DBCP, please try to answer my question below.
> 
> Regards
> Suresh 
> 
> 
>>-----Original Message-----
>>From: Suresh Addagalla [mailto:suresh.addagalla@wipro.com] 
>>Sent: Wednesday, June 15, 2005 2:20 PM
>>To: commons-user@jakarta.apache.org
>>Subject: [DBCP] Problem creating array descriptor
>>
>>
>>Hi,
>> 
>>I am facing a problem using DBCP 1.2.1 with stored 
>>procedures; if someone has a solution/workaround, please do suggest.
>> 
>>I have the following code to create an array descriptor:
>> 
>>                Connection conn = dbcp.getConnection() ;
>>                Connection dconn = ((DelegatingConnection) 
>>conn).getInnermostDelegate();
>>                ArrayDescriptor descriptor = 
>>ArrayDescriptor.createDescriptor("ROPARAMETERLIST", dconn) ;
>>
>>and it throws the following exception:
>> 
>>java.sql.SQLException: Fail to construct descriptor: Invalid arguments
>>        at 
>>oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>>        at 
>>oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
>>        at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1130)
>>        at
>>oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:104)
>>        at
>>com.nokia.ipdc.ecs.dbapi.roparameters.RoParametersDbApi.storeR
>>oParameters(Ro
>>ParametersDbApi.java:119)
>>
>>Earlier I was passing the "conn" (instead of "dconn") to 
>>createDescriptor method, but that too did not work.
>> 
>>This seems to be a known bug
>>(http://mail-archives.apache.org/mod_mbox/jakarta-commons-user
>>/200309.mbox/%
>>3C3F60EB37.4060601@pandora.be%3E), but it seems that the fix 
>>is not available in the latest release.
>> 
>>If it cannot be solved with DBCP, can someone suggest viable 
>>alternatives (implementation alternatives of DB connection pool)?
>> 
>>Thanks
>>Suresh


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


RE: [DBCP] Problem creating array descriptor

Posted by Suresh Addagalla <su...@wipro.com>.
Hi,

Excuse me for re-posting, just hoping for some reply.

If anyone has successfully created an ArrayDescriptor using Oracle driver &
DBCP, please try to answer my question below.

Regards
Suresh 

> -----Original Message-----
> From: Suresh Addagalla [mailto:suresh.addagalla@wipro.com] 
> Sent: Wednesday, June 15, 2005 2:20 PM
> To: commons-user@jakarta.apache.org
> Subject: [DBCP] Problem creating array descriptor
> 
> 
> Hi,
>  
> I am facing a problem using DBCP 1.2.1 with stored 
> procedures; if someone has a solution/workaround, please do suggest.
>  
> I have the following code to create an array descriptor:
>  
>                 Connection conn = dbcp.getConnection() ;
>                 Connection dconn = ((DelegatingConnection) 
> conn).getInnermostDelegate();
>                 ArrayDescriptor descriptor = 
> ArrayDescriptor.createDescriptor("ROPARAMETERLIST", dconn) ;
> 
> and it throws the following exception:
>  
> java.sql.SQLException: Fail to construct descriptor: Invalid arguments
>         at 
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>         at 
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
>         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1130)
>         at
> oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:104)
>         at
> com.nokia.ipdc.ecs.dbapi.roparameters.RoParametersDbApi.storeR
> oParameters(Ro
> ParametersDbApi.java:119)
> 
> Earlier I was passing the "conn" (instead of "dconn") to 
> createDescriptor method, but that too did not work.
>  
> This seems to be a known bug
> (http://mail-archives.apache.org/mod_mbox/jakarta-commons-user
> /200309.mbox/%
> 3C3F60EB37.4060601@pandora.be%3E), but it seems that the fix 
> is not available in the latest release.
>  
> If it cannot be solved with DBCP, can someone suggest viable 
> alternatives (implementation alternatives of DB connection pool)?
>  
> Thanks
> Suresh
> 
> 
> 
> Confidentiality Notice 
> 
> The information contained in this electronic message and any 
> attachments to this message are intended for the exclusive 
> use of the addressee(s) and may contain confidential or 
> privileged information. If you are not the intended 
> recipient, please notify the sender at Wipro or 
> Mailadmin@wipro.com immediately and destroy all copies of 
> this message and any attachments.



Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

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