Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-24884

forums / entering a title longer than 255 characters throws an exception when saving

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 2.4.1, 2.5.0, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.6.0, 2.6.1, 2.7.0
    • Fix Version/s: None
    • Component/s: Messages Tool
    • Labels:
      None
    • Environment:
      Oncourse - 2.4.r31590 - Sakai (r31590)
      Oncourse - 2.6.r67682 - Sakai (r67682)
    • Previous Issue Keys:
      SAK-10503, MSGCNTR-178

      Description

      In the forums tool, if I enter a title for a forum that exceeds 255 characters (the maximum allowed), and click save, it generates the exception below. Instead of throwing an exception, it should display an error message to the user letting them know that the maximum title length is 255 characters. Something like "Alert: Forum titles may not exceed 255 characters"

      Technical Details

      This information will automatically be included in your bug report.

      org.sakaiproject.portal.api.PortalHandlerException: org.sakaiproject.tool.api.ToolException: #

      {ForumTool.processActionSaveForumAndAddTopic}: javax.faces.el.EvaluationException: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL [insert into MFR_OPEN_FORUM_T (VERSION, UUID, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY, DEFAULTASSIGNNAME, TITLE, SHORT_DESCRIPTION, EXTENDED_DESCRIPTION, TYPE_UUID, SORT_INDEX, LOCKED, DRAFT, surrogateKey, MODERATED, FORUM_DTYPE, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'DF', ?)]; SQL state [72000]; error code [12899]; ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)
      ; nested exception is java.sql.BatchUpdateException: ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)

      at org.sakaiproject.portal.charon.handlers.ToolHandler.doPost(ToolHandler.java:63)
      caused by: org.sakaiproject.tool.api.ToolException: #{ForumTool.processActionSaveForumAndAddTopic}

      : javax.faces.el.EvaluationException: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL [insert into MFR_OPEN_FORUM_T (VERSION, UUID, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY, DEFAULTASSIGNNAME, TITLE, SHORT_DESCRIPTION, EXTENDED_DESCRIPTION, TYPE_UUID, SORT_INDEX, LOCKED, DRAFT, surrogateKey, MODERATED, FORUM_DTYPE, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'DF', ?)]; SQL state [72000]; error code [12899]; ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)
      ; nested exception is java.sql.BatchUpdateException: ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)

      at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1100)
      caused by: javax.servlet.ServletException: #

      {ForumTool.processActionSaveForumAndAddTopic}: javax.faces.el.EvaluationException: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL [insert into MFR_OPEN_FORUM_T (VERSION, UUID, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY, DEFAULTASSIGNNAME, TITLE, SHORT_DESCRIPTION, EXTENDED_DESCRIPTION, TYPE_UUID, SORT_INDEX, LOCKED, DRAFT, surrogateKey, MODERATED, FORUM_DTYPE, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'DF', ?)]; SQL state [72000]; error code [12899]; ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)
      ; nested exception is java.sql.BatchUpdateException: ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      caused by: javax.faces.FacesException: #{ForumTool.processActionSaveForumAndAddTopic}

      : javax.faces.el.EvaluationException: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL [insert into MFR_OPEN_FORUM_T (VERSION, UUID, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY, DEFAULTASSIGNNAME, TITLE, SHORT_DESCRIPTION, EXTENDED_DESCRIPTION, TYPE_UUID, SORT_INDEX, LOCKED, DRAFT, surrogateKey, MODERATED, FORUM_DTYPE, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'DF', ?)]; SQL state [72000]; error code [12899]; ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)
      ; nested exception is java.sql.BatchUpdateException: ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)

      at javax.faces.component.UICommand.broadcast(UICommand.java:312)
      caused by: javax.faces.el.EvaluationException: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL [insert into MFR_OPEN_FORUM_T (VERSION, UUID, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY, DEFAULTASSIGNNAME, TITLE, SHORT_DESCRIPTION, EXTENDED_DESCRIPTION, TYPE_UUID, SORT_INDEX, LOCKED, DRAFT, surrogateKey, MODERATED, FORUM_DTYPE, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'DF', ?)]; SQL state [72000]; error code [12899]; ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)
      ; nested exception is java.sql.BatchUpdateException: ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)

      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
      caused by: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL [insert into MFR_OPEN_FORUM_T (VERSION, UUID, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY, DEFAULTASSIGNNAME, TITLE, SHORT_DESCRIPTION, EXTENDED_DESCRIPTION, TYPE_UUID, SORT_INDEX, LOCKED, DRAFT, surrogateKey, MODERATED, FORUM_DTYPE, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'DF', ?)]; SQL state [72000]; error code [12899]; ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)
      ; nested exception is java.sql.BatchUpdateException: ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)

      at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:258)
      caused by: java.sql.BatchUpdateException: ORA-12899: value too large for column "ONC"."MFR_OPEN_FORUM_T"."TITLE" (actual: 317, maximum: 255)

      at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
      at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10698)
      at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
      at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
      at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
      at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41)
      at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:954)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1099)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
      at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
      at org.sakaiproject.component.app.messageforums.AreaManagerImpl$1.doInHibernate(AreaManagerImpl.java:267)
      at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366)
      at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:334)
      at org.sakaiproject.component.app.messageforums.AreaManagerImpl.getAreaByContextIdAndTypeId(AreaManagerImpl.java:271)
      at org.sakaiproject.component.app.messageforums.AreaManagerImpl.getDiscusionArea(AreaManagerImpl.java:148)
      at sun.reflect.GeneratedMethodAccessor1916.invoke(null:-1)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
      at $Proxy34.getDiscusionArea(null:-1)
      at org.sakaiproject.component.app.messageforums.ui.DiscussionForumManagerImpl.getDiscussionForumArea(DiscussionForumManagerImpl.java:322)
      at org.sakaiproject.component.app.messageforums.ui.DiscussionForumManagerImpl.saveForum(DiscussionForumManagerImpl.java:949)
      at org.sakaiproject.component.app.messageforums.ui.DiscussionForumManagerImpl.saveForum(DiscussionForumManagerImpl.java:879)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
      at $Proxy39.saveForum(null:-1)
      at org.sakaiproject.tool.messageforums.DiscussionForumTool.saveForumSettings(DiscussionForumTool.java:1020)
      at org.sakaiproject.tool.messageforums.DiscussionForumTool.processActionSaveForumAndAddTopic(DiscussionForumTool.java:910)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
      at javax.faces.component.UICommand.broadcast(UICommand.java:312)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:555)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.sakaiproject.tool.messageforums.MessageForumsFilePickerServlet.dispatch(MessageForumsFilePickerServlet.java:151)
      at org.sakaiproject.jsf.util.JsfTool.doPost(JsfTool.java:256)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:555)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:441)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1100)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doTool(ToolHandler.java:163)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doGet(ToolHandler.java:86)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doPost(ToolHandler.java:63)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.doPost(SkinnableCharonPortal.java:943)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:592)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
      at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
      at java.lang.Thread.run(Thread.java:595)

      user: kmbrokam

      usage-session: 2301759c-1de0-453f-00fb-faa58f8a5c91

      time: Jun 28, 2007 09:12:19

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  baholladay Bryan Holladay
                  Reporter:
                  arwhyte Anthony Whyte
                  Votes:
                  1 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration