org.broadleafcommerce.core.checkout.service.exception.CheckoutException: Unable to checkout order -- id: 22701


Samebug tips2

Use the proper ORM annotations (@ManyToOne and @OneToMany).


,
via Stack Overflow by JamesENL

Use eager fetch (fetch = FetchType.EAGER) annotation.


,
via Stack Overflow by Kleber Mota

Solutions on the web2

Solution icon of web
Unable to checkout order -- id: 22701

Solution icon of github
Unable to checkout order -- id: 20151

Stack trace

org.broadleafcommerce.core.checkout.service.exception.CheckoutException: Unable to checkout order -- id: 22701
	at org.broadleafcommerce.core.checkout.service.CheckoutServiceImpl.performCheckout(CheckoutServiceImpl.java:82)
	at com.efx.pet.service.ordermanagement.impl.OrderManagementServiceImpl.checkout(OrderManagementServiceImpl.java:271)
	at com.efx.pet.service.business_process.delegate.OrderManagementDelegate.checkout(OrderManagementDelegate.java:106)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.activiti.engine.impl.javax.el.BeanELResolver.invoke(BeanELResolver.java:479)
	at org.activiti.engine.impl.javax.el.CompositeELResolver.invoke(CompositeELResolver.java:397)
	at org.activiti.engine.impl.juel.AstMethod.invoke(AstMethod.java:91)
	at org.activiti.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
	at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
	at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)
	at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
	at org.activiti.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:33)
	at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
	at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
	at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50)
	at org.activiti.engine.impl.bpmn.behavior.ServiceTaskExpressionActivityBehavior.execute(ServiceTaskExpressionActivityBehavior.java:45)
	at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
	at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530)
	at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
	at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
	at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530)
	at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
	at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530)
	at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49)
	at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530)
	at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:65)
	at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530)
	at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:115)
	at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530)
	at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36)
	at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
	at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530)
	at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
	at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:85)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:535)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:530)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:370)
	at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:102)
	at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:51)
	at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
	at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:47)
	at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.signal(UserTaskActivityBehavior.java:98)
	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:353)
	at org.activiti.engine.impl.persistence.entity.TaskEntity.complete(TaskEntity.java:157)
	at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:39)
	at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:24)
	at org.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:58)
	at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
	at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:60)
	at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
	at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
	at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
	at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:161)
	at com.efx.pet.service.business_process.ActivitiBusinessProcessService.completeTask(ActivitiBusinessProcessService.java:266)
	at com.efx.pet.service.business_process.OrderManagementDelegateTest.testProcessExecution(OrderManagementDelegateTest.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.broadleafcommerce.core.order.domain.OrderImpl.orderAdjustments, could not initialize proxy - no Session
	at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:566)
	at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:186)
	at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:545)
	at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:124)
	at org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:266)
	at org.broadleafcommerce.core.offer.service.workflow.VerifyCustomerMaxOfferUsesActivity.addOfferIds(VerifyCustomerMaxOfferUsesActivity.java:90)
	at org.broadleafcommerce.core.offer.service.workflow.VerifyCustomerMaxOfferUsesActivity.execute(VerifyCustomerMaxOfferUsesActivity.java:50)
	at org.broadleafcommerce.core.offer.service.workflow.VerifyCustomerMaxOfferUsesActivity.execute(VerifyCustomerMaxOfferUsesActivity.java:39)
	at org.broadleafcommerce.core.workflow.SequenceProcessor.doActivities(SequenceProcessor.java:79)
	at org.broadleafcommerce.core.checkout.service.CheckoutServiceImpl.performCheckout(CheckoutServiceImpl.java:72)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

11 times, 6 months ago
Once, 1 month ago
10 times, 10 months ago
3 times, 11 months ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
40 more bugmates