struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@shareowner.com
Subject RE: ArrayDescriptor - GenericConnection exception
Date Thu, 02 Jan 2003 21:29:46 GMT
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: yupingw@optonline.net [mailto:yupingw@optonline.net] 
Sent: January 2, 2003 3:25 PM
To: struts-user@jakarta.apache.org
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:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message