Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1342

The metamodel validation error page doesn't reliably render itself if there are errors.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.12.0
    • Component/s: Core
    • Labels:
      None

      Activity

      Hide
      jira-bot ASF subversion and git services added a comment -

      Commit 8bf7fd7f04049e3632454c34e1ca329df1a936f7 in isis's branch refs/heads/master from Dan Haywood
      [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=8bf7fd7 ]

      ISIS-1342: IsisSystem no longer throws MetaModelException, instead pushes it onto the IsisContext. Its callers (IsisWicketApplication, or IsisSessionFilter - for RO - or CukeGlueAbstract, or IsisSystemForTest) then expose the error appropriately, accessing from IsisContext.

      Additional details:

      • IsisSystem no longer initializes the AuthenticationManager, AuthorizationManager or PersistenceSessionFactory if there was a metamodel validation, to minimize impact on runtime.
      • IsisSystemForTest will fail with a minimal error for any subsequent tests
      • IsisContext now as new metamodeInvalidException field. This is static rather than held on the IsisContext instance as a threadlocal; that's because IsisSystemForTest actually calls IsisContext.testReset() to discard the IsisContext singleton.
      • IsisSessionFilter (which sits in front of RO viewer) now always checks that the metamodel is vaild. It does this simply by querying the IsisContext. (If WebAppBootstrapper was used to bootstrap, rather than wicket viewer, then IsisSystem.init() is still called so no diff in end result)
      • ScenarioException simply does a fail() if no instance available on threadlocal.
      • CukeGlueAbstract similarly has simple guards for if ScenarioException available, to reduce amount of noise when problem is metamodel invalid
      • formatting changes only for IsisWicketApplication
      • WebRequestCycleForIsis looks for validation errors first-off in its onException handler, if any are found then immediately redirects to the MmvErrorPage. This seems to work fine for always rendering MMV page.

      Improvements:

      • IsisMojoAbstract keeps the IsisSystem initialized while it executes.
      Show
      jira-bot ASF subversion and git services added a comment - Commit 8bf7fd7f04049e3632454c34e1ca329df1a936f7 in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=8bf7fd7 ] ISIS-1342 : IsisSystem no longer throws MetaModelException, instead pushes it onto the IsisContext. Its callers (IsisWicketApplication, or IsisSessionFilter - for RO - or CukeGlueAbstract, or IsisSystemForTest) then expose the error appropriately, accessing from IsisContext. Additional details: IsisSystem no longer initializes the AuthenticationManager, AuthorizationManager or PersistenceSessionFactory if there was a metamodel validation, to minimize impact on runtime. IsisSystemForTest will fail with a minimal error for any subsequent tests IsisContext now as new metamodeInvalidException field. This is static rather than held on the IsisContext instance as a threadlocal; that's because IsisSystemForTest actually calls IsisContext.testReset() to discard the IsisContext singleton. IsisSessionFilter (which sits in front of RO viewer) now always checks that the metamodel is vaild. It does this simply by querying the IsisContext. (If WebAppBootstrapper was used to bootstrap, rather than wicket viewer, then IsisSystem.init() is still called so no diff in end result) ScenarioException simply does a fail() if no instance available on threadlocal. CukeGlueAbstract similarly has simple guards for if ScenarioException available, to reduce amount of noise when problem is metamodel invalid formatting changes only for IsisWicketApplication WebRequestCycleForIsis looks for validation errors first-off in its onException handler, if any are found then immediately redirects to the MmvErrorPage. This seems to work fine for always rendering MMV page. Improvements: IsisMojoAbstract keeps the IsisSystem initialized while it executes.

        People

        • Assignee:
          danhaywood Dan Haywood
          Reporter:
          danhaywood Dan Haywood
        • Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development