The principal reason for these JDO lifecycle callbacks is so that Isis can
keep its internal caches (IdentityMap) of domain objects in sync with Isis.
  But now that Isis uses JDO as its ORM, I'm pretty certain that they
provide no actual benefit.

So in a future version (probably not 1.8.0, but most likely 1.9.0) I'm
considering getting rid of these internal maps.  If 1.7.0 doesn't fix
things for you, we can consider bringing forward that work to tidy up this
part of Isis.

That's not to say that the callbacks will go completely... in your
particular case we will still need a callback in order to support auditing
("enlistDeleting").  But simplifying the codebase will help make it easier
to rationalize as to what the correct behaviour should be.

Cheers
Dan


On 21 October 2014 23:33, GESCONSULTOR - Óscar Bou <[email protected]>
wrote:

> Hi Dan.
>
> We're using a 1.6.0 snapshot.
>
> I've just discovered that it's thrown when there are dependencies with
> other domain entities that are not automatically deleted (i.e., not have
> "dependentElement="true") on its collection.
>
> It's possible it has been solved if that was it.
>
> We'll just upgrade if that's it.
>
> Many thanks!
>
>
>
>
> El 22/10/2014, a las 00:23, Dan Haywood <[email protected]>
> escribió:
>
>
> Which version, Oscar?  I think there was a bug fix around this area in
> 1.7.0.  At any rate, that line number (1172) in IsisTransaction doesn't
> correspond to executable code in 1.7.0.
>
> Dan
>
> On 21 October 2014 23:20, GESCONSULTOR - Óscar Bou <[email protected]
> >
> wrote:
>
>
>
> Hi to all.
>
> I've just found an exception that it's appearing rather frequently,
> without knowing the exact root cause.
>
> It's the following one.
>
> Any ideas about the possible root cause or any work-around?
>
> Thanks in advance,
>
> Oscar
>
>
>
> Caused by: java.lang.NullPointerException
>        at
>
> org.apache.isis.core.runtime.system.transaction.IsisTransaction.enlistDeleting(IsisTransaction.java:1172)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$5.run(FrameworkSynchronizer.java:244)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$7.call(FrameworkSynchronizer.java:291)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$7.call(FrameworkSynchronizer.java:287)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:276)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:287)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.preDeleteProcessingFor(FrameworkSynchronizer.java:238)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener$4.doRun(IsisLifecycleListener.java:128)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener$RunnableAbstract.run(IsisLifecycleListener.java:201)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener.withLogging(IsisLifecycleListener.java:180)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener.preDelete(IsisLifecycleListener.java:124)
>        at
>
> org.datanucleus.api.jdo.JDOCallbackHandler.preDelete(JDOCallbackHandler.java:215)
>        at
>
> org.datanucleus.state.JDOStateManager.deletePersistent(JDOStateManager.java:4661)
>        at
>
> org.datanucleus.ExecutionContextImpl.deleteObjectInternal(ExecutionContextImpl.java:2544)
>        at
> org.datanucleus.store.rdbms.scostore.FKSetStore.clear(FKSetStore.java:818)
>        at
> org.datanucleus.store.types.backed.SortedSet.clear(SortedSet.java:814)
>        at
>
> org.datanucleus.store.rdbms.mapping.java.CollectionMapping.preDelete(CollectionMapping.java:295)
>        at
>
> org.datanucleus.store.rdbms.request.DeleteRequest.execute(DeleteRequest.java:192)
>        at
>
> org.datanucleus.store.rdbms.RDBMSPersistenceHandler.deleteTable(RDBMSPersistenceHandler.java:508)
>        at
>
> org.datanucleus.store.rdbms.RDBMSPersistenceHandler.deleteObject(RDBMSPersistenceHandler.java:479)
>        at
>
> org.datanucleus.state.AbstractStateManager.internalDeletePersistent(AbstractStateManager.java:822)
>        at
>
> org.datanucleus.state.JDOStateManager.deletePersistent(JDOStateManager.java:4685)
>        at
>
> org.datanucleus.ExecutionContextImpl.deleteObjectInternal(ExecutionContextImpl.java:2544)
>        at
>
> org.datanucleus.ExecutionContextImpl.deleteObjectWork(ExecutionContextImpl.java:2466)
>        at
>
> org.datanucleus.ExecutionContextImpl.deleteObject(ExecutionContextImpl.java:2417)
>        at
>
> org.datanucleus.api.jdo.JDOPersistenceManager.jdoDeletePersistent(JDOPersistenceManager.java:802)
>        at
>
> org.datanucleus.api.jdo.JDOPersistenceManager.deletePersistent(JDOPersistenceManager.java:820)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.commands.DataNucleusDeleteObjectCommand.execute(DataNucleusDeleteObjectCommand.java:43)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.executeCommands(DataNucleusObjectStore.java:368)
>        at
>
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.execute(DataNucleusObjectStore.java:362)
>        at
>
> org.apache.isis.core.runtime.system.transaction.IsisTransaction.doFlush(IsisTransaction.java:502)
>        at
>
> org.apache.isis.core.runtime.system.transaction.IsisTransaction.flush(IsisTransaction.java:451)
>        at
>
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.flushTransaction(IsisTransactionManager.java:381)
>        at
>
> org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$7.flush(RuntimeContextFromSession.java:234)
>        at
>
> org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.flush(DomainObjectContainerDefault.java:224)
>        at
>
> com.xms.framework.api.domain.model.isis.AbstractIsisDomainRepositoryAndFactory.doRemove(AbstractIsisDomainRepositoryAndFactory.java:352)
>        at
>
> com.xms.framework.api.domain.model.isis.AbstractIsisDomainRepositoryAndFactory.access$200(AbstractIsisDomainRepositoryAndFactory.java:45)
>        at
>
> com.xms.framework.api.domain.model.isis.AbstractIsisDomainRepositoryAndFactory$3.execute(AbstractIsisDomainRepositoryAndFactory.java:345)
>        at
>
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:159)
>        at
>
> com.xms.framework.api.domain.model.isis.AbstractIsisDomainRepositoryAndFactory.remove(AbstractIsisDomainRepositoryAndFactory.java:341)
>        at
>
> com.xms.framework.api.domain.model.isis.commandhandling.DomainCommandHandler.deleteEntity(DomainCommandHandler.java:86)
>
>
>
>
> Óscar Bou Bou
> Responsable de Producto
> Auditor Jefe de Certificación ISO 27001 en BSI
> CISA, CRISC, APMG ISO 20000, ITIL-F
>
>    902 900 231 / 620 267 520
>    http://www.twitter.com/oscarbou
>
>    http://es.linkedin.com/in/oscarbou
>
>    http://www.GesConsultor.com <http://www.gesconsultor.com/>
>
>
>
> Este mensaje y los ficheros anexos son confidenciales. Los mismos
> contienen información reservada que no puede ser difundida. Si usted ha
> recibido este correo por error, tenga la amabilidad de eliminarlo de su
> sistema y avisar al remitente mediante reenvío a su dirección electrónica;
> no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
> Su dirección de correo electrónico junto a sus datos personales constan en
> un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de
> mantener el contacto con Ud. Si quiere saber de qué información disponemos
> de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un
> escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente
> dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo -
> 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia).
> Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos
> adjuntos no contengan virus informáticos, y en caso que los tuvieran
> eliminarlos.
>
>
>
>
>
>

Reply via email to