This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inserted value too large for column

 
satish kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting 'inserted value too large for column' error but how can I tell which column is causing the problem? Can I know that information from SQLException object?
[ December 22, 2004: Message edited by: Bear Bibeault ]
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how are you getting this "inserted value too large for the column".
are you doing sqlException.printStackTrace()?
 
satish kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes...I've included output of sqlExcp.printStackTrace() too

java.sql.SQLException: ORA-01401: inserted value too large for column

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:878)
at acrostics.TestOracle.<init>(TestOracle.java:34)
at acrostics.TestOracle.main(TestOracle.java:64)
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satish,

how can I tell which column is causing the problem

As far as I know, you can't.
[Note: You may be able to in Oracle 10g, but I'm still on Oracle 9i.]
You just have to check the SQL statement that you are sending to the
database.

For example, if you are trying to enter the string "several" into a column
that is defined as VARCHAR2(5), you will get this error.

If it is difficult for you to check the SQL, then perhaps try "P6 Spy":

http://www.p6spy.com

Good Luck,
Avi.
 
satish kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found out which column was causing the problem by looking at data dictionary and my SQL. I am a bit disappointed that system can't specify which column is too large. Is it driver limitation or database limitation?
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by satish kumar:
Is it driver limitation or database limitation?
I suspect it's the database. Issuing the same SQL in SQL*Plus results in the same message without the table/column. Luckily, when you violate a constraint it tells you its name!
 
Nitin Jawarkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satish,

First of all try the same sql command in your oracle database
still it will give the same then you should check the limitations of your table, like datatype,indexing etc.
Thanx
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic