Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 768407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:10:34+00:00 2026-05-14T18:10:34+00:00

I’m writing some JDBC code which calls a Oracle 11g PL/SQL procdedure which has

  • 0

I’m writing some JDBC code which calls a Oracle 11g PL/SQL procdedure which has a Custom Object return type. Whenever I try an register my return types, I get either ORA-03115 or PLS-00306 as an error when the statement is executed depending on the type I set. An example is below:

PLSQL Code:

Procedure GetDataSummary (p_my_key    IN    KEYS.MY_KEY%TYPE,
                          p_recordset OUT   data_summary_tab,
                          p_status    OUT   VARCHAR2);

More PLSQL Code (Custom Object Details):

CREATE OR REPLACE TYPE data_summary_obj
AS
   OBJECT (data_key             NUMBER,
           data_category        VARCHAR2 (100),
           sensitive_flag       VARCHAR2 (1),
           date_created         DATE,
           date_rep_received    DATE,
           date_first_offering  DATE,
           agency_data_ref      VARCHAR2 (13),
           change_code          VARCHAR2 (120),
           data_ref             VARCHAR2 (50),
           data_status          VARCHAR2 (100),
           data_count           NUMBER)
/

CREATE OR REPLACE TYPE data_summary_tab AS TABLE OF data_summary_obj
/ 

Java Code:

String query = "begin manageroleviewdata.getdatasummary(?, ?, ?); end;");
CallableStatement stmt = conn.prepareCall(query);

stmt.setInt(1, 83);

stmt.registerOutParameter(2, OracleTypes.CURSOR); // Causes error: PLS-00306
stmt.registerOutParameter(3, OracleTypes.VARCHAR);

stmt.execute(stmt); // Error mentioned above thrown here.

Can anyone provide me with an example showing how I can do this? I guess it’s possible. However I can’t see a rowset OracleType. CURSOR, REF, DATALINK, and more fail.

Apologies if this is a dumb question. I’m not a PL/SQL expert and may have used the wrong terminology in some areas of my question. (If so, please edit me).

Thanks in advance.

Regs, Andrew

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:10:35+00:00Added an answer on May 14, 2026 at 6:10 pm

    I finally (with a little help from others) found out the answer to this. It came in three parts:

    The first was that I needed to use an:

    OracleCallableStatement stmt = (OracleCallableStatement) conn.prepareCall(query);
    

    rather than the simple JDBC CallableStatement I had been trying to use.

    The second part was that I had to register my “out” parameter as follows:

    stmt.registerOutParameter(2, OracleTypes.STRUCT, "DATA_SUMMARY_TAB");
    

    The third part, and it is implicit in part 2 above, was that “DATA_SUMMARY_TAB” had to be in UPPER CASE. If you put it in lower case, then you get a cryptic error message as follows:

    java.sql.SQLException: invalid name pattern: MYTEST.data_summary_tab
    

    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.(StructDescriptor.java:320)

    That’s it.

    Also, please note our custom object type was not in any packages. If it is, you might need to hack the third parameter around a little.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 452k
  • Answers 452k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes, get the unix timestamp and add 25200 to it.… May 15, 2026 at 9:14 pm
  • Editorial Team
    Editorial Team added an answer see http://docs.php.net/number_format for($e=1; $e<9; $e++) { echo number_format(pow(10,$e) , 2),… May 15, 2026 at 9:14 pm
  • Editorial Team
    Editorial Team added an answer I created a project using j2me-simple archetype (...) I'm not… May 15, 2026 at 9:14 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.