aspose file tools*
The moose likes JDBC and the fly likes java.sql.SQLException: invalid name pattern: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: invalid name pattern:" Watch "java.sql.SQLException: invalid name pattern:" New topic
Author

java.sql.SQLException: invalid name pattern:

neerav kumar
Greenhorn

Joined: Aug 13, 2006
Posts: 4
Hi

I am getting this exception when i am executing the stored procedure from java application. I have oracle custom data types define within the package Which i cannot change. When i run the java code following execption is thrown i register the output parameter.

proc_stmt.registerOutParameter(1, OracleTypes.STRUCT, "PakageName.EmployeeType");

java.sql.SQLException: invalid name pattern: PakageName.EmployeeType
at oracle.jdbc.oracore.OracleTypeADT.initMetadata(OracleTypeADT.java:553)
at oracle.jdbc.oracore.OracleTypeADT.init(OracleTypeADT.java:469)
at oracle.sql.StructDescriptor.initPickler(StructDescriptor.java:390)
at oracle.sql.StructDescriptor.<init>(StructDescriptor.java:320)
at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:201)
at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:169)
at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:138)
at oracle.jdbc.driver.NamedTypeAccessor.otypeFromName(NamedTypeAccessor.java:86)
at oracle.jdbc.driver.TypeAccessor.initMetadata(TypeAccessor.java:89)

I tried lot to find the solution but i havent got any solution on internet.

Thanks in advance
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18154
    
    8

Is that really supposed to be "Pakage" instead of "Package"?
neerav kumar
Greenhorn

Joined: Aug 13, 2006
Posts: 4
It is just a dummy name. Please assume that spelling and syntax are correct.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3451
    
  47

It's not going to work with types declared in PL/SQL package. You need to declare SQL type (using Oracle's CREATE TYPE SQL statement). Such type can be used in a package and from JDBC.

See also this thread.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.SQLException: invalid name pattern:
 
Similar Threads
java.sql.SQLException: invalid name pattern: PFEP.file_import_nestedtable
Oracle custom object from java
Stored Procedure and Java
trouble passing array to stored procedure in spring HELP
Getting array of Oracle Objects