4 Replies Latest reply on Nov 29, 2015 4:43 AM by rsoika

    JSR-371

    rsoika

      Hi,

       

      did anybody know when JSR-371 - MVC 1.0 will be available on the WildFly platform?

       

      ===
      Ralph

        • 1. Re: JSR-371
          ctomc

          see my answer at Using MVC 1.0 (part of Java EE 8) in WildFly

           

          Said all that, you can always deploy ozrak (RI) as part of your application and start using it.

          but! spec is only at early draft 2 which means it has a long way to go till it is done.

          • 2. Re: JSR-371
            rsoika

            Great! Thanks for your answer. I will test it in this way.

            • 3. Re: JSR-371
              rsoika

              I tried to build a simple sample application using Ozrak and deploy it on wildfly.

              But I did not have success. My problem seems to be the Jersey Implementation. Currently I try to bundle all into my application with the following maven dependencies:

               

              <dependency>
                <groupId>com.oracle.ozark</groupId>
                <artifactId>ozark</artifactId>
                <version>1.0.0-m01</version>
                <scope>compile</scope>
                </dependency>
                <!-- jersey dependency -->
                <dependency>
                <groupId>org.glassfish.jersey.containers</groupId>
                <artifactId>jersey-container-servlet</artifactId>
                <version>2.22</version>
                </dependency>
              

               

              But this did not work. Deployment failed with deployment error:

               

              18:09:48,187 WARN  [org.jboss.weld.Bootstrap] (weld-worker-4) WELD-001125: Illegal bean type java.lang.Iterable<javax.validation.ConstraintViolation<?>> ignored on [EnhancedAnnotatedTypeImpl] public @RequestScoped class com.oracle.ozark.validation.ValidationResult
              18:09:48,374 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit."imixs-mvc-example-0.0.1-SNAPSHOT.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."imixs-mvc-example-0.0.1-SNAPSHOT.war".WeldStartService: Failed to start service
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                at java.lang.Thread.run(Thread.java:745)
              Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type ServiceLocator with qualifiers @Default
                at injection point [UnbackedAnnotatedField] @Inject private org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.serviceLocator
                at org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.serviceLocator(ViewableMessageBodyWriter.java:0)
              

               

              Can anybody help me with the deployment of ozark?

              • 4. Re: JSR-371
                rsoika

                After I cleaned up my code/deployment the deployment succeeded with the following dependencies:

                 

                <dependency>
                  <groupId>org.glassfish.ozark</groupId>
                  <artifactId>ozark</artifactId>
                  <version>1.0.0-m02</version>
                  <scope>compile</scope>
                  </dependency>
                  <dependency>
                  <groupId>org.glassfish.jersey.containers</groupId>
                  <artifactId>jersey-container-servlet</artifactId>
                  <version>2.22</version>
                 </dependency>
                

                 

                 

                At a first look it seems to work. My controller is triggered correctly. But when my controller returns a URL (String) no redirect is preformed. The url is only printed out into the page.

                 

                @Path("hello")
                public class HelloController {
                
                
                    @Inject  
                    private Greeting greeting; 
                    private static Logger logger = Logger.getLogger(HelloController.class.getName());
                
                
                
                
                    @GET
                    @Controller
                    public String hello(@QueryParam("name") String name) {
                    logger.info("set new message: "+name);
                        greeting.setMessage("Hello "+name);
                        return "pages/hello.jsf";
                    }
                }