Advertisement

09.20.2007 at 01:00AM PDT, ID: 22840718
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Error while create temporary clob in Java for call to Oracle stored procedure

Tags: invalid, call, clob
I am working with Oracle 9i. From web services written in Java I am calling Oracle stored procedure. As the length of one of the input parameter is more than 32K, I want to pass it as CLOB. I have written following code which gets compiled and build properly but shows the error when run. The error is at the  line filecontentClob = oracle.sql.CLOB.createTemporary(conn, true, oracle.sql.CLOB.DURATION_SESSION);.

Code:
======================

Clob filecontentClob= null;  

try
{          

  conn = getConnection();
  filecontentClob = oracle.sql.CLOB.createTemporary(conn, true, oracle.sql.CLOB.DURATION_SESSION);

   if(filecontentClob!=null) {
      ((oracle.sql.CLOB)filecontentClob).putString(1, fileContent);
    }

   //Make a call to the get_application_status procedure of the API_STL package
   ocstmt = (OracleCallableStatement)(conn.prepareCall("{call API_DWP.DWP_DELIVER_FILE_TO_EMASYS(?,?,?,?)}"));

   ocstmt.setString(1, filename);
   //ocstmt.setString(2, fileContent);   Old call
   ocstmt.setClob(2, filecontentClob);  // New call
   ocstmt.registerOutParameter(3, OracleTypes.INTEGER);
   ocstmt.registerOutParameter(4, OracleTypes.VARCHAR);

   ocstmt.execute();

Error message is as below:
======================
Exception in JSP: com.evermind.server.rmi.OrionRemoteException: java.sql.SQLException: Invalid argument(s) in call; nested exception is: java.sql.SQLException: Invalid argument(s) in call
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: jtrifts
Solution Provided By: jtrifts
Participating Experts: 2
Solution Grade: A
Views: 62
Translate:
Loading Advertisement...
09.20.2007 at 05:25AM PDT, ID: 19927637

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
10.03.2007 at 10:36PM PDT, ID: 20011977

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
10.09.2007 at 04:11AM PDT, ID: 20039827

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
10.09.2007 at 04:21AM PDT, ID: 20039862

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628