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

NumberFormatException accessing Announcements

    XMLWordPrintable

    Details

      Description

      On a database upgraded from 2.7.x to current 2.8.x all announcements are missing with the following stack trace in the logs:

      2011-11-29 11:23:10,473 INFO TP-Processor3 org.sakaiproject.util.BaseDbDoubleStorage - readResource():
      java.lang.NumberFormatException: For input string: ""
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      at java.lang.Integer.parseInt(Integer.java:470)
      at java.lang.Integer.parseInt(Integer.java:499)
      at org.sakaiproject.message.impl.BaseMessageService$BaseMessageHeaderEdit.<init>(BaseMessageService.java:4063)
      at org.sakaiproject.announcement.impl.BaseAnnouncementService$BaseAnnouncementMessageHeaderEdit.<init>(BaseAnnouncementService.java:1602)
      at org.sakaiproject.announcement.impl.BaseAnnouncementService.newMessageHeader(BaseAnnouncementService.java:504)
      at org.sakaiproject.message.impl.BaseMessageService$BaseMessageEdit.<init>(BaseMessageService.java:3614)
      at org.sakaiproject.announcement.impl.BaseAnnouncementService$BaseAnnouncementMessageEdit.<init>(BaseAnnouncementService.java:1541)
      at org.sakaiproject.announcement.impl.BaseAnnouncementService.newResource(BaseAnnouncementService.java:295)
      at org.sakaiproject.util.BaseDbDoubleStorage.readResource(BaseDbDoubleStorage.java:736)
      at org.sakaiproject.util.BaseDbDoubleStorage$1.readSqlResultRecord(BaseDbDoubleStorage.java:1680)
      at org.sakaiproject.db.impl.BasicSqlService.dbRead(BasicSqlService.java:575)
      at org.sakaiproject.db.impl.BasicSqlService.dbRead(BasicSqlService.java:471)
      at org.sakaiproject.util.BaseDbDoubleStorage.getResources(BaseDbDoubleStorage.java:1672)
      at org.sakaiproject.announcement.impl.DbAnnouncementService$DbStorage.getMessages(DbAnnouncementService.java:352)
      at org.sakaiproject.message.impl.BaseMessageService.getMessages(BaseMessageService.java:1179)
      at org.sakaiproject.message.tool.SynopticMessageAction.retrieveMessages(SynopticMessageAction.java:429)
      at org.sakaiproject.message.tool.SynopticMessageAction.buildMainPanelContext(SynopticMessageAction.java:386)
      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:597)
      at org.sakaiproject.cheftool.VelocityPortletPaneledAction.toolModeDispatch(VelocityPortletPaneledAction.java:417)
      at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:236)
      at org.sakaiproject.cheftool.VelocityPortletPaneledAction.doGet(VelocityPortletPaneledAction.java:1086)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
      at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      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:598)
      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:659)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:359)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
      at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:511)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1429)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doTool(ToolHandler.java:204)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doGet(ToolHandler.java:96)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:862)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      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:659)
      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:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:704)
      at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:897)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Thread.java:662)

      Attached patch to messages addresses the issue

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                dhorwitz David Horwitz
                Reporter:
                dhorwitz David Horwitz
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration