Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot use commit() method to commit UnitOfWork again..

Azhar AltafMar 29 2017 — edited Apr 21 2017

Hello everyone,

I am using Toplink web based application using EJBSessionBean...

I created my own View java class for showing some DB table data on UserInterface.

I have manually created find and saveViewList() methods in SessionEJBBean.java and created DataControl and drag into UserInterface.

When I click save button which calls saveViewList() method. In saveViewList(), i use commit method as shown below:

TransactionHelper.png

When compiler reaches to commit method, it shows error on runtime as follows:

Local Exception Stack:

Exception [EclipseLink-7096] (Eclipse Persistence Services - 2.6.4.v20160829-44060b6): org.eclipse.persistence.exceptions.ValidationException

Exception Description: Cannot use commit() method to commit UnitOfWork again.

at org.eclipse.persistence.exceptions.ValidationException.cannotCommitUOWAgain(ValidationException.java:572)

at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commit(UnitOfWorkImpl.java:1084)

at pk.paf.iscmd.piccs.fms.fighter.model.helper.TransactionHelper.persistEntity(TransactionHelper.java:33)

at pk.paf.iscmd.piccs.fms.fighter.model.view.fpb.XEssExcListView.relay(XEssExcListView.java:76)

at pk.paf.iscmd.piccs.fms.fighter.model.SessionEJBBean.saveView(SessionEJBBean.java:158)

at pk.paf.iscmd.piccs.fms.fighter.model.SessionEJBBean.saveViewList(SessionEJBBean.java:186)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)

at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)

at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

at com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:101)

at com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:101)

at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:101)

at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)

at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)

at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:94)

at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)

at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)

at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)

at com.sun.proxy.$Proxy295.saveViewList(Unknown Source)

at pk.paf.iscmd.piccs.fms.fighter.model.SessionEJB_qxt9um_SessionEJBLocalImpl.__WL_invoke(Unknown Source)

at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:33)

at pk.paf.iscmd.piccs.fms.fighter.model.SessionEJB_qxt9um_SessionEJBLocalImpl.saveViewList(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.

It says, it cannot commit use commit() method to commit UnitOfWork again...?????

Plz guide..

Reagards,..

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 19 2017
Added on Mar 29 2017
4 comments
1,556 views