| Author |
DB error in servlet while inserting data
|
Mohini Dhanaskar
Ranch Hand
Joined: Mar 27, 2012
Posts: 52
|
|
thank you sir,for your reply,that error has been removed.
But now i am getting another error as
java.sql.SQLException: ORA-01438: value larger than specified precision allowed for this column
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:754)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:972)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1192)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3415)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3499)
at ComplaintServlet.doPost(ComplaintServlet.java:84)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:662)
|
 |
Amit Ghorpade
Bartender
Joined: Jun 06, 2007
Posts: 2552
|
|
Mohini Dhanaskar wrote:thank you sir,for your reply,that error has been removed.
But now i am getting another error as
java.sql.SQLException: ORA-01438: value larger than specified precision allowed for this column
Please ShowSomeEffort and CarefullyChooseOneForum.
I guess the error message is self explanatory. You are trying to insert/update a value to a column where it is not supposed to fit.
|
SCJP, SCWCD.
|Asking Good Questions|
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
There are usually two causes:
1) a String that is longer than the maximum length for the column (e.g. a 123 character String for a varchar(100)).
2) a number that is out of range for the column's data type (e.g. a value larger than Integer.MAX_VALUE for an int column).
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Martin Vajsar
Bartender
Joined: Aug 22, 2010
Posts: 2335
|
|
In this case, it is a numeric value which exceeds precision of a numeric column (see http://www.techonthenet.com/oracle/errors/ora01438.php).
If it was string value exceeding the length of a VARCHAR2 column, the error would be ORA-01401.
|
 |
Mohini Dhanaskar
Ranch Hand
Joined: Mar 27, 2012
Posts: 52
|
|
|
thank a lot to all..
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
You're welcome.
|
 |
Martin Vajsar
Bartender
Joined: Aug 22, 2010
Posts: 2335
|
|
Oracle errors can be usually be easily searched up, using the full code (ie. including the ORA- prefix, non-core errors have different prefixes, such as PLS-). In this case, ORA-01438. When the description is not clear enough, there is lots of smart people wiling to help in this forum.
|
 |
 |
|
|
subject: DB error in servlet while inserting data
|
|
|