You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Erik de Hair (Jira)" <ji...@apache.org> on 2020/01/21 09:57:00 UTC

[jira] [Commented] (ISIS-2269) Exception when calling collection on integration test ('more than one ImperativeFacet for method getReferencedObjects , with inconsistent intents')

    [ https://issues.apache.org/jira/browse/ISIS-2269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17020095#comment-17020095 ] 

Erik de Hair commented on ISIS-2269:
------------------------------------

Created a sample application with integration test to reproduce the issue:

[https://github.com/erikdehair/ISIS-2269/blob/master/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleReferencedObjectCollection_IntegTest.java#L26]

> Exception when calling collection on integration test ('more than one ImperativeFacet for method getReferencedObjects , with inconsistent intents')
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ISIS-2269
>                 URL: https://issues.apache.org/jira/browse/ISIS-2269
>             Project: Isis
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.17.0
>            Reporter: Erik de Hair
>            Priority: Major
>
> When 'consuming' a collection of a domain class in integration tests using the wrapper factory an exception is thrown.
> java.lang.IllegalArgumentException: domainapp.modules.simple.dom.impl.SimpleObject#referencedObjects: more than one ImperativeFacet for method getReferencedObjects , with inconsistent intents: [CollectionAccessorFacetViaAccessor[type=PropertyOrCollectionAccessorFacet,method=public java.util.List domainapp.modules.simple.dom.impl.SimpleObject.getReferencedObjects()], CollectionClearFacetViaAccessor[type=CollectionClearFacet,method=public java.util.List domainapp.modules.simple.dom.impl.SimpleObject.getReferencedObjects()], CollectionAddToFacetViaAccessor[type=CollectionAddToFacet,method=public java.util.List domainapp.modules.simple.dom.impl.SimpleObject.getReferencedObjects()], CollectionRemoveFromFacetViaAccessor[type=CollectionRemoveFromFacet,method=public java.util.List domainapp.modules.simple.dom.impl.SimpleObject.getReferencedObjects()]]java.lang.IllegalArgumentException: domainapp.modules.simple.dom.impl.SimpleObject#referencedObjects: more than one ImperativeFacet for method getReferencedObjects , with inconsistent intents: [CollectionAccessorFacetViaAccessor[type=PropertyOrCollectionAccessorFacet,method=public java.util.List domainapp.modules.simple.dom.impl.SimpleObject.getReferencedObjects()], CollectionClearFacetViaAccessor[type=CollectionClearFacet,method=public java.util.List domainapp.modules.simple.dom.impl.SimpleObject.getReferencedObjects()], CollectionAddToFacetViaAccessor[type=CollectionAddToFacet,method=public java.util.List domainapp.modules.simple.dom.impl.SimpleObject.getReferencedObjects()], CollectionRemoveFromFacetViaAccessor[type=CollectionRemoveFromFacet,method=public java.util.List domainapp.modules.simple.dom.impl.SimpleObject.getReferencedObjects()]]
>  at org.apache.isis.core.metamodel.facets.ImperativeFacet$Util.getIntent(ImperativeFacet.java:169) at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:212) at org.apache.isis.core.wrapper.proxy.ProxyCreator$1.invoke(ProxyCreator.java:72) at domainapp.modules.simple.dom.impl.SimpleObject_$$_jvstf5f_b.getReferencedObjects(SimpleObject_$$_jvstf5f_b.java) at domainapp.modules.simple.integtests.tests.SimpleReferencedObjectCollection_IntegTest.testCollectionOfReferencedSimpleObjects(SimpleReferencedObjectCollection_IntegTest.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at 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.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)