org.kuali.student.r2.common.exceptions.OperationFailedException: Version Mismatch

Kuali JIRA | Garey Taylor | 2 years ago
  1. 0

    When the system gets under heavy load we start to see version mismatch errors in the registration engine. The exception happens in the same place every time: {code} org.kuali.student.r2.common.exceptions.OperationFailedException: Version Mismatch at org.kuali.student.enrollment.class1.lpr.service.impl.LprServiceImpl.changeLprTransactionItem(LprServiceImpl.java:458) at sun.reflect.GeneratedMethodAccessor1039.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy364.changeLprTransactionItem(Unknown Source) at org.kuali.student.enrollment.lpr.service.LprServiceDecorator.changeLprTransactionItem(LprServiceDecorator.java:137) at org.kuali.student.enrollment.lpr.service.LprServiceDecorator.changeLprTransactionItem(LprServiceDecorator.java:137) at org.kuali.student.enrollment.registration.engine.service.impl.CourseRegistrationEngineServiceImpl.updateLprTransactionItemResult(CourseRegistrationEngineServiceImpl.java:79) at org.kuali.student.enrollment.registration.engine.processor.CourseRegistrationLprActionProcessor.notifyWaitlistAvailable(CourseRegistrationLprActionProcessor.java:135) at org.kuali.student.enrollment.registration.engine.processor.CourseRegistrationLprActionProcessor.process(CourseRegistrationLprActionProcessor.java:76) at sun.reflect.GeneratedMethodAccessor1004.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:407) at org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:278) at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:251) at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:166) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.processor.Pipeline.process(Pipeline.java:118) at org.apache.camel.processor.Pipeline.process(Pipeline.java:80) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105) at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87) at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103) at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562) at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500) at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1096) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1088) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:985) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: org.kuali.student.r2.common.exceptions.VersionMismatchException: Failed for entity.id = d227f751-dc6e-4b61-ac5c-6a5782303262 at org.kuali.student.r2.common.dao.GenericEntityDao.merge(GenericEntityDao.java:171) at org.kuali.student.enrollment.class1.lpr.service.impl.LprServiceImpl.changeLprTransactionItem(LprServiceImpl.java:454) {code} So we need to find out what's updating the entity before this call.

    Kuali JIRA | 2 years ago | Garey Taylor
    org.kuali.student.r2.common.exceptions.OperationFailedException: Version Mismatch
  2. 0

    Modify an active course (with or without version) 2 times: Repro Steps Scenario #1: # Pick any CHEM course as Alice, Modify with version without curric review # Fill out rationale and active date, A&A in order to get a new active version and supersede the previous version. # Find the same course Modify This version of the superseded version # Edit title, save. Get STACKTRACE: http://pastebin.com/R6W6HAmU Scenario 2: # Pick any CHEM course as Alice, Modify with version without curric review # Fill out rationale and active date, A&A in order to get a new active version and supersede the previous version. # Find the same course Modify the active version with version (without curric review) again # Edit title, A&A # Find the course # See Version History RESULT: There is an Active and A Draft course yet the course view indicates the current course is "Superseded". Go find the course second course proposal and you will see the second modify proposal has gone to Exception state with following error in the logs: {noformat} 2014-10-08 16:24:20,419 [ks/KSB-pool-1-thread-2] u:alice/d:3039 FATAL org.kuali.rice.core.framework.persistence.jta.KualiTransactionInterceptor - Exception caught by Transaction Interceptor, this will cause a rollback at the end of the transaction. org.kuali.student.r2.common.exceptions.VersionMismatchException: Course to be updated is not the current version. at org.kuali.student.r2.lum.course.service.impl.CourseServiceImpl.updateCourse(CourseServiceImpl.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy344.updateCourse(Unknown Source) at org.kuali.student.lum.workflow.CourseStateChangeServiceImpl.changeState(CourseStateChangeServiceImpl.java:72) at org.kuali.student.cm.course.service.impl.CommonCourseMaintainableImpl.processCustomRouteStatusChange(CommonCourseMaintainableImpl.java:163) at org.kuali.student.cm.proposal.service.impl.ProposalMaintainableImpl.doRouteStatusChange(ProposalMaintainableImpl.java:375) at org.kuali.student.cm.maintenance.CMMaintenanceDocument.doRouteStatusChange(CMMaintenanceDocument.java:191) at org.kuali.rice.krad.service.impl.PostProcessorServiceImpl$1.call(PostProcessorServiceImpl.java:81) at org.kuali.rice.krad.service.impl.PostProcessorServiceImpl$1.call(PostProcessorServiceImpl.java:63) at org.kuali.rice.krad.util.GlobalVariables.doInNewGlobalVariables(GlobalVariables.java:204) at org.kuali.rice.krad.util.LegacyUtils.doInLegacyContext(LegacyUtils.java:150) at org.kuali.rice.krad.service.impl.PostProcessorServiceImpl.doRouteStatusChange(PostProcessorServiceImpl.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy146.doRouteStatusChange(Unknown Source) at org.kuali.rice.krad.workflow.postprocessor.KualiPostProcessor.doRouteStatusChange(KualiPostProcessor.java:56) at org.kuali.rice.kew.engine.StandardWorkflowEngine.notifyPostProcessor(StandardWorkflowEngine.java:491) at org.kuali.rice.kew.engine.StandardWorkflowEngine.nodePostProcess(StandardWorkflowEngine.java:401) at org.kuali.rice.kew.engine.StandardWorkflowEngine.process(StandardWorkflowEngine.java:148) at org.kuali.rice.kew.engine.BlanketApproveEngine.process(BlanketApproveEngine.java:139) at org.kuali.rice.kew.actions.BlanketApproveAction.performDeferredBlanketApproveWork(BlanketApproveAction.java:198) at org.kuali.rice.kew.impl.action.DocumentOrchestrationQueueImpl.orchestrateDocument(DocumentOrchestrationQueueImpl.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy217.orchestrateDocument(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.kuali.rice.ksb.messaging.MessageServiceInvoker.invokeService(MessageServiceInvoker.java:157) at org.kuali.rice.ksb.messaging.MessageServiceInvoker$1.doInTransaction(MessageServiceInvoker.java:72) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) at org.kuali.rice.ksb.messaging.MessageServiceInvoker.run(MessageServiceInvoker.java:67) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) {noformat}

    Kuali JIRA | 2 years ago | Jodi McKeeman
    org.kuali.student.r2.common.exceptions.VersionMismatchException: Course to be updated is not the current version.
  3. 0

    Modify an active course (with or without version) 2 times: Repro Steps Scenario #1: # Pick any CHEM course as Alice, Modify with version without curric review # Fill out rationale and active date, A&A in order to get a new active version and supersede the previous version. # Find the same course Modify This version of the superseded version # Edit title, save. Get STACKTRACE: http://pastebin.com/R6W6HAmU Scenario 2: # Pick any CHEM course as Alice, Modify with version without curric review # Fill out rationale and active date, A&A in order to get a new active version and supersede the previous version. # Find the same course Modify the active version with version (without curric review) again # Edit title, A&A # Find the course # See Version History RESULT: There is an Active and A Draft course yet the course view indicates the current course is "Superseded". Go find the course second course proposal and you will see the second modify proposal has gone to Exception state with following error in the logs: {noformat} 2014-10-08 16:24:20,419 [ks/KSB-pool-1-thread-2] u:alice/d:3039 FATAL org.kuali.rice.core.framework.persistence.jta.KualiTransactionInterceptor - Exception caught by Transaction Interceptor, this will cause a rollback at the end of the transaction. org.kuali.student.r2.common.exceptions.VersionMismatchException: Course to be updated is not the current version. at org.kuali.student.r2.lum.course.service.impl.CourseServiceImpl.updateCourse(CourseServiceImpl.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy344.updateCourse(Unknown Source) at org.kuali.student.lum.workflow.CourseStateChangeServiceImpl.changeState(CourseStateChangeServiceImpl.java:72) at org.kuali.student.cm.course.service.impl.CommonCourseMaintainableImpl.processCustomRouteStatusChange(CommonCourseMaintainableImpl.java:163) at org.kuali.student.cm.proposal.service.impl.ProposalMaintainableImpl.doRouteStatusChange(ProposalMaintainableImpl.java:375) at org.kuali.student.cm.maintenance.CMMaintenanceDocument.doRouteStatusChange(CMMaintenanceDocument.java:191) at org.kuali.rice.krad.service.impl.PostProcessorServiceImpl$1.call(PostProcessorServiceImpl.java:81) at org.kuali.rice.krad.service.impl.PostProcessorServiceImpl$1.call(PostProcessorServiceImpl.java:63) at org.kuali.rice.krad.util.GlobalVariables.doInNewGlobalVariables(GlobalVariables.java:204) at org.kuali.rice.krad.util.LegacyUtils.doInLegacyContext(LegacyUtils.java:150) at org.kuali.rice.krad.service.impl.PostProcessorServiceImpl.doRouteStatusChange(PostProcessorServiceImpl.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy146.doRouteStatusChange(Unknown Source) at org.kuali.rice.krad.workflow.postprocessor.KualiPostProcessor.doRouteStatusChange(KualiPostProcessor.java:56) at org.kuali.rice.kew.engine.StandardWorkflowEngine.notifyPostProcessor(StandardWorkflowEngine.java:491) at org.kuali.rice.kew.engine.StandardWorkflowEngine.nodePostProcess(StandardWorkflowEngine.java:401) at org.kuali.rice.kew.engine.StandardWorkflowEngine.process(StandardWorkflowEngine.java:148) at org.kuali.rice.kew.engine.BlanketApproveEngine.process(BlanketApproveEngine.java:139) at org.kuali.rice.kew.actions.BlanketApproveAction.performDeferredBlanketApproveWork(BlanketApproveAction.java:198) at org.kuali.rice.kew.impl.action.DocumentOrchestrationQueueImpl.orchestrateDocument(DocumentOrchestrationQueueImpl.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy217.orchestrateDocument(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.kuali.rice.ksb.messaging.MessageServiceInvoker.invokeService(MessageServiceInvoker.java:157) at org.kuali.rice.ksb.messaging.MessageServiceInvoker$1.doInTransaction(MessageServiceInvoker.java:72) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) at org.kuali.rice.ksb.messaging.MessageServiceInvoker.run(MessageServiceInvoker.java:67) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) {noformat}

    Kuali JIRA | 2 years ago | Jodi McKeeman
    org.kuali.student.r2.common.exceptions.VersionMismatchException: Course to be updated is not the current version.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.kuali.student.r2.common.exceptions.VersionMismatchException

      Failed for entity.id = d227f751-dc6e-4b61-ac5c-6a5782303262

      at org.kuali.student.r2.common.dao.GenericEntityDao.merge()
    2. org.kuali.student
      LprServiceImpl.changeLprTransactionItem
      1. org.kuali.student.r2.common.dao.GenericEntityDao.merge(GenericEntityDao.java:171)
      2. org.kuali.student.enrollment.class1.lpr.service.impl.LprServiceImpl.changeLprTransactionItem(LprServiceImpl.java:454)
      2 frames