1.关于javax.servlet.ServletException的问题
在调试一个程序时,tomcat报以下错误.不清楚是什么原因,希望大家能帮忙看看!
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Insert request failed: INSERT INTO BOOK
(BOOK_ID,TITLE,REMOVED,RETURNDATE,AVAILABILITY,ADDEDDATE,`TYPE`,COCOUNT,RATING,AUTHOR,BORROWER_USER_ID_OID) VALUES
(?,?,?,?,?,?,?,?,?,?,?)
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:88)
root cause
javax.jdo.JDODataStoreException: Insert request failed: INSERT INTO BOOK
(BOOK_ID,TITLE,REMOVED,RETURNDATE,AVAILABILITY,ADDEDDATE,`TYPE`,COCOUNT,RATING,AUTHOR,BORROWER_USER_ID_OID) VALUES
(?,?,?,?,?,?,?,?,?,?,?)
NestedThrowables:
java.sql.SQLException: Data too long for column 'REMOVED' at row 1
org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:412)
org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2379)
org.jpox.store.StoreManager.insert(StoreManager.java:775)
org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3512)
org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3485)
org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1146)
org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1201)
com.konarkdev.elibrary_manager.client.AddBookAction.execute(Unknown Source)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:88)
root cause
java.sql.SQLException: Data too long for column 'REMOVED' at row 1
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2001)
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1168)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1279)
com.mysql.jdbc.Connection.execSQL(Connection.java:2281)
com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1419)
org.jpox.store.rdbms.ParamLoggingPreparedStatement.execute(ParamLoggingPreparedStatement.java:213)
org.jpox.store.rdbms.request.Request.executeUpdate(Request.java:88)
org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:283)
org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2379)
org.jpox.store.StoreManager.insert(StoreManager.java:775)
org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3512)
org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3485)
org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1146)
org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1201)
com.konarkdev.elibrary_manager.client.AddBookAction.execute(Unknown Source)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:88)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
--转自