Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-19970

Jakarta MVC from Wildfly 34 built with Galleon on stability level preview cannot find custom template engines in an EAR

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 34.0.0.Final
    • WildFly Preview
    • None
    • Hide
      1. Build the attached applications using Maven
      2. Deploy the WAR on a suitable Wildfly and access http://localhost:8080/jakarta-mvc-custom-viewengine-not-found-ui-1.0.0-SNAPSHOT/gui/ which returns a document with the phrase "Velocity works!"
      3. Deploy the EAR on a suitable Wildfly and access http://localhost:8080/jakarta-mvc-custom-viewengine-not-found/ui/gui/ which returns status code 500 and causes the error message "RESTEASY002010: Failed to execute: jakarta.ws.rs.ServerErrorException: Unable to find suitable view engine for 'test.vm'" to appear in the server log
      Show
      Build the attached applications using Maven Deploy the WAR on a suitable Wildfly and access http://localhost:8080/jakarta-mvc-custom-viewengine-not-found-ui-1.0.0-SNAPSHOT/gui/ which returns a document with the phrase "Velocity works!" Deploy the EAR on a suitable Wildfly and access http://localhost:8080/jakarta-mvc-custom-viewengine-not-found/ui/gui/ which returns status code 500 and causes the error message "RESTEASY002010: Failed to execute: jakarta.ws.rs.ServerErrorException: Unable to find suitable view engine for 'test.vm'" to appear in the server log
    • ---
    • ---

      I'm building a custom Wildfly 34.0.0.Final using Galleon 6.0.4.Final for use in a container image. I'm using the mvc-krazo layer which provides support for Jakarta MVC at preview level.

      I wanted to build an application using Apache Velocity and Jakarta MVC. Apache Velocity is not supported by Eclipse Krazo out-of-the-box. Therefore I needed to add a dependency for the custom engine: org.eclipse.krazo.ext:krazo-velocity:3.0.0.

      The GUI is contained in a WAR which is contained within an EAR. When I deploy the EAR and access http://localhost:8080/jakarta-mvc-custom-viewengine-not-found/ui/gui/ , I expect to receive the HTML page rendered by Jakarta MVC. However, I receive status code 500. The wildfly log contains the message RESTEASY002010: Failed to execute: jakarta.ws.rs.ServerErrorException: Unable to find suitable view engine for 'test.vm'.

      When I deploy the GUI WAR by itself, the view engine is correctly found and used, i.e. accessing http://localhost:8080/jakarta-mvc-custom-viewengine-not-found-ui-1.0.0-SNAPSHOT/gui/ , returns the expected document.

              bstansbe@redhat.com Brian Stansberry
              erik-brangs-p Erik Brangs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: