Win a copy of Terraform in Action this week in the Cloud forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

java.sql.SQLException: Bigger type length than Maximum

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am getting the exception : java.sql.SQLException: Bigger type length than Maximum while i am executing the callable statement. we are using oracle 10g version 10.2.0.3.0 .I have google it and found some answers about upgrading the latest Jdbc drivers. I have downloaded jdbc driver 10.2.0.3.0 and placed. But still getting the same error.

This callable statement is taking 3 input paramters and 3 output parameters.

See the below code

String strsql="call Mm_Sp_Abscollrpt_Main_Summary(?,?,?,2,?,?,?)"
csPopulateData = getCallableStatement(strSql);
csPopulateData.setString(1, strLocCode); // value : AHYD2
csPopulateData.setTimestamp(2, DateUtil.retTimestamp(strDtTo)); // value: 2009-04-06 00:00:00.0
csPopulateData.setString(3, strUserId); // Value is : SANT1D
csPopulateData.registerOutParameter(4, Types.BIGINT);
csPopulateData.registerOutParameter(5, Types.BIGINT);
csPopulateData.registerOutParameter(6, Types.LONGVARCHAR);
csPopulateData.execute(); //getting exception Here


We are facing this issue in Production . Your quick response is highly appreciated.
 
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is the column that corresponds to the longvarchar modelled correctly ?
 
vavilala akumar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes the VARCHAR corresponding type in database is also VARCHAR only.It is working fine in production till 10 days back , i got the doubt on the types and changed 2 days back, still it is not working.

before my code was.

csPopulateData.registerOutParameter(4, Types.INTEGER);
csPopulateData.registerOutParameter(5, Types.INTEGER);
csPopulateData.registerOutParameter(6, Types.VARCHAR);

i have changed to

csPopulateData.registerOutParameter(4, Types.BIGINT);
csPopulateData.registerOutParameter(5, Types.BIGINT);
csPopulateData.registerOutParameter(6, Types.LONGVARCHAR);

still i am getting same error. please suggest.






 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic