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

Can cause a DB error with a Glossary import if the short description is greater than 255 characters

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.7.0
    • Component/s: OSP: Glossary
    • Labels:
      None
    • Environment:
      qa1-nl

      Description

      If you import a glossary with more than 255 characters for the short description. The data goes straight to the DB and generates an SQLExcpetion (shown next). Prefer the same checks infront and error message as used in the GUI when creating entries

      . 2010-02-25 13:25:26,011 WARN TP-Processor8 org.hibernate.util.JDBCExceptionReporter - SQL Error: 1406, SQLState: 22001
      2010-02-25 13:25:26,027 ERROR TP-Processor8 org.hibernate.util.JDBCExceptionReporter - Data truncation: Data too long for column 'term' at row 1
      2010-02-25 13:25:26,027 ERROR TP-Processor8 org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
      org.hibernate.exception.DataException: Could not execute JDBC batch update
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254)
      at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93)
      at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:88)
      at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:223)
      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2219)
      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2655)
      at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:60)
      at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1001)
      at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:339)
      at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
      at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)
      at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      at $Proxy49.importTermsResource(Unknown Source)
      at org.theospi.portfolio.help.control.GlossaryImportController.handleRequest(GlossaryImportController.java:109)
      at org.sakaiproject.metaobj.utils.mvc.impl.servlet.FormControllerImpl.onSubmit(FormControllerImpl.java:87)
      at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
      at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265)
      at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
      at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bkirschn Beth Kirschner
                Reporter:
                a.m.berg@uva.nl Alan Berg
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code