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 9118653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:12:21+00:00 2026-06-17T05:12:21+00:00

I have the following stored procedure defined: CREATE OR REPLACE PROCEDURE NOTIFY_INSERT ( FLAG

  • 0

I have the following stored procedure defined:

CREATE OR REPLACE PROCEDURE NOTIFY_INSERT (
  FLAG IN VARCHAR2,
  MESSAGE IN OUT CLOB,
  SEQ_NO OUT NUMBER
) 
AS
BEGIN
...
END;

Now I’m trying to call this stored proc in JDBC. However, I get an exception saying “java.sql.SQLException: Parameter Type Conflict”. This is raised from the line

call.execute();

I’m guessing it has something to do with the second parameter, which is a CLOB.

Does anyone have an idea what I’m doing wrong?

Thanks for your help.

Connection connection = dataSource.getConnection();
CallableStatement call = null;
try {
    call = connection.prepareCall("{ call NOTIFY_INSERT (?,?,?) }");
    call.setString(1, flag);
    call.registerOutParameter(2, Types.CLOB);
    call.setString(2, message);
    call.registerOutParameter(3, Types.NUMERIC);
    call.execute();
    sequenceNo = call.getLong(3);
    message = call.getString(2);
} catch (SQLException e) {
    e.printStackTrace();
} finally {
    if (call != null) {
        try { call.close(); } catch (SQLException sqle) {}
    }
}

JDBC Exception:

java.sql.SQLException: Parameter Type Conflict
    at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:2480)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4356)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:4595)
    at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:10100)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:5693)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
  • 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-06-17T05:12:23+00:00Added an answer on June 17, 2026 at 5:12 am

    I don’t think that you can pass a String directly to a parameter of type CLOB. When attempting to bind a CLOB parameter, you can do the following:

    If you already have a Clob:

    call.setClob(1, clob);
    

    If you want to convert a String into a Clob:

    call.setCharacterStream(1, new StringReader(string), string.length());
    

    If you want to set a null CLOB:

    call.setNull(1, Types.CLOB);
    

    You can also see this solution.

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

Sidebar

Related Questions

I have the following stored procedure: create or replace PROCEDURE A2CountSkus (v_count out Number
I have stored procedure: CREATE OR REPLACE udp_get_employeeaddress ( result_set out sys_refcursor ) AS
I have following stored procedure: CREATE PROCEDURE testProc(IN p_idProject INTEGER) BEGIN DECLARE nowTime DATETIME;
I am using Oracle 10g and I have the following stored procedure: CREATE OR
I have the following SQL Server stored procedure : BEGIN TRAN CREATE TABLE #TempTable
I have the following stored procedure ALTER PROCEDURE [dbo].Test AS BEGIN CREATE TABLE ##table
I have following stored procedure CREATE FUNCTION runMortalityModel(a_user_id integer) RETURNS integer AS $$ DECLARE
I have the following stored procedure (Taken from a comment on http://dev.mysql.com/doc/refman/5.0/en/create-index.html , used
I have created the following stored procedure that is used to count the number
I have the following stored procedure to retrieve a new datetime: CREATE PROCEDURE [dbo].[GetTransactionTime]

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.