isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <...@haywood-associates.co.uk>
Subject Re: Integration test failure building TodoApp from isisaddon
Date Wed, 04 Mar 2015 10:21:48 GMT
Thanks... needs fixing, clearly.

The bug is in the todoapp itself; it's not valid to interact with a domain
object after it's been deleted, and the code tries to read the title of the
object for logging [1].

Dan

[1]
https://github.com/isisaddons/isis-app-todoapp/blob/61b19365dc0268ec61567afd1edfe507572f7f08/dom/src/main/java/todoapp/dom/module/todoitem/ToDoItem.java#L685


~~~~~~

On 4 March 2015 at 09:05, James Agada <James.agada@cwg-plc.com> wrote:

> I tried to build the isisaddons TodoApp, but it fails at the integration
> test. Here is the surefire report extract
>   <testcase name="happyCase"
> classname="todoapp.integtests.tests.ToDoItemsIntegTest$NewToDo_and_Delete"
> time="0.043">
>     <error
> type="java.lang.reflect.InvocationTargetException:">java.lang.reflect.InvocationTargetException:
> null
>         at
> org.apache.isis.applib.services.actinvoc.ActionInvocationContext.getSize(ActionInvocationContext.java:147)
>         at
> org.apache.isis.applib.services.actinvoc.ActionInvocationContext.isLast(ActionInvocationContext.java:174)
>         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.runtime.services.ServiceInstantiator$2.invoke(ServiceInstantiator.java:227)
>         at
> org.apache.isis.applib.services.actinvoc.ActionInvocationContext_$$_jvst588_1.isLast(ActionInvocationContext_$$_jvst588_1.java)
>         at todoapp.dom.module.todoitem.ToDoItem.delete(ToDoItem.java:687)
>         at
> todoapp.integtests.tests.ToDoItemsIntegTest$NewToDo_and_Delete.happyCase(ToDoItemsIntegTest.java:125)
> </error>
>     <system-out><![CDATA[09:54:39,264  [TitleFacetViaTitleMethod main
>  WARN ]  title failure
> javax.jdo.JDOUserException: Cannot read fields from a deleted object
> FailedObject:685[OID]todoapp.dom.module.todoitem.ToDoItem
>         at
> org.datanucleus.api.jdo.state.PersistentDeleted.transitionReadField(PersistentDeleted.java:116)
>         at
> org.datanucleus.state.AbstractStateManager.transitionReadField(AbstractStateManager.java:650)
>         at
> org.datanucleus.state.JDOStateManager.isLoaded(JDOStateManager.java:3194)
>         at todoapp.dom.module.todoitem.ToDoItem.getDueBy(ToDoItem.java)
>         at sun.reflect.GeneratedMethodAccessor74.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.commons.lang.MethodExtensions.invoke(MethodExtensions.java:47)
>         at
> org.apache.isis.core.metamodel.adapter.ObjectAdapter$InvokeUtils.invoke(ObjectAdapter.java:346)
>         at
> org.apache.isis.core.metamodel.facets.properties.accessor.PropertyAccessorFacetViaAccessor.getProperty(PropertyAccessorFacetViaAccessor.java:73)
>         at
> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl.get(OneToOneAssociationImpl.java:131)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.handleGetterMethodOnProperty(DomainObjectInvocationHandler.java:352)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:197)
>         at
> org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist$1.invoke(ProxyInstantiatorForJavassist.java:52)
>         at
> todoapp.dom.module.todoitem.ToDoItem_$$_jvst588_5.getDueBy(ToDoItem_$$_jvst588_5.java)
>         at todoapp.dom.module.todoitem.ToDoItem.title(ToDoItem.java:154)
>         at sun.reflect.GeneratedMethodAccessor87.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.commons.lang.MethodExtensions.invoke(MethodExtensions.java:47)
>         at
> org.apache.isis.core.metamodel.adapter.ObjectAdapter$InvokeUtils.invoke(ObjectAdapter.java:346)
>         at
> org.apache.isis.core.metamodel.facets.object.title.methods.TitleFacetViaTitleMethod.title(TitleFacetViaTitleMethod.java:79)
>         at
> org.apache.isis.core.metamodel.facets.object.title.TitleFacetAbstract.title(TitleFacetAbstract.java:43)
>         at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectSpecificationAbstract.getTitle(ObjectSpecificationAbstract.java:405)
>         at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectSpecificationAbstract.getTitle(ObjectSpecificationAbstract.java:399)
>         at
> org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.titleOf(DomainObjectContainerDefault.java:74)
>         at todoapp.dom.module.todoitem.ToDoItem.delete(ToDoItem.java:685)
>         at
> todoapp.integtests.tests.ToDoItemsIntegTest$NewToDo_and_Delete.happyCase(ToDoItemsIntegTest.java:125)
>         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.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>         at
> org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate(JUnitRuleMockery2.java:146)
>         at
> org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate(IntegrationTestAbstract.java:199)
>         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.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
>         at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
>         at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
>         at
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
>         at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
>         at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> ]]></system-out>
>   </testcase>
> </testsuite>
>
>
> This email and any attachment thereto are confidential and priviledged. if
> you have received it in error, please delete immediately and notify the
> sender. Do not disclose, copy, circulate or in any way use it. The
> information contained therein is for the address only, if you reply on it,
> its at your own risk. Emails are not guaranteed to be secure or error free,
> the message and any attachment could be intercepted, corrupted, lost,
> delayed, incomplete or ammended. Computer warehouse group and its divisions
> do not accept liability for damage caused by this email or any attachment.
> The message you tried to print is protected with Information Rights
> Management. You don't have the necessary user rights to print the message.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message