My Oracle Support Banner

Execute reserveEntityRequest Web Service to Perform a Threaded Load Test and Receive the Following Error: "org.eclipse.persistence.exceptions.OptimisticLockException" (Doc ID 2789909.1)

Last updated on JULY 13, 2021

Applies to:

Oracle Communications Unified Inventory Management - Version 7.4.0.0.0 and later
Information in this document applies to any platform.

Symptoms

 Execute reserveEntityRequest Web Service to perform a threaded Load Test (SoapUI for ease of recreation but happens in custom code when executing OOTB reserveEntityRequest Web Service as well) and receive the following error:

 

Soap Response

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Header/><env:Body>
    <env:Fault>
      <faultcode>env:Server</faultcode>
      <faultstring></faultstring>
      <detail>
        <faul:inventoryFault xmlns:faul="http://xmlns.oracle.com/communications/inventory/webservice/fault">
          <fault>
            <v1:errorCode xmlns:v1="http://xmlns.oracle.com/communications/framework/webservice/fault/v1-0">
            </v1:errorCode>
            <v1:errorMessage xmlns:v1="http://xmlns.oracle.com/communications/framework/webservice/fault/v1-0">javax.persistence.OptimisticLockException: Exception [EclipseLink-5011] (Eclipse Persistence Services - 2.6.7.v20190604-418f1a1c56): org.eclipse.persistence.exceptions.OptimisticLockException Exception Description: One or more objects cannot be updated because it has changed or been deleted since it was last read</v1:errorMessage>
          </fault>
        </faul:inventoryFault>
      </detail>
    </env:Fault>
  </env:Body>
</env:Envelope>

 

Log file error:

2021-03-21 20:14:52,275 ERROR [uimadmin] [[ACTIVE] ExecuteThread: '51' for queue: 'weblogic.kernel.Default (self-tuning)'] [TransactionManager] An error has occured flushing the user transaction.
javax.persistence.OptimisticLockException: Exception [EclipseLink-5011] (Eclipse Persistence Services - 2.6.5.v20170607-b3d05bd): org.eclipse.persistence.exceptions.OptimisticLockException
Exception Description: One or more objects cannot be updated because it has changed or been deleted since it was last read
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:876) ~[eclipselink.jar:2.6.5.v20170607-b3d05bd]
at sun.reflect.GeneratedMethodAccessor3227.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231]
at weblogic.persistence.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:97) ~[com.oracle.weblogic.persistence.jar:12.2.1.3]
at weblogic.persistence.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:164) ~[com.oracle.weblogic.persistence.jar:12.2.1.3]
at weblogic.persistence.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:86) ~[com.oracle.weblogic.persistence.jar:12.2.1.3]
at com.sun.proxy.$Proxy469.flush(Unknown Source) ~[?:?]
at oracle.communications.inventory.api.common.impl.TransactionManagerImpl.flush(TransactionManagerImpl.java:264) [uim-managers.jar:?]
at oracle.communications.inventory.api.common.BaseInvManager.flushTransaction(BaseInvManager.java:1856) [uim-managers.jar:?]
at oracle.communications.inventory.api.common.BaseInvManager.flushTransaction(BaseInvManager.java:1870) [uim-managers.jar:?]
at oracle.communications.inventory.webservice.delegate.ReservationDelegate.reserveEntity(ReservationDelegate.java:81) [uim-webservices-adapter-rpc.jar:?]
at oracle.communications.inventory.webservice.adapter.nsrm.NSRMAdapter.reserveResource(NSRMAdapter.java:377) [uim-webservices-adapter-rpc.jar:?]
at oracle.communications.inventory.webservice.ws.InventoryWSPortImpl.reserveEntity(InventoryWSPortImpl.java:204) [uim-webservices-adapter-rpc.jar:?]
at sun.reflect.GeneratedMethodAccessor3273.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231]
at weblogic.wsee.component.pojo.JavaClassComponent.invoke(JavaClassComponent.java:117) [com.oracle.webservices.wls.wls-jaxrpc.jar:?]
at weblogic.wsee.ws.dispatch.server.ComponentHandler.handleRequest(ComponentHandler.java:83) [com.oracle.webservices.wls.wls-jaxrpc.jar:?]
at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:142) [com.oracle.webservices.wls.wls-soap-stack-impl.jar:?]
at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:115) [com.oracle.webservices.wls.wls-jaxrpc.jar:?]
at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80) [com.oracle.webservices.wls.wls-jaxrpc.jar:?]
at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66) [com.oracle.webservices.wls.wls-jaxrpc.jar:?]
at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44) [com.oracle.webservices.wls.wls-jaxrpc.jar:?]
at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:301) [com.oracle.webservices.wls.wls-jaxrpc.jar:?]
at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:177) [com.oracle.webservices.wls.wls-jaxrpc.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet.javax.servlet-api.jar:3.1.0]
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at oracle.security.jps.ee.http.JpsAbsFilter$3.run(JpsAbsFilter.java:172) [jps-ee.jar:?]
at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_231]
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315) [jps-api.jar:?]
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:650) [jps-ee.jar:?]
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:110) [jps-ee.jar:?]
at oracle.security.jps.ee.http.JpsAbsFilter.doFilterInternal(JpsAbsFilter.java:273) [jps-ee.jar:?]
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:147) [jps-ee.jar:?]
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:94) [jps-ee.jar:?]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:248) [dms.jar:12.2.1.3.0]
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3706) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3672) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:328) [com.oracle.weblogic.security.subject.jar:12.2.1.3]
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197) [com.oracle.weblogic.security.subject.jar:12.2.1.3]
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2443) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2291) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2269) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1705) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1665) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272) [com.oracle.weblogic.servlet.jar:12.2.1.3]
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352) [com.bea.core.utils.full.jar:12.2.1.3]
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337) [com.bea.core.utils.full.jar:12.2.1.3]
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57) [com.oracle.weblogic.work.jar:12.2.1.3]
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41) [com.bea.core.weblogic.workmanager.jar:12.2.1.3]
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:652) [com.bea.core.weblogic.workmanager.jar:12.2.1.3]
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:420) [com.bea.core.weblogic.workmanager.jar:12.2.1.3]
at weblogic.work.ExecuteThread.run(ExecuteThread.java:360) [com.bea.core.weblogic.workmanager.jar:12.2.1.3]
Caused by: org.eclipse.persistence.exceptions.OptimisticLockException:
Exception Description: One or more objects cannot be updated because it has changed or been deleted since it was last read

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.