struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yupi...@optonline.net
Subject ArrayDescriptor - GenericConnection exception
Date Thu, 02 Jan 2003 20:24:30 GMT

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
View raw message