Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.5
    • Fix Version/s: 2.4, 2.3.5
    • Component/s: Tool Voting
    • Labels:
      None

      Description

      When trying to import a vote (see attached sequence) that was created on 2.3.4 into an upgraded 2.3.5 server (from 2.3.4), then I get the following exception:

      2010-11-24 15:51:17,571 ERROR [ExportToolContentService] Unable to import tool content for tool Voting. Caused by org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [org.lamsfoundation.lams.tool.vote.pojos.VoteContent]; SQL [insert into tl_lavote11_content (content_id, title, instructions, reflectionSubject, creation_date, update_date, reflect, allowText, created_by, run_offline, define_later, offline_instructions, online_instructions, content_in_use, lock_on_finish, maxNominationCount, minNominationCount, show_results) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; Column 'minNominationCount' cannot be null; nested exception is com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'minNominationCount' cannot be null.
      org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [org.lamsfoundation.lams.tool.vote.pojos.VoteContent]; SQL [insert into tl_lavote11_content (content_id, title, instructions, reflectionSubject, creation_date, update_date, reflect, allowText, created_by, run_offline, define_later, offline_instructions, online_instructions, content_in_use, lock_on_finish, maxNominationCount, minNominationCount, show_results) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; Column 'minNominationCount' cannot be null; nested exception is com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'minNominationCount' cannot be null
      com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'minNominationCount' cannot be null
              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
              at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1604)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1519)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1504)
              at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:316)
              at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1749)
              at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2168)
              at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:34)
              at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
              at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:239)
              at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:159)
              at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:104)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:96)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
              at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:454)
              at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:449)
              at org.springframework.orm.hibernate3.HibernateTemplate$18.doInHibernate(HibernateTemplate.java:693)
              at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366)
              at org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:690)
              at org.lamsfoundation.lams.tool.vote.dao.hibernate.VoteContentDAO.saveVoteContent(VoteContentDAO.java:92)
              at org.lamsfoundation.lams.tool.vote.service.VoteServicePOJO.importToolContent(VoteServicePOJO.java:1234)
              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:592)
              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 $Proxy77.importToolContent(Unknown Source)
              at org.lamsfoundation.lams.learningdesign.service.ExportToolContentService.importLearningDesignV2(ExportToolContentService.java:1433)
              at org.lamsfoundation.lams.learningdesign.service.ExportToolContentService.importLearningDesign(ExportToolContentService.java:1314)
              at org.lamsfoundation.lams.learningdesign.service.ExportToolContentService$$FastClassByCGLIB$$d05ed216.invoke(<generated>)
              at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
              at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:685)
              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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:623)
              at org.lamsfoundation.lams.learningdesign.service.ExportToolContentService$$EnhancerByCGLIB$$5909b733.importLearningDesign(<generated>)
              at org.lamsfoundation.lams.authoring.web.ImportToolContentAction.importLD(ImportToolContentAction.java:196)
              at org.lamsfoundation.lams.authoring.web.ImportToolContentAction.execute(ImportToolContentAction.java:132)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
              at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.lamsfoundation.lams.web.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:142)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.lamsfoundation.lams.web.session.SystemSessionFilter.doFilter(SystemSessionFilter.java:71)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.lamsfoundation.lams.integration.security.SingleSignOn.invoke(SingleSignOn.java:121)
              at org.lamsfoundation.lams.integration.security.LoginRequestValve.invoke(LoginRequestValve.java:67)
              at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:481)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:655)
      2010-11-24 15:51:17,624 ERROR [ImportToolContentAction] Error occured during import
      org.springframework.dao.DataIntegrityViolationException: Hibernate transaction synchronization: could not insert: [org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent]; SQL [insert into tl_lavote11_nomination_content (nomination, display_order, vote_content_id) values (?, ?, ?)]; Column 'vote_content_id' cannot be null; nested exception is com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'vote_content_id' cannot be null
      com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'vote_content_id' cannot be null
              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
              at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1604)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1519)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1504)
              at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:316)
              at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1749)
              at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2168)
              at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:34)
              at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
              at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:239)
              at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:159)
              at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:104)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:96)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
              at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:454)
              at org.hibernate.engine.Cascades$5.cascade(Cascades.java:153)
              at org.hibernate.engine.Cascades.cascade(Cascades.java:721)
              at org.hibernate.engine.Cascades.cascadeCollection(Cascades.java:860)
              at org.hibernate.engine.Cascades.cascade(Cascades.java:739)
              at org.hibernate.engine.Cascades.cascade(Cascades.java:817)
              at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:121)
              at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:112)
              at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:59)
              at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
              at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:716)
              at org.springframework.orm.hibernate3.SessionFactoryUtils$SpringSessionSynchronization.beforeCommit(SessionFactoryUtils.java:884)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:661)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:486)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:473)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:267)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
              at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:623)
              at org.lamsfoundation.lams.learningdesign.service.ExportToolContentService$$EnhancerByCGLIB$$5909b733.importLearningDesign(<generated>)
              at org.lamsfoundation.lams.authoring.web.ImportToolContentAction.importLD(ImportToolContentAction.java:196)
              at org.lamsfoundation.lams.authoring.web.ImportToolContentAction.execute(ImportToolContentAction.java:132)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
              at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.lamsfoundation.lams.web.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:142)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.lamsfoundation.lams.web.session.SystemSessionFilter.doFilter(SystemSessionFilter.java:71)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.lamsfoundation.lams.integration.security.SingleSignOn.invoke(SingleSignOn.java:121)
              at org.lamsfoundation.lams.integration.security.LoginRequestValve.invoke(LoginRequestValve.java:67)
              at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:481)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:655)

        Activity

        Hide
        dronych Andrey Balan added a comment -
        fixed

        it turned out autopatch uses patches table and updates tool versions *only* in this table,
        leaving lams_tool table unchanged.
        but in order to make VoteImportContentVersionFilter work it requires correct tool versions in lams_tool.
        so I just added update for the lams_tool table

        **we might need to look at autopatch bits closer just to make it update lams_tool table as well
        Show
        dronych Andrey Balan added a comment - fixed it turned out autopatch uses patches table and updates tool versions *only* in this table, leaving lams_tool table unchanged. but in order to make VoteImportContentVersionFilter work it requires correct tool versions in lams_tool. so I just added update for the lams_tool table **we might need to look at autopatch bits closer just to make it update lams_tool table as well
        Hide
        ernieg Ernie Ghiglione added a comment -
        Tested and closed for 2.3.5 and 2.4
        Show
        ernieg Ernie Ghiglione added a comment - Tested and closed for 2.3.5 and 2.4

          People

          • Assignee:
            dronych Andrey Balan
            Reporter:
            ernieg Ernie Ghiglione
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development