File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes ArrayDescriptor -- sql exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ArrayDescriptor -- sql exception" Watch "ArrayDescriptor -- sql exception" New topic
Author

ArrayDescriptor -- sql exception

sri ni
Greenhorn

Joined: Jul 09, 2008
Posts: 2
Hi,

I am trying to pass object to stored procedure. I get the below error.

Can any one provide your feedback please?

Exception in thread "main" java.sql.SQLException: Fail to construct descriptor: Unable to resolve type: ".ACTIONPRIORITY"
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.sql.ArrayDescriptor.initPickler(ArrayDescriptor.java:1776)
at oracle.sql.ArrayDescriptor.<init>(ArrayDescriptor.java:251)
at com.inf.db.DAO613.insertService(DAO613.java:53)
at com.inf.ui.CM613.main(CM613.java:26)

code in the database:

create or replace TYPE ActionPriority AS OBJECT
(
Action_id NUMBER,
Priority NUMBER
);
/
create public synonym ACTIONPRIORITY for ActionPriority;

create or replace procedure testproc
(
ap ActionPriority
)
IS
BEGIN
dbms_output.put_line('test');
END;
/

I can see the description of object in database

SQL> desc ActionPriority
Name Null? Type
----------------------------------------- -------- ----------------------------
ACTION_ID NUMBER
PRIORITY NUMBER

SQL>

-------------

I am calling stored procedure from standard JAVA application.
database : oracle 10G

I have oracle 10G classes12.jar, ojdbc14.jar in class path.

JAVA code:

oracle.sql.ArrayDescriptor desc = new oracle.sql.ArrayDescriptor("ACTIONPRIORITY",con);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ArrayDescriptor -- sql exception
 
Similar Threads
trouble passing array to stored procedure in spring HELP
ArrayDescriptor - SqlException
java.sql.SQLException: invalid name pattern: PFEP.file_import_nestedtable
passing arrays to oracle
Getting array of Oracle Objects