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

Non-text files cause Stack Trace when creating Popup menu

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.6, 19.2, 20.0
    • Fix Version/s: 19.3, 20.0
    • Component/s: PA System
    • Labels:
      None
    • 19 status:
      Verified
    • 12 status:
      Please Merge

      Description

      1) Log in as admin
      2) Go to PA System tool in Admin Workspace
      3) Either create a Popup or edit an existing Popup
      4) A Template is required. Only HTML works. If you try uploading an xml or txt file, the system allows you. But if you try uploading an invalid file like a png or pdf, etc, and then click Save Popup you get a Stack Trace.

      org.sakaiproject.portal.api.PortalHandlerException: java.lang.RuntimeException: Failure in database action: Update an existing popup campaign
          at org.sakaiproject.portal.charon.handlers.WorksiteHandler.doPost(WorksiteHandler.java:71)
      caused by: java.lang.RuntimeException: Failure in database action: Update an existing popup campaign
          at org.sakaiproject.pasystem.impl.popups.PopupStorage.updateCampaign(PopupStorage.java:95)
      caused by: java.sql.SQLException: Incorrect string value: '\xF3\xAE\x8E\xBEZ\xEF...' for column 'template_content' at row 1
          at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
          at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)
          at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
          at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
          at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1274)
          at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:780)
          at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
          at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009)
          at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094)
          at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994)
          at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
          at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java:-1)
          at org.sakaiproject.pasystem.impl.common.DBPreparedStatement.executeUpdate(DBPreparedStatement.java:107)
          at org.sakaiproject.pasystem.impl.popups.PopupStorage.setPopupContent(PopupStorage.java:239)
          at org.sakaiproject.pasystem.impl.popups.PopupStorage.access$000(PopupStorage.java:53)
          at org.sakaiproject.pasystem.impl.popups.PopupStorage$2.call(PopupStorage.java:111)
          at org.sakaiproject.pasystem.impl.popups.PopupStorage$2.call(PopupStorage.java:96)
          at org.sakaiproject.pasystem.impl.common.DB.transaction(DB.java:63)
          at org.sakaiproject.pasystem.impl.popups.PopupStorage.updateCampaign(PopupStorage.java:95)
          at org.sakaiproject.pasystem.tool.handlers.PopupsHandler.handleCreateOrUpdate(PopupsHandler.java:126)
          at org.sakaiproject.pasystem.tool.handlers.CrudHandler.handle(CrudHandler.java:53)
          at org.sakaiproject.pasystem.tool.handlers.PopupsHandler.handle(PopupsHandler.java:57)
          at org.sakaiproject.pasystem.tool.PASystemServlet.doGet(PASystemServlet.java:125)
          at org.sakaiproject.pasystem.tool.PASystemServlet.doPost(PASystemServlet.java:99)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
          at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:411)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:466)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:358)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
          at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:513)
          at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1485)
          at org.sakaiproject.portal.charon.handlers.SiteHandler.doToolBuffer(SiteHandler.java:1189)
          at org.sakaiproject.portal.charon.handlers.SiteHandler.bufferContent(SiteHandler.java:1023)
          at org.sakaiproject.portal.charon.handlers.SiteHandler.doSite(SiteHandler.java:486)
          at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:265)
          at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:153)
          at org.sakaiproject.portal.charon.handlers.WorksiteHandler.doPost(WorksiteHandler.java:71)
          at org.sakaiproject.portal.charon.SkinnableCharonPortal.doPost(SkinnableCharonPortal.java:1161)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
          at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:460)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
          at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
          at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2445)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.lang.Thread.run(Thread.java:745)
      
      
      user: admin
      
      usage-session: 1962bfce-e26c-4ca0-9333-848176aee2e7
      
      time: 27/06/2017 08:09:24
      
      

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                farreri Miguel Pellicer
                Reporter:
                ncaidin Neal Caidin
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration