You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "Andy Stevens (JIRA)" <no...@atlassian.com> on 2007/07/16 13:11:30 UTC
[Roller-JIRA] Created: (ROL-1480) Poor handling of database
exception in blog Settings screen
Poor handling of database exception in blog Settings screen
-----------------------------------------------------------
Key: ROL-1480
URL: http://opensource.atlassian.com/projects/roller/browse/ROL-1480
Project: Roller
Issue Type: Bug
Components: Configuration & Settings
Affects Versions: 3.1
Environment: WebSphere Platform 6.0 [BASE 6.0.2.15 cf150636.04]
Reporter: Andy Stevens
Assignee: Roller Unassigned
Priority: Minor
If I edit the General Settings for a blog and type more than 255 characters into the Description field, when I try to submit the changes I get an error page that reads
Unexpected Exception
Roller has encountered and logged an unexpected exception.
Checking the server log file, I find the following messages:
[16/07/07 11:53:08:747 BST] 00000020 ServletWrappe E SRVE0068E: Could not invoke the service() method on servlet action. Exception thrown : javax.servlet.ServletException
at org.apache.roller.ui.authoring.struts.actions.WebsiteFormAction.update(WebsiteFormAction.java:215)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:276)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:196)
...
---- Begin backtrace for Nested Throwables
org.apache.roller.RollerException
at org.apache.roller.business.hibernate.HibernatePersistenceStrategy.flush(HibernatePersistenceStrategy.java:228)
at org.apache.roller.business.hibernate.HibernateRollerImpl.flush(HibernateRollerImpl.java:109)
at org.apache.roller.ui.authoring.struts.actions.WebsiteFormAction.update(WebsiteFormAction.java:184)
...
--- ROOT CAUSE ---
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:202)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1009)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:356)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at org.apache.roller.business.hibernate.HibernatePersistenceStrategy.flush(HibernatePersistenceStrategy.java:222)
at org.apache.roller.business.hibernate.HibernateRollerImpl.flush(HibernateRollerImpl.java:109)
at org.apache.roller.ui.authoring.struts.actions.WebsiteFormAction.update(WebsiteFormAction.java:184)
...
Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'description' at row 1
at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647)
at com.mysql.jdbc.jdbc2.optional.StatementWrapper.executeBatch(StatementWrapper.java:681)
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteBatch(WSJdbcStatement.java:1173)
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java:516)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
This should be handled in a much more friendly fashion.
Given that textarea's rows & cols attributes only determine the size and don't restrict the amount of text that can be entered, the action should validate the length of this value before trying to save it. Ideally, there'd be some javascript checking it client-side as well, before allowing the form to be submitted.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/roller/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira