• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

java.sql.SQLException: invalid name pattern: pranaka.pre_hook_out_list

 
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to call a stored procedure from java using JDBC. The stored procedure is having table type out parameter.



The Stored procedure is,


and created the type like,


When I run my jave class I get an SQLException,
java.sql.SQLException: invalid name pattern: pranaka.pre_hook_out_list

I tried going through existing forums, but did not get an answer to my current problem. Please help
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have a brief FAQ page on this subject.

Where does the typeName on line 30 come from? It's value is not shown. My guess is that the name is wrong (pre_hook_out_list instead of pre_hook_out_paramList), but you might also be missing a schema name there. I may be wrong, though, my experience in this area is limited.
 
Manju Krishna
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I posted a different class's exception wrongly,

the exception is java.sql.SQLException: invalid name pattern: PRANAKA.pre_hook_out_paramList

and these two lines part of earlier code is not there,


Actual Class
 
Martin Vashko
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you post the code - as you run it - again? I really cannot figure out how the code snippet in your last post relates to the rest of your code. And please make sure to show how the typeName variable is initialized, it is crucial to this question.
 
Manju Krishna
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Per my last comment, the typeName variable is not used in my java class.

Re-posting all the java and SQL code


The type created as


Stored Procedure ,


Let me know od any further details
 
Manju Krishna
Ranch Hand
Posts: 48
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I changed the type Name used in below line ,



to upper case and it worked. I have the complete code which takes both IN and OUT param as a table type.

Can someone let me know on where I can post this code so that others can benefit from the same.

Cheers
 
Martin Vashko
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm glad you worked it out, and thanks for sharing the solution!

If you want to post the code you've got now, you might do so it here.

If you want to help even more, you might update our wiki pages - either the How to use arrays of Oracle SQL objects, or add a new section to the Oracle FAQ page. Our Wiki FAQ says how to create a new page, should you need one. It's OK to include a code in the Wiki too, preferably a polished one, ie. SSCCE.

If you get into problems with editing the wiki, let me know - I'll be glad to help.
 
Manju Krishna
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Posting the solution
Java Code,


SQL Table Types -



SQL Procedure,

 
reply
    Bookmark Topic Watch Topic
  • New Topic