You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by yu...@optonline.net on 2003/01/02 21:24:30 UTC
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: html:options question
Posted by Gus Delgado <gd...@oceanobjects.com>.
Thanks it work!.
-Gus D.
Rick Reumann wrote:
>On Monday, January 6, 2003, 2:14:38 PM, Gus wrote:
>
>GD> <html:select name="editUserForm" property="accessType">
>GD> <html:options collection="accessTypeList" property="value"
>GD> labelProperty="label"/>
>GD> </html:select>
>
>GD> Example. the options are "Read-only", "Admin", and "Analyst" that's the
>GD> order of the collection, when I edit a user that is Admin, I want the
>GD> drop-down to show with the "Admin" being selected,
>
>GD> How can I accomplish this. Thanks in advanced.
>
>Just make sure "accessType" is set to whatever the value is for
>"Admin" in the options. In other words the value fields in
>accessTypeList should have "Admin", "Analyst", "Read-only" and
>then accessType should also be one of those names as well. (Personally
>I usually like to use ints for those values. So that accessType would
>be an int value and in the accesTypeList you'd have corresponding
>ints for the values and the label would be your String for the title
>(Admin, Analyst, etc)). If that doesn't make sense let me know. I
>typed this up very quickly:)
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: html:options question
Posted by Rick Reumann <ma...@reumann.net>.
On Monday, January 6, 2003, 2:14:38 PM, Gus wrote:
GD> <html:select name="editUserForm" property="accessType">
GD> <html:options collection="accessTypeList" property="value"
GD> labelProperty="label"/>
GD> </html:select>
GD> Example. the options are "Read-only", "Admin", and "Analyst" that's the
GD> order of the collection, when I edit a user that is Admin, I want the
GD> drop-down to show with the "Admin" being selected,
GD> How can I accomplish this. Thanks in advanced.
Just make sure "accessType" is set to whatever the value is for
"Admin" in the options. In other words the value fields in
accessTypeList should have "Admin", "Analyst", "Read-only" and
then accessType should also be one of those names as well. (Personally
I usually like to use ints for those values. So that accessType would
be an int value and in the accesTypeList you'd have corresponding
ints for the values and the label would be your String for the title
(Admin, Analyst, etc)). If that doesn't make sense let me know. I
typed this up very quickly:)
--
Rick
mailto:maillist@reumann.net
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: html:options question
Posted by Heather Buch <hb...@MIT.EDU>.
I did something similar, with optionsCollection (which I like).
Here is my code:
<logic:select multiple="true" size="10" property="addchosencourseids">
<logic:optionsCollection property="availablecourselabels"
label="availablecourseconcatenated" value="availablecourseinstanceid"/>
</logic:select>
for optionsCollection, my "property" is the name of my bean, and I think
you have to pluralize it (example availablecourselabel -->
availablecourselabels) to indicate that it's a collection. The "label"
and "value" attributes just
refer to properties of my AvailableCourseLabel bean (get
availableCourseconcatenated, and getAvailablecourseinstanceid). I hope
this helps a little.
Best,
Heather Buch
Gus Delgado wrote:
> I populate an html:option tag with a collection. I use the html:option
> to create a new user in my system and to edit a user in my system.
>
> <html:select name="editUserForm" property="accessType">
> <html:options collection="accessTypeList" property="value"
> labelProperty="label"/>
> </html:select>
>
> When doing an edit I want the html:option to be shown with the current
> accessType of the user I'm editing.
>
> Example. the options are "Read-only", "Admin", and "Analyst" that's
> the order of the collection, when I edit a user that is Admin, I want
> the drop-down to show with the "Admin" being selected,
>
> How can I accomplish this. Thanks in advanced.
>
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
html:options question
Posted by Gus Delgado <gd...@oceanobjects.com>.
I populate an html:option tag with a collection. I use the html:option
to create a new user in my system and to edit a user in my system.
<html:select name="editUserForm" property="accessType">
<html:options collection="accessTypeList" property="value"
labelProperty="label"/>
</html:select>
When doing an edit I want the html:option to be shown with the current
accessType of the user I'm editing.
Example. the options are "Read-only", "Admin", and "Analyst" that's the
order of the collection, when I edit a user that is Admin, I want the
drop-down to show with the "Admin" being selected,
How can I accomplish this. Thanks in advanced.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>