Hi Oscar,

If I understand correctly, you are running integration tests (I see the
beginning of the stack trace being junit) and at the same time there is a
Quartz background job running?

When the Isis runtime is bootstrapped for testing it uses the
DeploymentType#UNIT_TESTING [1], which basically means that the Isis
session (which wraps the JDO PersistenceManager = session) is held on a
singleton).  This is the ContextCategory#STATIC_RELAXED param [2] ...
operative word being static.

What I think is happening is that your big fixture script is hitting an JDO
exception, eg unique index violation or similar, and this is causing the
static/singleton IsisSession / JDO PersistenceManager to be discarded.
 (Admittedly we don't see that error, which is an issue in and of itself).
But anyway, this persistence session is the same one that the quartz job is
using, so it then subsequently breaks.  I can understand that bit... it is
holding onto pojos that point to a JDO PersistenceManager that no longer
exists/is valid.

(From the stack traces it also looks like some other wrapping code, eg in
TimestampService and elsewhere, could perhaps take better precautions in
case the persistence session is discarded under its feet).

One fix would be to change UNIT_TESTING to bind sessions onto
thread-locals, like we do for the other DeploymentTypes.  but the deeper
question is why would you want to the quartz job running while performing
integration tests?  Or perhaps I've misunderstood your setup?

Thx
Dan



[1]
https://github.com/apache/isis/blob/isis-1.11.0/core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/IsisSystemForTest.java#L393
[2]
https://github.com/apache/isis/blob/isis-1.11.0/core/runtime/src/main/java/org/apache/isis/core/runtime/system/DeploymentType.java#L64






On 3 January 2016 at 22:06, Óscar Bou <oscar...@gmail.com> wrote:

>
> Also relevant, here is the execution log.
>
> Please, notice how there’s a failure closing the JDO persistenceManager
> and a transaction abort afterwards.
>
>
>
> 23:02:09,854  [Native               main       DEBUG]  UPDATE
> "sales_backend"."ProductSupplierTerms" SET "purchasePrice"=<3.61> WHERE
> "ProductSupplierTerms_ID"=<13524>
> 23:02:12,226  [PersistenceSession   sales-Quartz-ThreadPool_Worker-1
> ERROR]  close: failed to end transaction; continuing to avoid memory leakage
> 23:02:12,228  [Native               main       DEBUG]  SELECT
> 'sales.dom.backend.ProductSupplierTerms' AS
> NUCLEUS_TYPE,"A0"."purchasePrice","A0"."stock","A0"."ProductSupplierTerms_ID"
> FROM "sales_backend"."ProductSupplierTerms" "A0" WHERE
> "A0"."product_Product_ID_OID" = <13524> AND "A0"."supplier_Supplier_ID_OID"
> = <0>
> 23:02:12,229  [PersistenceSession   sales-Quartz-ThreadPool_Worker-1
> ERROR]  close: failed to close JDO persistenceManager; continuing to avoid
> memory leakage
> 23:02:12,240  [Native               main       DEBUG]  SELECT
> "B0"."gender","B0"."name","B0"."recommendedPrice","B0"."sku","B0"."Product_ID"
> FROM "sales_backend"."ProductSupplierTerms" "A0" INNER JOIN
> "sales_backend"."Product" "B0" ON "A0"."product_Product_ID_OID" =
> "B0"."Product_ID" WHERE "A0"."ProductSupplierTerms_ID" = <13524>
> 23:02:12,243  [Native               main       DEBUG]  SELECT
> "B0"."name","B0"."Supplier_ID" FROM "sales_backend"."ProductSupplierTerms"
> "A0" INNER JOIN "sales_backend"."Supplier" "B0" ON
> "A0"."supplier_Supplier_ID_OID" = "B0"."Supplier_ID" WHERE
> "A0"."ProductSupplierTerms_ID" = <13524>
> 23:02:12,246  [Native               main       DEBUG]  UPDATE
> "sales_backend"."ProductSupplierTerms" SET "stock"=<49> WHERE
> "ProductSupplierTerms_ID"=<13524>
> 23:02:12,254  [IsisTransaction      main       INFO ]  abort transaction
> IsisTransaction@666c5393[state=MUST_ABORT,commands=0]
> 23:02:12,261  [Native               sales-Quartz-ThreadPool_Worker-1
> DEBUG]  SELECT 'sales.dom.market.feeds.FeedSubmission' AS
> NUCLEUS_TYPE,"A0"."completedProcessingDate","A0"."feedProcessingStatus","A0"."feedSubmissionId","A0"."feedType","A0"."isCompleted","A0"."startedProcessingDate","A0"."submittedDate","A0"."FeedSubmission_ID"
> FROM "sales_backend"."FeedSubmission" "A0" WHERE ("A0"."isCompleted" IS
> NULL) OR ((1=0) = "A0"."isCompleted")
> 23:02:12,268  [IsisSystem           Thread-0   INFO ]  shutting down system
> 23:02:12,298  [ServiceInitializer   Thread-0   INFO ]  calling @PreDestroy
> on all domain services
> 23:02:12,306  [QuartzScheduler      Thread-0   INFO ]  Scheduler sales
> Scheduler_$_sales-Scheduler shutting down.
> 23:02:12,308  [QuartzScheduler      Thread-0   INFO ]  Scheduler sales
> Scheduler_$_sales-Scheduler paused.
> 23:02:12,311  [salesEmailServiceNOOP sales-Quartz-ThreadPool_Worker-1 INFO
> ]  salesEmailServiceNOOP
> 23:02:12,311  [PersistenceSession   sales-Quartz-ThreadPool_Worker-1
> ERROR]  close: failed to end transaction; continuing to avoid memory leakage
> 23:02:12,685  [QuartzScheduler      Thread-0   INFO ]  Scheduler sales
> Scheduler_$_sales-Scheduler shutdown complete.
> java.lang.IllegalStateException: No Session opened for this thread
> 23:02:12,932  [ObjectReflectorDefault Thread-0   INFO ]  shutting down
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault@383b24f9
>         at
> org.apache.isis.core.runtime.system.context.IsisContext.getSession(IsisContext.java:399)
>         at
> org.apache.isis.core.runtime.system.context.IsisContext.getPersistenceSession(IsisContext.java:427)
>         at
> org.apache.isis.core.runtime.system.context.IsisContext.getTransactionManager(IsisContext.java:444)
>         at
> org.apache.isis.core.runtime.system.IsisSystem.getTransactionManager(IsisSystem.java:422)
>         at
> org.apache.isis.core.runtime.system.IsisSystem.shutdownServices(IsisSystem.java:361)
>         at
> org.apache.isis.core.runtime.system.IsisSystem.shutdown(IsisSystem.java:337)
>         at
> org.apache.isis.core.integtestsupport.IsisSystemForTest.shutdown(IsisSystemForTest.java:466)
>         at
> org.apache.isis.core.integtestsupport.IsisSystemForTest.access$100(IsisSystemForTest.java:73)
>         at
> org.apache.isis.core.integtestsupport.IsisSystemForTest$Builder$1.run(IsisSystemForTest.java:300)
>
>
> On the stack trace for this second execution, same error than before, but
> for a different entity:
>
> javax.jdo.JDOUserException: Objeto con id
> "13524[OID]salesvip.dom.backend.ProductSupplierTerms" es manejado por otro
> ExecutionContext
>         at
> org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:636)
>         at
> org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:725)
>         at
> org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:745)
>         at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.commands.DataNucleusCreateObjectCommand.execute(DataNucleusCreateObjectCommand.java:54)
>         at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.executeCommands(PersistenceSession.java:1179)
>         at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.execute(PersistenceSession.java:1173)
>         at
> org.apache.isis.core.runtime.system.transaction.IsisTransaction.doFlush(IsisTransaction.java:500)
>         at
> org.apache.isis.core.runtime.system.transaction.IsisTransaction.flush(IsisTransaction.java:446)
>         at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.flushTransaction(IsisTransactionManager.java:404)
>         at
> org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$2.flush(RuntimeContextFromSession.java:167)
>         at
> org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.flush(DomainObjectContainerDefault.java:331)
>         at
> salesvip.dom.backend.SalesVIPEntity.persistAndFlush(SalesVIPEntity.java:39)
>         at
> salesvip.dom.backend.ProductSupplierTerms.onModifyStock(ProductSupplierTerms.java:117)
>         at
> salesvip.dom.backend.ProductSupplierTerms.modifyStock(ProductSupplierTerms.java:93)
>         at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:483)
>         at
> org.apache.isis.core.commons.lang.MethodExtensions.invoke(MethodExtensions.java:53)
>         at
> org.apache.isis.core.metamodel.adapter.ObjectAdapter$InvokeUtils.invoke(ObjectAdapter.java:377)
>         at
> org.apache.isis.core.metamodel.adapter.ObjectAdapter$InvokeUtils.invoke(ObjectAdapter.java:381)
>         at
> org.apache.isis.core.metamodel.facets.properties.update.modify.PropertySetterFacetViaModifyMethod.setProperty(PropertySetterFacetViaModifyMethod.java:86)
>         at
> org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventAbstract.setProperty(PropertySetterFacetForDomainEventAbstract.java:89)
>         at
> org.apache.isis.core.runtime.transaction.facets.PropertySetterFacetWrapTransaction$1.execute(PropertySetterFacetWrapTransaction.java:59)
>         at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:174)
>         at
> org.apache.isis.core.runtime.transaction.facets.PropertySetterFacetWrapTransaction.setProperty(PropertySetterFacetWrapTransaction.java:56)
>         at
> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationDefault.setValue(OneToOneAssociationDefault.java:212)
>         at
> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationDefault.set(OneToOneAssociationDefault.java:182)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleSetterMethodOnProperty(DomainObjectInvocationHandler.java:425)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:232)
>         at
> org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72)
>         at
> salesvip.dom.backend.ProductSupplierTerms_$$_jvst8a_d.setStock(ProductSupplierTerms_$$_jvst8a_d.java)
>         at
> salesvip.dom.backend.Product.updateSupplierStock(Product.java:275)
>         at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:483)
>         at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.internalInvoke(ActionInvocationFacetForDomainEventAbstract.java:407)
>         at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.invoke(ActionInvocationFacetForDomainEventAbstract.java:210)
>         at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:62)
>         at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:59)
>         at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)
>         at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:59)
>         at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault.execute(ObjectActionDefault.java:363)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:625)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:260)
>         at
> org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72)
>         at
> salesvip.dom.backend.Product_$$_jvst8a_8.updateSupplierStock(Product_$$_jvst8a_8.java)
>         at
> salesvip.dom.engel.EngelProductService.upsertProductFromEngel(EngelProductService.java:61)
>         at
> salesvip.fixture.engel.UpsertAllProductsFromEngel.lambda$0(UpsertAllProductsFromEngel.java:28)
>         at
> salesvip.fixture.engel.UpsertAllProductsFromEngel$$Lambda$1/1434151479.accept(Unknown
> Source)
>         at java.util.ArrayList.forEach(ArrayList.java:1234)
>         at
> salesvip.fixture.engel.UpsertAllProductsFromEngel.upsertAllProductsFromEngel(UpsertAllProductsFromEngel.java:26)
>         at
> salesvip.fixture.engel.UpsertAllProductsFromEngel.execute(UpsertAllProductsFromEngel.java:21)
>         at
> org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildIfNotAlready(FixtureScript.java:553)
>         at
> org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.access$200(FixtureScript.java:252)
>         at
> org.apache.isis.applib.fixturescripts.FixtureScript.run(FixtureScript.java:779)
>         at
> org.apache.isis.applib.fixturescripts.FixtureScripts.runFixtureScript(FixtureScripts.java:391)
>         at
> org.apache.isis.applib.services.fixturespec.FixtureScriptsDefault.runFixtureScript(FixtureScriptsDefault.java:104)
>         at
> salesvip.integtests.amazon.stocks.AmazonUpdateStocksServiceTests$UpdateAllStocksInMarketplace.equivalentResults(AmazonUpdateStocksServiceTests.java:136)
>         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:483)
>         at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>         at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>         at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>         at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>         at
> org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate(JUnitRuleMockery2.java:146)
>         at
> org.apache.isis.core.integtestsupport.ExceptionRecognizerTranslate$TranslationStatement.evaluate(ExceptionRecognizerTranslate.java:48)
>         at
> org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate(IntegrationTestAbstract.java:226)
>         at
> org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
>         at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>         at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>         at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>         at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>         at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>         at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>         at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>         at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>         at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>         at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>         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:459)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> NestedThrowablesStackTrace:
> Objeto con id "13524[OID]salesvip.dom.backend.ProductSupplierTerms" es
> manejado por otro ExecutionContext
> org.datanucleus.exceptions.NucleusUserException: Objeto con id
> "13524[OID]salesvip.dom.backend.ProductSupplierTerms" es manejado por otro
> ExecutionContext
>         at
> org.datanucleus.ExecutionContextImpl.findObjectProvider(ExecutionContextImpl.java:1268)
>         at
> org.datanucleus.store.rdbms.mapping.java.PersistableMapping.setObjectAsValue(PersistableMapping.java:409)
>         at
> org.datanucleus.store.rdbms.mapping.java.PersistableMapping.setObject(PersistableMapping.java:321)
>         at
> org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeObjectField(ParameterSetter.java:191)
>         at
> org.datanucleus.state.AbstractStateManager.providedObjectField(AbstractStateManager.java:1460)
>         at
> org.datanucleus.state.StateManagerImpl.providedObjectField(StateManagerImpl.java:120)
>         at
> salesvip.dom.backend.ProductSupplierTermsStockUpdate.dnProvideField(ProductSupplierTermsStockUpdate.java)
>         at
> salesvip.dom.backend.ProductSupplierTermsStockUpdate.dnProvideFields(ProductSupplierTermsStockUpdate.java)
>         at
> org.datanucleus.state.StateManagerImpl.provideFields(StateManagerImpl.java:1170)
>         at
> org.datanucleus.store.rdbms.request.InsertRequest.execute(InsertRequest.java:292)
>         at
> org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObjectInTable(RDBMSPersistenceHandler.java:162)
>         at
> org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObject(RDBMSPersistenceHandler.java:138)
>         at
> org.datanucleus.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3363)
>         at
> org.datanucleus.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3339)
>         at
> org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2066)
>         at
> org.datanucleus.ExecutionContextImpl.persistObjectWork(ExecutionContextImpl.java:1909)
>         at
> org.datanucleus.ExecutionContextImpl.persistObject(ExecutionContextImpl.java:1764)
>         at
> org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:720)
>         at
> org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:745)
>         at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.commands.DataNucleusCreateObjectCommand.execute(DataNucleusCreateObjectCommand.java:54)
>         at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.executeCommands(PersistenceSession.java:1179)
>         at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.execute(PersistenceSession.java:1173)
>         at
> org.apache.isis.core.runtime.system.transaction.IsisTransaction.doFlush(IsisTransaction.java:500)
>         at
> org.apache.isis.core.runtime.system.transaction.IsisTransaction.flush(IsisTransaction.java:446)
>         at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.flushTransaction(IsisTransactionManager.java:404)
>         at
> org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$2.flush(RuntimeContextFromSession.java:167)
>         at
> org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.flush(DomainObjectContainerDefault.java:331)
>         at
> salesvip.dom.backend.SalesVIPEntity.persistAndFlush(SalesVIPEntity.java:39)
>         at
> salesvip.dom.backend.ProductSupplierTerms.onModifyStock(ProductSupplierTerms.java:117)
>         at
> salesvip.dom.backend.ProductSupplierTerms.modifyStock(ProductSupplierTerms.java:93)
>         at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:483)
>         at
> org.apache.isis.core.commons.lang.MethodExtensions.invoke(MethodExtensions.java:53)
>         at
> org.apache.isis.core.metamodel.adapter.ObjectAdapter$InvokeUtils.invoke(ObjectAdapter.java:377)
>         at
> org.apache.isis.core.metamodel.adapter.ObjectAdapter$InvokeUtils.invoke(ObjectAdapter.java:381)
>         at
> org.apache.isis.core.metamodel.facets.properties.update.modify.PropertySetterFacetViaModifyMethod.setProperty(PropertySetterFacetViaModifyMethod.java:86)
>         at
> org.apache.isis.core.metamodel.facets.properties.property.modify.PropertySetterFacetForDomainEventAbstract.setProperty(PropertySetterFacetForDomainEventAbstract.java:89)
>         at
> org.apache.isis.core.runtime.transaction.facets.PropertySetterFacetWrapTransaction$1.execute(PropertySetterFacetWrapTransaction.java:59)
>         at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:174)
>         at
> org.apache.isis.core.runtime.transaction.facets.PropertySetterFacetWrapTransaction.setProperty(PropertySetterFacetWrapTransaction.java:56)
>         at
> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationDefault.setValue(OneToOneAssociationDefault.java:212)
>         at
> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationDefault.set(OneToOneAssociationDefault.java:182)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleSetterMethodOnProperty(DomainObjectInvocationHandler.java:425)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:232)
>         at
> org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72)
>         at
> salesvip.dom.backend.ProductSupplierTerms_$$_jvst8a_d.setStock(ProductSupplierTerms_$$_jvst8a_d.java)
>         at
> salesvip.dom.backend.Product.updateSupplierStock(Product.java:275)
>         at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:483)
>         at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.internalInvoke(ActionInvocationFacetForDomainEventAbstract.java:407)
>         at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.invoke(ActionInvocationFacetForDomainEventAbstract.java:210)
>         at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:62)
>         at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:59)
>         at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)
>         at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:59)
>         at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault.execute(ObjectActionDefault.java:363)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:625)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:260)
>         at
> org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72)
>         at
> salesvip.dom.backend.Product_$$_jvst8a_8.updateSupplierStock(Product_$$_jvst8a_8.java)
>         at
> salesvip.dom.engel.EngelProductService.upsertProductFromEngel(EngelProductService.java:61)
>         at
> salesvip.fixture.engel.UpsertAllProductsFromEngel.lambda$0(UpsertAllProductsFromEngel.java:28)
>         at
> salesvip.fixture.engel.UpsertAllProductsFromEngel$$Lambda$1/1434151479.accept(Unknown
> Source)
>         at java.util.ArrayList.forEach(ArrayList.java:1234)
>         at
> salesvip.fixture.engel.UpsertAllProductsFromEngel.upsertAllProductsFromEngel(UpsertAllProductsFromEngel.java:26)
>         at
> salesvip.fixture.engel.UpsertAllProductsFromEngel.execute(UpsertAllProductsFromEngel.java:21)
>         at
> org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildIfNotAlready(FixtureScript.java:553)
>         at
> org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.access$200(FixtureScript.java:252)
>         at
> org.apache.isis.applib.fixturescripts.FixtureScript.run(FixtureScript.java:779)
>         at
> org.apache.isis.applib.fixturescripts.FixtureScripts.runFixtureScript(FixtureScripts.java:391)
>         at
> org.apache.isis.applib.services.fixturespec.FixtureScriptsDefault.runFixtureScript(FixtureScriptsDefault.java:104)
>         at
> salesvip.integtests.amazon.stocks.AmazonUpdateStocksServiceTests$UpdateAllStocksInMarketplace.equivalentResults(AmazonUpdateStocksServiceTests.java:136)
>         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:483)
>         at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>         at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>         at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>         at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>         at
> org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate(JUnitRuleMockery2.java:146)
>         at
> org.apache.isis.core.integtestsupport.ExceptionRecognizerTranslate$TranslationStatement.evaluate(ExceptionRecognizerTranslate.java:48)
>         at
> org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate(IntegrationTestAbstract.java:226)
>         at
> org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
>         at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>         at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>         at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>         at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>         at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>         at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>         at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>         at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>         at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>         at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>         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:459)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
>
>
>
>
>
>
> Thanks,
>
> Oscar
>
>
>
>
> > El 3 ene 2016, a las 22:46, Óscar Bou <oscar...@gmail.com> escribió:
> >
> > Hi all.
> >
> > I’m implementing custom Quartz Jobs using as the base class literally
> the same “AbstractIsisQuartzJob” class described in [1].
> >
> >
> >
> > Copied directly from my Eclipse (not from [1]):
> >
> > public abstract class AbstractIsisQuartzJob implements Job {
> >
> >    public static enum ConcurrentInstancesPolicy {
> >        SINGLE_INSTANCE_ONLY,
> >        MULTIPLE_INSTANCES
> >    }
> >
> >    private final AbstractIsisSessionTemplate isisRunnable;
> >
> >    private final ConcurrentInstancesPolicy concurrentInstancesPolicy;
> >    private boolean executing;
> >
> >    public AbstractIsisQuartzJob(final AbstractIsisSessionTemplate
> isisRunnable) {
> >        this(isisRunnable,
> ConcurrentInstancesPolicy.SINGLE_INSTANCE_ONLY);
> >    }
> >
> >    public AbstractIsisQuartzJob(
> >            final AbstractIsisSessionTemplate isisRunnable,
> >            final ConcurrentInstancesPolicy concurrentInstancesPolicy) {
> >        this.isisRunnable = isisRunnable;
> >        this.concurrentInstancesPolicy = concurrentInstancesPolicy;
> >    }
> >
> >    /**
> >     * Sets up an {@link IsisSession} then delegates to the
> >     * {@link #doExecute(JobExecutionContext) hook}.
> >     */
> >    @Override
> >    public void execute(
> >            final JobExecutionContext context) throws
> JobExecutionException {
> >        final AuthenticationSession authSession =
> this.newAuthSession(context);
> >        try {
> >            if ((this.concurrentInstancesPolicy ==
> >                    ConcurrentInstancesPolicy.SINGLE_INSTANCE_ONLY) &&
> >                    this.executing) {
> >                return;
> >            }
> >            this.executing = true;
> >
> >            this.isisRunnable.execute(authSession, context);
> >        } finally {
> >            this.executing = false;
> >        }
> >    }
> >
> >    AuthenticationSession newAuthSession(
> >            final JobExecutionContext context) {
> >        final String user = this.getKey(context,
> SchedulerConstants.USER_KEY);
> >        final String rolesStr = this.getKey(context,
> SchedulerConstants.ROLES_KEY);
> >        final String[] roles = Iterables.toArray(
> >                Splitter.on(",").split(rolesStr), String.class);
> >        return new SimpleSession(user, roles);
> >    }
> >
> >    @SuppressWarnings("static-method")
> >    String getKey(
> >            final JobExecutionContext context,
> >            final String key) {
> >        return context.getMergedJobDataMap().getString(key);
> >    }
> > }
> >
> >
> >
> > This Quartz Job is invoked in the middle of a massive import executed
> from a Fixture Script.
> >
> >
> > Problem is that I cannot determine the root cause, as seems to be some
> conflict between both Isis sessions …
> >
> >
> > EXCEPTION THROWN
> >
> > Rerun
> sales.integtests.Market.stocks.MarketUpdateStocksServiceTests.UpdateAllStocksInMarketplace.equivalentResults
> >
> equivalentResults(sales.integtests.Market.stocks.MarketUpdateStocksServiceTests$UpdateAllStocksInMarketplace)
> > javax.jdo.JDOUserException: Objeto con id
> "14153[OID]sales.dom.backend.Product" es manejado por otro ExecutionContext
> >       at
> org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:636)
> >       at
> org.datanucleus.api.jdo.JDOQuery.executeWithMap(JDOQuery.java:363)
> >       at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor.getResults(PersistenceQueryFindUsingApplibQueryProcessor.java:117)
> >       at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor.process(PersistenceQueryFindUsingApplibQueryProcessor.java:57)
> >       at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor.process(PersistenceQueryFindUsingApplibQueryProcessor.java:40)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.processPersistenceQuery(PersistenceSession.java:500)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.access$000(PersistenceSession.java:153)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession$1.execute(PersistenceSession.java:461)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession$1.execute(PersistenceSession.java:458)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.findInstancesInTransaction(PersistenceSession.java:457)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.firstMatchingQuery(PersistenceSession.java:429)
> >       at
> org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$2.firstMatchingQuery(RuntimeContextFromSession.java:182)
> >       at
> org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.firstMatch(DomainObjectContainerDefault.java:670)
> >       at sales.dom.backend.Product.findTermsForSupplier(Product.java:302)
> >       at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
> >       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >       at java.lang.reflect.Method.invoke(Method.java:483)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.internalInvoke(ActionInvocationFacetForDomainEventAbstract.java:407)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.invoke(ActionInvocationFacetForDomainEventAbstract.java:210)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:62)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault.execute(ObjectActionDefault.java:363)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:625)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:260)
> >       at
> org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72)
> >       at
> sales.dom.backend.Product_$$_jvst8a_8.findTermsForSupplier(Product_$$_jvst8a_8.java)
> >       at
> sales.dom.backend.Product.findOrCreateSupplierTerms(Product.java:313)
> >       at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
> >       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >       at java.lang.reflect.Method.invoke(Method.java:483)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.internalInvoke(ActionInvocationFacetForDomainEventAbstract.java:407)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.invoke(ActionInvocationFacetForDomainEventAbstract.java:210)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:62)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault.execute(ObjectActionDefault.java:363)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:625)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:260)
> >       at
> org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72)
> >       at
> sales.dom.backend.Product_$$_jvst8a_8.findOrCreateSupplierTerms(Product_$$_jvst8a_8.java)
> >       at sales.dom.backend.Product.updateSupplierStock(Product.java:274)
> >       at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
> >       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >       at java.lang.reflect.Method.invoke(Method.java:483)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.internalInvoke(ActionInvocationFacetForDomainEventAbstract.java:407)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.invoke(ActionInvocationFacetForDomainEventAbstract.java:210)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:62)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault.execute(ObjectActionDefault.java:363)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:625)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:260)
> >       at
> org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72)
> >       at
> sales.dom.backend.Product_$$_jvst8a_8.updateSupplierStock(Product_$$_jvst8a_8.java)
> >       at
> sales.dom.Supplier.SupplierProductService.upsertProductFromSupplier(SupplierProductService.java:61)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier.lambda$0(UpsertAllProductsFromSupplier.java:28)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier$$Lambda$1/1434151479.accept(Unknown
> Source)
> >       at java.util.ArrayList.forEach(ArrayList.java:1234)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier.upsertAllProductsFromSupplier(UpsertAllProductsFromSupplier.java:26)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier.execute(UpsertAllProductsFromSupplier.java:21)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildIfNotAlready(FixtureScript.java:553)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.access$200(FixtureScript.java:252)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScript.run(FixtureScript.java:779)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScripts.runFixtureScript(FixtureScripts.java:391)
> >       at
> org.apache.isis.applib.services.fixturespec.FixtureScriptsDefault.runFixtureScript(FixtureScriptsDefault.java:104)
> >       at
> sales.integtests.Market.stocks.MarketUpdateStocksServiceTests$UpdateAllStocksInMarketplace.equivalentResults(MarketUpdateStocksServiceTests.java:136)
> >       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:483)
> >       at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> >       at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> >       at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> >       at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> >       at
> org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate(JUnitRuleMockery2.java:146)
> >       at
> org.apache.isis.core.integtestsupport.ExceptionRecognizerTranslate$TranslationStatement.evaluate(ExceptionRecognizerTranslate.java:48)
> >       at
> org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate(IntegrationTestAbstract.java:226)
> >       at
> org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
> >       at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> >       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> >       at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> >       at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> >       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> >       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> >       at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> >       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> >       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> >       at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> >       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> >       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:459)
> >       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
> >       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> >       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> > NestedThrowablesStackTrace:
> > Objeto con id "14153[OID]sales.dom.backend.Product" es manejado por otro
> ExecutionContext
> > org.datanucleus.exceptions.NucleusUserException: Objeto con id
> "14153[OID]sales.dom.backend.Product" es manejado por otro ExecutionContext
> >       at
> org.datanucleus.ExecutionContextImpl.findObjectProvider(ExecutionContextImpl.java:1268)
> >       at
> org.datanucleus.store.rdbms.mapping.java.PersistableMapping.setObjectAsValue(PersistableMapping.java:409)
> >       at
> org.datanucleus.store.rdbms.mapping.java.PersistableMapping.setObject(PersistableMapping.java:321)
> >       at
> org.datanucleus.store.rdbms.mapping.java.PersistableMapping.setObject(PersistableMapping.java:300)
> >       at
> org.datanucleus.store.rdbms.sql.SQLStatementHelper.applyParametersToStatement(SQLStatementHelper.java:239)
> >       at
> org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:607)
> >       at org.datanucleus.store.query.Query.executeQuery(Query.java:1841)
> >       at
> org.datanucleus.store.query.Query.executeWithMap(Query.java:1748)
> >       at
> org.datanucleus.api.jdo.JDOQuery.executeWithMap(JDOQuery.java:346)
> >       at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor.getResults(PersistenceQueryFindUsingApplibQueryProcessor.java:117)
> >       at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor.process(PersistenceQueryFindUsingApplibQueryProcessor.java:57)
> >       at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor.process(PersistenceQueryFindUsingApplibQueryProcessor.java:40)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.processPersistenceQuery(PersistenceSession.java:500)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.access$000(PersistenceSession.java:153)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession$1.execute(PersistenceSession.java:461)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession$1.execute(PersistenceSession.java:458)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.findInstancesInTransaction(PersistenceSession.java:457)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.firstMatchingQuery(PersistenceSession.java:429)
> >       at
> org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$2.firstMatchingQuery(RuntimeContextFromSession.java:182)
> >       at
> org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.firstMatch(DomainObjectContainerDefault.java:670)
> >       at sales.dom.backend.Product.findTermsForSupplier(Product.java:302)
> >       at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
> >       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >       at java.lang.reflect.Method.invoke(Method.java:483)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.internalInvoke(ActionInvocationFacetForDomainEventAbstract.java:407)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.invoke(ActionInvocationFacetForDomainEventAbstract.java:210)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:62)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault.execute(ObjectActionDefault.java:363)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:625)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:260)
> >       at
> org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72)
> >       at
> sales.dom.backend.Product_$$_jvst8a_8.findTermsForSupplier(Product_$$_jvst8a_8.java)
> >       at
> sales.dom.backend.Product.findOrCreateSupplierTerms(Product.java:313)
> >       at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
> >       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >       at java.lang.reflect.Method.invoke(Method.java:483)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.internalInvoke(ActionInvocationFacetForDomainEventAbstract.java:407)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.invoke(ActionInvocationFacetForDomainEventAbstract.java:210)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:62)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault.execute(ObjectActionDefault.java:363)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:625)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:260)
> >       at
> org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72)
> >       at
> sales.dom.backend.Product_$$_jvst8a_8.findOrCreateSupplierTerms(Product_$$_jvst8a_8.java)
> >       at sales.dom.backend.Product.updateSupplierStock(Product.java:274)
> >       at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
> >       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >       at java.lang.reflect.Method.invoke(Method.java:483)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.internalInvoke(ActionInvocationFacetForDomainEventAbstract.java:407)
> >       at
> org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract.invoke(ActionInvocationFacetForDomainEventAbstract.java:210)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:62)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault.execute(ObjectActionDefault.java:363)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:625)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:260)
> >       at
> org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72)
> >       at
> sales.dom.backend.Product_$$_jvst8a_8.updateSupplierStock(Product_$$_jvst8a_8.java)
> >       at
> sales.dom.Supplier.SupplierProductService.upsertProductFromSupplier(SupplierProductService.java:61)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier.lambda$0(UpsertAllProductsFromSupplier.java:28)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier$$Lambda$1/1434151479.accept(Unknown
> Source)
> >       at java.util.ArrayList.forEach(ArrayList.java:1234)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier.upsertAllProductsFromSupplier(UpsertAllProductsFromSupplier.java:26)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier.execute(UpsertAllProductsFromSupplier.java:21)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildIfNotAlready(FixtureScript.java:553)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.access$200(FixtureScript.java:252)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScript.run(FixtureScript.java:779)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScripts.runFixtureScript(FixtureScripts.java:391)
> >       at
> org.apache.isis.applib.services.fixturespec.FixtureScriptsDefault.runFixtureScript(FixtureScriptsDefault.java:104)
> >       at
> sales.integtests.Market.stocks.MarketUpdateStocksServiceTests$UpdateAllStocksInMarketplace.equivalentResults(MarketUpdateStocksServiceTests.java:136)
> >       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:483)
> >       at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> >       at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> >       at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> >       at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> >       at
> org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate(JUnitRuleMockery2.java:146)
> >       at
> org.apache.isis.core.integtestsupport.ExceptionRecognizerTranslate$TranslationStatement.evaluate(ExceptionRecognizerTranslate.java:48)
> >       at
> org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate(IntegrationTestAbstract.java:226)
> >       at
> org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
> >       at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> >       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> >       at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> >       at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> >       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> >       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> >       at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> >       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> >       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> >       at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> >       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> >       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:459)
> >       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
> >       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> >       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> >
> >
> >
> > TRACE LOG
> >
> >
> > 22:35:32,937  [Native               main       DEBUG]  SELECT
> 'sales.dom.backend.ProductSupplierTerms' AS
> NUCLEUS_TYPE,"A0"."purchasePrice","A0"."stock","A0"."ProductSupplierTerms_ID"
> FROM "sales_backend"."ProductSupplierTerms" "A0" WHERE
> "A0"."product_Product_ID_OID" = <14153> AND "A0"."supplier_Supplier_ID_OID"
> = <0>
> > 22:35:34,179  [Native               sales-Quartz-ThreadPool_Worker-1
> DEBUG]  INSERT INTO "sales_backend"."ProductSupplierTerms"
> ("product_Product_ID_OID","purchasePrice","stock","supplier_Supplier_ID_OID")
> VALUES (<14153>,<null>,<0>,<0>)
> > 22:35:34,575  [PersistenceSession   sales-Quartz-ThreadPool_Worker-1
> ERROR]  close: failed to end transaction; continuing to avoid memory leakage
> > 22:35:34,580  [Native               main       DEBUG]  SELECT
> "A0"."purchasePrice","A0"."stock" FROM
> "sales_backend"."ProductSupplierTerms" "A0" WHERE
> "A0"."ProductSupplierTerms_ID" = <14153>
> > 22:35:34,583  [Native               main       DEBUG]  SELECT
> "A0"."purchasePrice","A0"."stock" FROM
> "sales_backend"."ProductSupplierTerms" "A0" WHERE
> "A0"."ProductSupplierTerms_ID" = <14153>
> > 22:35:34,585  [Native               main       DEBUG]  SELECT
> "B0"."gender","B0"."name","B0"."recommendedPrice","B0"."sku","B0"."Product_ID"
> FROM "sales_backend"."ProductSupplierTerms" "A0" INNER JOIN
> "sales_backend"."Product" "B0" ON "A0"."product_Product_ID_OID" =
> "B0"."Product_ID" WHERE "A0"."ProductSupplierTerms_ID" = <14153>
> > 22:35:34,586  [Native               main       DEBUG]  SELECT
> "B0"."name","B0"."Supplier_ID" FROM "sales_backend"."ProductSupplierTerms"
> "A0" INNER JOIN "sales_backend"."Supplier" "B0" ON
> "A0"."supplier_Supplier_ID_OID" = "B0"."Supplier_ID" WHERE
> "A0"."ProductSupplierTerms_ID" = <14153>
> > 22:35:34,589  [Native               main       DEBUG]  INSERT INTO
> "sales_backend"."ProductSupplierTermsPurchasePriceUpdate"
> ("dateTime","newPurchasePrice","oldPurchasePrice","productSupplierTerms_ProductSupplierTerms_ID_OID")
> VALUES (<2016-01-03 22:35:34.588>,<24.37>,<null>,<14153>)
> > 22:35:34,589  [Native               main       DEBUG]  UPDATE
> "sales_backend"."ProductSupplierTerms" SET "purchasePrice"=<24.37> WHERE
> "ProductSupplierTerms_ID"=<14153>
> > 22:35:34,590  [PersistenceSession   sales-Quartz-ThreadPool_Worker-1
> ERROR]  close: failed to close JDO persistenceManager; continuing to avoid
> memory leakage
> > 22:35:34,592  [Native               main       DEBUG]  SELECT
> 'sales.dom.backend.Supplier' AS NUCLEUS_TYPE,"A0"."name","A0"."Supplier_ID"
> FROM "sales_backend"."Supplier" "A0" WHERE "A0"."name" = <'Supplier'>
> > 22:35:34,596  [ServiceInstantiator  main       WARN ]  ... @PreDestroy
> method threw exception - continuing anyway
> > java.lang.NullPointerException
> >       at
> org.apache.isis.objectstore.jdo.datanucleus.service.support.TimestampService.close(TimestampService.java:48)
> >       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:483)
> >       at
> org.apache.isis.core.commons.lang.MethodExtensions.invoke(MethodExtensions.java:53)
> >       at
> org.apache.isis.core.commons.lang.MethodExtensions.invoke(MethodExtensions.java:47)
> >       at
> org.apache.isis.core.runtime.services.ServiceInstantiator.callPreDestroyIfPresent(ServiceInstantiator.java:277)
> >       at
> org.apache.isis.core.runtime.services.ServiceInstantiator$2.invoke(ServiceInstantiator.java:195)
> >       at
> org.apache.isis.objectstore.jdo.datanucleus.service.support.TimestampService_$$_jvst8a_5.__isis_preDestroy(TimestampService_$$_jvst8a_5.java)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.endRequestOnRequestScopeServices(IsisTransactionManager.java:331)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.endTransaction(IsisTransactionManager.java:514)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:218)
> >       at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:59)
> >       at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault.execute(ObjectActionDefault.java:363)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:625)
> >       at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:260)
> >       at
> org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72)
> >       at
> sales.dom.backend.SupplierRepository_$$_jvst8a_b.theSupplierSupplier(SupplierRepository_$$_jvst8a_b.java)
> >       at
> sales.dom.Supplier.SupplierProductService.upsertProductFromSupplier(SupplierProductService.java:61)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier.lambda$0(UpsertAllProductsFromSupplier.java:28)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier$$Lambda$1/1434151479.accept(Unknown
> Source)
> >       at java.util.ArrayList.forEach(ArrayList.java:1234)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier.upsertAllProductsFromSupplier(UpsertAllProductsFromSupplier.java:26)
> >       at
> sales.fixture.Supplier.UpsertAllProductsFromSupplier.execute(UpsertAllProductsFromSupplier.java:21)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.executeChildIfNotAlready(FixtureScript.java:553)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext.access$200(FixtureScript.java:252)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScript.run(FixtureScript.java:779)
> >       at
> org.apache.isis.applib.fixturescripts.FixtureScripts.runFixtureScript(FixtureScripts.java:391)
> >       at
> org.apache.isis.applib.services.fixturespec.FixtureScriptsDefault.runFixtureScript(FixtureScriptsDefault.java:104)
> >       at
> sales.integtests.Market.stocks.MarketUpdateStocksServiceTests$UpdateAllStocksInMarketplace.equivalentResults(MarketUpdateStocksServiceTests.java:136)
> >       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:483)
> >       at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> >       at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> >       at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> >       at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> >       at
> org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate(JUnitRuleMockery2.java:146)
> >       at
> org.apache.isis.core.integtestsupport.ExceptionRecognizerTranslate$TranslationStatement.evaluate(ExceptionRecognizerTranslate.java:48)
> >       at
> org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate(IntegrationTestAbstract.java:226)
> >       at
> org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
> >       at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> >       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> >       at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> >       at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> >       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> >       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> >       at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> >       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> >       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> >       at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> >       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> >       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:459)
> >       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
> >       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> >       at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> > 22:35:34,607  [IsisTransaction      main       INFO ]  abort transaction
> IsisTransaction@5212ac3a[state=MUST_ABORT,commands=0]
> > 22:35:34,620  [IsisSystem           Thread-0   INFO ]  shutting down
> system
> > 22:35:34,623  [ServiceInitializer   Thread-0   INFO ]  calling
> @PreDestroy on all domain services
> > 22:35:34,633  [QuartzScheduler      Thread-0   INFO ]  Scheduler sales
> Scheduler_$_sales-Scheduler shutting down.
> > 22:35:34,635  [QuartzScheduler      Thread-0   INFO ]  Scheduler sales
> Scheduler_$_sales-Scheduler paused.
> > 22:35:34,633  [JobRunShell          sales-Quartz-ThreadPool_Worker-1
> ERROR]  Job Market - Feeds.Update Completed Feeds threw an unhandled
> Exception:
> > javax.jdo.JDOFatalUserException: Persistence Manager ya esta cerrado
> >       at
> org.datanucleus.api.jdo.JDOPersistenceManager.assertIsOpen(JDOPersistenceManager.java:2224)
> >       at
> org.datanucleus.api.jdo.JDOPersistenceManager.currentTransaction(JDOPersistenceManager.java:377)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.startTransaction(PersistenceSession.java:1212)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.startTransaction(IsisTransactionManager.java:287)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:171)
> >       at
> org.apache.isis.core.runtime.sessiontemplate.AbstractIsisSessionTemplate.doExecute(AbstractIsisSessionTemplate.java:62)
> >       at
> org.apache.isis.core.runtime.sessiontemplate.AbstractIsisSessionTemplate.execute(AbstractIsisSessionTemplate.java:39)
> >       at
> sales.dom.scheduler.AbstractIsisQuartzJob.execute(AbstractIsisQuartzJob.java:54)
> >       at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
> >       at
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
> > 22:35:34,636  [ErrorLogger          sales-Quartz-ThreadPool_Worker-1
> ERROR]  Job (Market - Feeds.Update Completed Feeds threw an exception.
> > org.quartz.SchedulerException: Job threw an unhandled exception. [See
> nested exception: javax.jdo.JDOFatalUserException: Persistence Manager ya
> esta cerrado]
> >       at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >       at
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
> > Caused by: javax.jdo.JDOFatalUserException: Persistence Manager ya esta
> cerrado
> >       at
> org.datanucleus.api.jdo.JDOPersistenceManager.assertIsOpen(JDOPersistenceManager.java:2224)
> >       at
> org.datanucleus.api.jdo.JDOPersistenceManager.currentTransaction(JDOPersistenceManager.java:377)
> >       at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.startTransaction(PersistenceSession.java:1212)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.startTransaction(IsisTransactionManager.java:287)
> >       at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:171)
> >       at
> org.apache.isis.core.runtime.sessiontemplate.AbstractIsisSessionTemplate.doExecute(AbstractIsisSessionTemplate.java:62)
> >       at
> org.apache.isis.core.runtime.sessiontemplate.AbstractIsisSessionTemplate.execute(AbstractIsisSessionTemplate.java:39)
> >       at
> sales.dom.scheduler.AbstractIsisQuartzJob.execute(AbstractIsisQuartzJob.java:54)
> >       at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
> >       ... 1 more
> > java.lang.IllegalStateException: No Session opened for this thread
> >       at
> org.apache.isis.core.runtime.system.context.IsisContext.getSession(IsisContext.java:399)
> >       at
> org.apache.isis.core.runtime.system.context.IsisContext.getPersistenceSession(IsisContext.java:427)
> >       at
> org.apache.isis.core.runtime.system.context.IsisContext.getTransactionManager(IsisContext.java:444)
> >       at
> org.apache.isis.core.runtime.system.IsisSystem.getTransactionManager(IsisSystem.java:422)
> >       at
> org.apache.isis.core.runtime.system.IsisSystem.shutdownServices(IsisSystem.java:361)
> >       at
> org.apache.isis.core.runtime.system.IsisSystem.shutdown(IsisSystem.java:337)
> >       at
> org.apache.isis.core.integtestsupport.IsisSystemForTest.shutdown(IsisSystemForTest.java:466)
> >       at
> org.apache.isis.core.integtestsupport.IsisSystemForTest.access$100(IsisSystemForTest.java:73)
> >       at
> org.apache.isis.core.integtestsupport.IsisSystemForTest$Builder$1.run(IsisSystemForTest.java:300)
> > 22:35:35,043  [QuartzScheduler      Thread-0   INFO ]  Scheduler sales
> Scheduler_$_sales-Scheduler shutdown complete.
> > 22:35:35,243  [ObjectReflectorDefault Thread-0   INFO ]  shutting down
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault@1cdd6514
> >
> >
> >
> > Any ideas, please?
> >
> > Seems there is some problem regarding Isis session and/or transaction
> handling, but not sure how to determine it.
> >
> >
> >
> > Thanks in advance,
> >
> > Oscar
> >
> >
> >
> >
> >
> > [1]
> https://github.com/isisaddons/isis-module-command/blob/ef2aac512572b98a6edd24cef536a6bf11cf2807/README.md
> <
> https://github.com/isisaddons/isis-module-command/blob/ef2aac512572b98a6edd24cef536a6bf11cf2807/README.md
> >
>
>

Reply via email to