We solved a close problem with StructDescriptor/ArrayDescriptor and WAS/VisualAge pool and a cumbersome ClassCastException by extracting getPhysicalConnection() from the connection returned by the IBM pool.

Hope it can save time for someone in the same trouble since it take quite a long time for us,

Regards,

Adolfo.

From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: RE: ArrayDescriptor - GenericConnection exception
Date: Thu, 2 Jan 2003 16:29:46 -0500

Oracle requires an explicit OracleConnection. Thus you have to get the
underlying connection of struts/tomcat connection by

((PoolableConnection) getConnection()).getDelegate()

Regards,


PQ

"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: January 2, 2003 3:25 PM
To: [EMAIL PROTECTED]
Subject: ArrayDescriptor - GenericConnection exception


Hi, Folks:

Happy New Year!

I am having the same problem Eva had. Anyone has a solution?

Many thanks.

Patrick


[Mail Archive]
struts-user
    Chronological -->
Find
    Thread -->
ArrayDescriptor - GenericConnection exception

    * From: Eva Garabedian
    * Subject: ArrayDescriptor - GenericConnection exception
    * Date: Wed, 12 Jun 2002 16:24:31 -0700

Hello List - I've got a question about passing a string array into an
Oracle Procedure.
Specifically, my ArrayDescriptor assignment line is throwing a struts
exception, whose message is simply
"org.apache.struts.util.GenericConnection".
I'm using a CallableStatement in my Java code to pass my String[] to my
Oracle procedure. Before I added the String[] parameter, everything was
working quite nicely. Now when I run this I get the dreaded
NullPointerException in the Tomcat messages in my browser, and the first
"System.out.println" (found below) shows up, but the GenericConnection
exception is thrown before the second println executes. This leads me to
believe that the ArrayDescriptor is the culprit. In the following code,
please note that the user_type NL_GROUP exists in my database, created
by the user CREATOR.

Thanks in advance for any suggestions about where I should look for
help.



Here is my related code:
    public boolean addCustomer(String userName, String password,
String[] nlGroup) throws Exception  {

       Connection conn = null;
       CallableStatement stmt = null;
       String sql = "{call INS_CUSTOMER_AND_CONTACT_INFO(?, ?, ?)}";

   try {
     conn = dataSource.getConnection();

     System.out.println("After getConnection. ");

     ArrayDescriptor desc =
ArrayDescriptor.createDescriptor("CREATOR.NL_GROUP", conn);

     System.out.println("After arrayDescriptor assignment. ");

     ARRAY newArray = new ARRAY(desc, conn, nlGroup);
     stmt = conn.prepareCall(sql);
     stmt.setString(1, userName);
     stmt.setString(2, password);
     ((OraclePreparedStatement)stmt).setArray(3, newArray);
.
.
.


    * ArrayDescriptor - GenericConnection exception, Eva Garabedian


    Chronological -->     Thread -->

Reply via email to



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to