This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes invalid name patter error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "invalid name patter error" Watch "invalid name patter error" New topic

invalid name patter error

Suketu Bharatia

Joined: May 27, 2004
Posts: 1
Kindly help me out with this.
I have a stored procedure written in Oracle :
PROCEDURE sp_bget_cell_system_info (
p_lac OUT numarray,
p_cellidvalue OUT numarray,
p_sysinfolac OUT numarray,
p_sysinfocellid OUT numarray,
p_sysinfomcc OUT numarray,
p_sysinfomnc OUT numarray
where numarray is a userdefined type as a table of number.

I want to execute this stored proc using Java's CallableStatement and get the values returned by the database.
How do I register these out parameters using the registerOutParameter method?
I tried the following way:
String url = "jdbc racle:thin:@smlcpt5:1521:T001";
Connection conn = DriverManager.getConnection(url,"system","manager");

Hashtable newMap = new Hashtable();
newMap.put("smlcpt5:1521:T001.NUMARRAY", Class.forName("NUMARRAY"));

Map myMap = conn.getTypeMap();
System.out.println("SIZE IS = " + myMap.size());

String command = "{call sp_bget_cell_system_info(?,?,?,?,?,?)}";
CallableStatement cstmt = conn.prepareCall(command);

//Code end

But when I execute this, I get the following error :
Got an exception!
Error Message = invalid name pattern: smlcpt5:1521:T001.NUMARRAY
java.sql.SQLException: invalid name pattern: smlcpt5:1521:T001.NUMARRAY
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.oracore.OracleTypeADT.initMetadata(
at oracle.jdbc.oracore.OracleTypeADT.init(
at oracle.sql.ArrayDescriptor.initPickler(
at oracle.sql.ArrayDescriptor.<init>(
at oracle.sql.ArrayDescriptor.createDescriptor(
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(
at InsertStoredProcedure.main(
I agree. Here's the link:
subject: invalid name patter error
Similar Threads
Passing Array as a parameter to Stored procedures
ArrayDescriptor Urgent
calling stored function
java.sql.SQLException: invalid name pattern: PFEP.file_import_nestedtable
Getting array of Oracle Objects