1 2 Previous Next 17 Replies Latest reply on Oct 14, 2016 10:36 AM by Ted Jones

    .war file is throwing error while deploying why ?

    Debashish Saha Newbie

      Hi ,

      I have successfully created View and virtual Procedure in my project.I want the result of the procedure to be published as an API which takes an input.

      The screenshots are given below:

      Pic1.PNGPic2.PNG

      The output of the preview is :

      <a pk_Accountnumber_in="1"><b><FirstName>debashish</FirstName><LastName>saha</LastName><Addresss>skjdjn</Addresss><Nominee>lkfn</Nominee><DOB>1990-12-11T18:30:00Z</DOB><Phone>123</Phone><balance>0</balance><UserID>JCI-0101</UserID><Accountnumber>1</Accountnumber></b></a>

       

      which is correct.

      Now I want this result to be published as an API.

      I have generated .war file successfully.

      Tried to deploy it in every possible way.

      Capture.PNGgeneratewar.PNGFirst way shoing this error .So I continue with manual configuration of .war file.

      deplyment.PNGsecond way is showing this type of error.

       

      admin.PNG

      Third way while I am trying to enable it from admin console it is showing this sort of error.

      I am also getting an error while starting the server saying that unable to find default scanner.

      As far as I studied about scanner the second method of deployment is associated with scanner.

      I am new to this topic.Could you please find a solution for it.

      Thank you in advance.

        • 1. Re: .war file is throwing error while deploying why ?
          Ramesh Reddy Master

          Debashish,

           

          I see the following error in the log file

           

          Caused by: java.lang.ClassNotFoundException: org.teiid.rest.services.TeiidRestApplication from [Module "deployment.SqlserverWeb.war:main" from Service Module Loader]
            at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.7.Final-redhat-1]
          

           

          Typically this file is included in the WAR file itself. So, I suggest crack open your WAR file and make sure this exists under the "WEB-INF/classes" directory. If this is not present, then it is time to regenerate your WAR file. As one of the error says, this does require a JDK (not JRE) to compile the WAR file during the generation.

           

          HTH

           

          Ramesh..

          • 2. Re: .war file is throwing error while deploying why ?
            Debashish Saha Newbie

            Hi ramesh ,

            I tried to do from the beginning.I am giving some screenshots with explanation that I have tried to do.

            I have regenerated the .war file.I tried to deploy it from the admin console of Jboss EAP 6.4 i.e The Last option in the below instruction screenshot.

            Capture.PNG

             

            Below is my model explorer screenshot

            Pic1.PNG

             

            Below is the correct output when I execute the VDB:

            Pic2.PNG

            I have also Got the message .war generated successfully.

             

            Now when I am trying to deploy it from the EAP admin console

            pic5.PNG

            Below is the error message I am getting.

            adminconsole.PNG

            Deployment failed: myvdb.war: {"outcome" : "failed", "failure-description" : {"JBAS014671: Failed services" : {"jboss.web.deployment.default-host./myvdb" : "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./myvdb: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context\n Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context"}}, "rolled-back" : true}

            The server Log is Below quoted:

             

             

             

            16:05:21,943 ERROR [org.jboss.as.controller.management-operation] (HttpManagementService-threads - 1) JBAS014612: Operation ("add") failed - address: ([{"deployment" => "myvdb.war"}]) - failure description: {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./myvdb" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./myvdb: 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"}}

            16:05:21,943 ERROR [org.jboss.as.server] (HttpManagementService-threads - 1) JBAS015870: Deploy of deployment "myvdb.war" was rolled back with the following failure message:

            {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./myvdb" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./myvdb: 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"}}

            16:05:22,161 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment myvdb.war (runtime-name: myvdb.war) in 207ms

            16:05:22,161 INFO  [org.jboss.as.controller] (HttpManagementService-threads - 1) JBAS014774: Service status report

            JBAS014775:    New missing/unsatisfied dependencies:

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

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

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

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

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

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

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

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

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

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

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

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

            • 3. Re: .war file is throwing error while deploying why ?
              Debashish Saha Newbie

              16:05:17,379 INFO  [org.jboss.as.repository] (HttpManagementService-threads - 1) JBAS014900: Content added at location C:\Users\csahad\EAP-6.4.0\standalone\data\content\33\755faab30377db32d8b71cce9de3b5ea3107b5\content

              16:05:17,479 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "myvdb.war" (runtime-name: "myvdb.war")

              16:05:21,583 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015893: Encountered invalid class name 'http\://java.sun.com/jaxp/xpath/dom:    net.sf.saxon.xpath.XPathFactoryImpl' for service type 'javax.xml.xpath.XPathFactory'

              16:05:21,583 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015893: Encountered invalid class name 'http\://saxon.sf.net/jaxp/xpath/om:     net.sf.saxon.xpath.XPathFactoryImpl' for service type 'javax.xml.xpath.XPathFactory'

              16:05:21,787 INFO  [org.jboss.web] (ServerService Thread Pool -- 83) JBAS018210: Register web context: /myvdb

              16:05:21,912 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/myvdb]] (ServerService Thread Pool -- 83) 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.myvdb.war:main" from Service Module Loader]

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

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

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

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

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

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

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

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

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

                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_101]

                at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_101]

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_101]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_101]

                at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_101]

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

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

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

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

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

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

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

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

                ... 14 more

               

               

              16:05:21,912 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 83) JBWEB001103: Error detected during context /myvdb start, will stop it

              16:05:21,943 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 83) MSC000001: Failed to start service jboss.web.deployment.default-host./myvdb: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./myvdb: 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:511) [rt.jar:1.8.0_101]

                at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_101]

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_101]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_101]

                at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_101]

                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

               

               

              16:05:21,943 ERROR [org.jboss.as.controller.management-operation] (HttpManagementService-threads - 1) JBAS014612: Operation ("add") failed - address: ([{"deployment" => "myvdb.war"}]) - failure description: {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./myvdb" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./myvdb: 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"}}

              16:05:21,943 ERROR [org.jboss.as.server] (HttpManagementService-threads - 1) JBAS015870: Deploy of deployment "myvdb.war" was rolled back with the following failure message:

              {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./myvdb" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./myvdb: 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"}}

              16:05:22,161 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment myvdb.war (runtime-name: myvdb.war) in 207ms

              16:05:22,161 INFO  [org.jboss.as.controller] (HttpManagementService-threads - 1) JBAS014774: Service status report

              JBAS014775:    New missing/unsatisfied dependencies:

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

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

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

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

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

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

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

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

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

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

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

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

              This is the Updated server log.Please Ignore the Previous server Log that was quoted in my first reply.

              Except the server Log everything remains same.

               

              Thank you in advance.

              • 4. Re: .war file is throwing error while deploying why ?
                Debashish Saha Newbie

                These are the screenshots after cracked down the myvdb.war

                webinf.PNG

                webinf2.PNG

                webinf3.PNG

                • 5. Re: .war file is throwing error while deploying why ?
                  Ramesh Reddy Master

                  Can you attach your WAR file? I will check locally.

                  • 6. Re: .war file is throwing error while deploying why ?
                    Debashish Saha Newbie

                    https://1drv.ms/u/s!AggvDQkpXqD7ikTuDQNsYmNYteaJ

                    here is the link to the .war file in my one drive.

                    I could not upload it here as it was large in size after zipping also.

                    Thank you for replying .

                    • 7. Re: .war file is throwing error while deploying why ?
                      Ted Jones Master

                      Hi Dabashish,

                       

                      As Ramesh mentioned, a JDK is required for the WAR generation. To specify the JDK, you will need to add an entry into the eclipse.ini in the openFile section:

                       

                      -vm

                      /{path_to_your_jdk}/bin

                       

                      Example ini:

                       

                      -startup

                      plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar

                      --launcher.library

                      plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505

                      -product

                      org.eclipse.epp.package.jee.product

                      --launcher.defaultAction

                      openFile

                      -showsplash

                      org.eclipse.platform

                      --launcher.XXMaxPermSize

                      256m

                      --launcher.defaultAction

                      openFile

                      -vm

                      /home/tejones/apps/java/jdk1.7.0_03/bin

                      -vmargs

                      -Dosgi.requiredJavaVersion=1.5

                      -XX:MaxPermSize=256m

                      -Xms40m

                      -Xmx512m

                       

                      After generation, the WAR file should have .class files along with the .java files.

                       

                      Thanks,

                      Ted

                      1 of 1 people found this helpful
                      • 8. Re: .war file is throwing error while deploying why ?
                        Debashish Saha Newbie

                        I am able to generate the .war file.

                        The issue is arising with the deployment.

                        • 9. Re: .war file is throwing error while deploying why ?
                          Debashish Saha Newbie

                          Did you check the .war file sir ?

                          One more thing to add is that U tried to deploy it on tomcat.while Starting it this below message is shown.

                          So I think the problem is with the VDB.But as I have shown you I can easily execute this VDB.

                          I dont know where is the error.

                          Could you please help me .I need it badly.

                          tomcat.PNG

                          • 10. Re: .war file is throwing error while deploying why ?
                            Ted Jones Master

                            Yes.. you are generating the WAR file, but there are no compiled classes in it. That is what the warning is telling you during the WAR generation process. You will be allowed to continue, but the file compilation will not happen. You MUST use the JDK in order to compile the classes and have them added to the WAR file. I can see from your screenshot above that there are no classes, only java files. Also, this error: "Caused by: java.lang.ClassNotFoundException: org.teiid.rest.services.TeiidRestApplication from [Module "deployment.myvdb.war:main" from Service Module Loader]" is the reason your WAR is not deploying. Once you actually compile the classes, this error should go away. Please try the fix I mentioned and redeploy.

                             

                            Thanks,

                            Ted

                            1 of 1 people found this helpful
                            • 11. Re: .war file is throwing error while deploying why ?
                              Debashish Saha Newbie

                              I dont know how to thank you.

                              we Indians say "tussi great Ho" in Hindi i.e You are great sir.

                              I am very happy. and thank you very much Ted

                              • 12. Re: .war file is throwing error while deploying why ?
                                Ramesh Reddy Master

                                Ted,

                                 

                                We should check before the WAR generation if the eclipse is configured with JRE vs JDK and stop the generation of the war to begin with? Like java - How to tell if JRE or JDK is installed - Stack Overflow

                                 

                                simple Runtime.exec("javac -version") should give you enough information to make the decision.

                                 

                                What do you think?

                                 

                                Ramesh..

                                • 13. Re: .war file is throwing error while deploying why ?
                                  Ramesh Reddy Master

                                  Good Job Ted.

                                   

                                  Debashish,

                                   

                                  Another way to create a REST service and not generating the WAR is REST Service Through VDB · Teiid Documentation

                                   

                                  In fact you can do that using the VDB you created (minus the WAR generation), and following this Teiid Designer User Guide  at "Auto generate REST WAR" section. This takes away the extra step of the WAR generation altogether.

                                   

                                  Ramesh..

                                  • 14. Re: .war file is throwing error while deploying why ?
                                    Debashish Saha Newbie

                                    Ramesh ,

                                    I checked the .ini file .

                                    it was VM-C:/Program Files/Java/jre1.8.0_101/bin/javaw.exe

                                    I made it correct as Ted told me .

                                    After that I could see the .class file.

                                    then it got successfully deployed.

                                    Thanks to you also Ramesh for your time.

                                    1 2 Previous Next