[
https://issues.apache.org/jira/browse/CAUSEWAY-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Keir Haywood updated CAUSEWAY-3529:
------------------------------------------
Fix Version/s: (was: 2.1.0)
> Make error messages due to incomplete MM more friendly to point to the
> solution (current says: "framework bug", which isn't true).
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAUSEWAY-3529
> URL: https://issues.apache.org/jira/browse/CAUSEWAY-3529
> Project: Causeway
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.0.0-RC2
> Reporter: Daniel Keir Haywood
> Assignee: Daniel Keir Haywood
> Priority: Minor
>
> [13:01] ...I'm stuck with this Exception: java.lang.IllegalStateException:
> framework bug: missing ActionInvocationFacet on action
> org.incode.module.classification.dom.impl.applicability.Applicability#compareTo(java.lang.Object)
>
> [13:05] ...It points to a (suspected) runtime generated method called public
> abstract int compareTo(Object object) method. That is another method than the
> public compareTo(Applicability other) method in the class.
>
> [13:14] ...
> It happens during the validation stage of running the fixture script during a
> @PostConstruct of : fixtureScripts.runFixtureScript(new
> ApplicabilitySeederScript(ApplicabilityDataForLease.class), null);
>
> [13:14] ...
> When I replace the @PostConstruct with a MetamodelEvent variant it seems that
> there isn't an exception anymore.
>
> [13:15] Dan HaywoodAh, in which case I don't think this is a bug. The
> framework only guarantees that the metamodel is fully built when that event
> fires.
>
> [13:29] ...So when the metamodel still is being built these strange
> behaviours can occur. Leading you deep into the woods.
>
> [13:31] Dan HaywoodWell, yes. But I think it's reasonable? Perhaps we can
> improve the error message somehow, though?
>
> [13:50] ...If you can assert that the metamodel still is being constructed
> you can add that to the error message so the user can look into using the
> right initialisation phase for the fixturescript to run.
>
> [13:51] Dan HaywoodYes, I like that idea, thanks.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)