6 Replies Latest reply on May 13, 2016 10:37 AM by parrotola

    Teiid - Rest service, Failed deploy

    parrotola

      Hi,

      I created a Web services for View Models. When I put war file on the Jboss, I get this results:

      "{\"JBAS014671: Failed services\" => {\"jboss.web.deployment.default-host./vdbtest_rest\" => \"org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./vdbtest_rest: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context

          Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context\"}}"

       

      More over, the preview data of this rest service is correct because I tested in the Teiid Designer.

      I follow this how-to:

      Generating Web Services for View Models in JBoss Data Virtualization 6.1 – Everything JBoss

       

      I use Teiid 8.12.4, JVM 1.7

      Best regards.

      Thank you.

      Francesco

        • 1. Re: Teiid - Rest service, Failed deploy
          tejones

          Hi Francesco,

           

          Could you please post the full stack trace?

           

          Thanks,

          Ted

          • 2. Re: Teiid - Rest service, Failed deploy
            parrotola

            08:41:13,795 INFO  [org.jboss.web] (ServerService Thread Pool -- 62)  JBAS018210: Register web context: /vdbtest_rest

            08:41:14,033 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/vdbtest_rest]] (ServerService Thread Pool -- 62)  JBWEB000287: Exception sending context initialized event to listener instance of class org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.teiid.rest.services.TeiidRestApplication from [Module "deployment.vdbtest_rest.war:main" from Service Module Loader]

              at org.jboss.resteasy.spi.ResteasyDeployment.createFromInjectorFactory(ResteasyDeployment.java:282) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

              at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:270) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

              at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:228) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

              at org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:28) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

              at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3780) [jbossweb-7.5.3.Final.jar:7.5.3.Final]

              at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-15.jar:7.5.0.Final-redhat-15]

              at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-15.jar:7.5.0.Final-redhat-15]

              at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-15.jar:7.5.0.Final-redhat-15]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_95]

              at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_95]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_95]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_95]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_95]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)

            Caused by: java.lang.ClassNotFoundException: org.teiid.rest.services.TeiidRestApplication from [Module "deployment.vdbtest_rest.war:main" from Service Module Loader]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.6.Final-redhat-1]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.6.Final-redhat-1]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.6.Final-redhat-1]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.6.Final-redhat-1]

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.6.Final-redhat-1]

              at org.jboss.resteasy.spi.ResteasyDeployment.createFromInjectorFactory(ResteasyDeployment.java:278) [resteasy-jaxrs-2.3.9.Final-redhat-7.jar:]

              ... 14 more

             

             

            08:41:14,040 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 62)  JBWEB001103: Error detected during context /vdbtest_rest start, will stop it

            08:41:14,061 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 62)  MSC000001: Failed to start service jboss.web.deployment.default-host./vdbtest_rest: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./vdbtest_rest: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context

              at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:99)

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_95]

              at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_95]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_95]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_95]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_95]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)

            Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context

              at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:168)

              at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61)

              at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)

              ... 6 more

             

             

            08:41:14,066 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2)  JBAS014612: Operation ("deploy") failed - address: ([("deployment" => "vdbtest_rest.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./vdbtest_rest" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./vdbtest_rest: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context

                Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context"}}

            08:41:14,070 ERROR [org.jboss.as.server] (DeploymentScanner-threads - 2)  JBAS015870: Deploy of deployment "vdbtest_rest.war" was rolled back with the following failure message:

            {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./vdbtest_rest" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./vdbtest_rest: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context

                Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context"}}

            08:41:14,215 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2)  JBAS015877: Stopped deployment vdbtest_rest.war (runtime-name: vdbtest_rest.war) in 147ms

            08:41:14,219 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2)  JBAS014774: Service status report

            JBAS014775:    New missing/unsatisfied dependencies:

                  service jboss.deployment.unit."vdbtest_rest.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.deployment.unit."vdbtest_rest.war".deploymentCompleteService]

                  service jboss.deployment.unit."vdbtest_rest.war".component."com.wordnik.swagger.jaxrs.config.DefaultJaxrsConfig".START (missing) dependents: [service jboss.deployment.unit."vdbtest_rest.war".deploymentCompleteService]

                  service jboss.deployment.unit."vdbtest_rest.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.deployment.unit."vdbtest_rest.war".deploymentCompleteService]

                  service jboss.deployment.unit."vdbtest_rest.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.deployment.unit."vdbtest_rest.war".deploymentCompleteService]

                  service jboss.deployment.unit."vdbtest_rest.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.deployment.unit."vdbtest_rest.war".deploymentCompleteService]

                  service jboss.deployment.unit."vdbtest_rest.war".component."org.apache.catalina.servlets.DefaultServlet".START (missing) dependents: [service jboss.deployment.unit."vdbtest_rest.war".deploymentCompleteService]

                  service jboss.deployment.unit."vdbtest_rest.war".component."org.apache.jasper.servlet.JspServlet".START (missing) dependents: [service jboss.deployment.unit."vdbtest_rest.war".deploymentCompleteService]

                  service jboss.deployment.unit."vdbtest_rest.war".component."org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher".START (missing) dependents: [service jboss.deployment.unit."vdbtest_rest.war".deploymentCompleteService]

                  service jboss.deployment.unit."vdbtest_rest.war".component."org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap".START (missing) dependents: [service jboss.deployment.unit."vdbtest_rest.war".deploymentCompleteService]

                  service jboss.web.deployment.default-host./vdbtest_rest (missing) dependents: [service jboss.deployment.unit."vdbtest_rest.war".deploymentCompleteService]

                  service jboss.web.deployment.default-host./vdbtest_rest.realm (missing) dependents: [service jboss.deployment.unit."vdbtest_rest.war".deploymentCompleteService]

            JBAS014777:   Services which failed to start:      service jboss.web.deployment.default-host./vdbtest_rest

            • 3. Re: Teiid - Rest service, Failed deploy
              tejones

              Thanks for that Francesco.

               

              The key error is: "Caused by: java.lang.ClassNotFoundException: org.teiid.rest.services.TeiidRestApplication from [Module "deployment.vdbtest_rest.war:main" from Service Module Loader]".


              This can mean one of two things..

              1.) The java classes did not compile which would happen if your JDK version for JBDS was not at least 1.7. To check, open the generated WAR and verify the .class files are there.

              2.) The application server has a mismatch of RestEasy jars with what is included in the WAR. Try deleting the RestEasy jars from the lib folder of the WAR and redeploy.


              Thanks,

              Ted

              • 4. Re: Teiid - Rest service, Failed deploy
                parrotola

                Hi Ted,

                thank you for all. I tried  to delete RestEasy from War and doesm't work. I opened War file and there aren't .class file, there are only .java file.

                 

                Francesco

                • 5. Re: Teiid - Rest service, Failed deploy
                  tejones

                  Ok..  it sounds like your Designer instance may be using a JRE and not a JDK. Assuming the JRE is the problem, you should receive a warning prior to the generation that you are using a JRE. Even though your eclipse/JBDS install may have a JDK defined, you may have to explicitly tell it to use the JDK. One way to do that is to add the following to your eclipse.ini in the openFile section:

                   

                  -vm

                  /{path_to_your_jdk}/bin

                   

                  Thanks,

                  Ted

                  • 6. Re: Teiid - Rest service, Failed deploy
                    parrotola

                    Thank you Ted!