1 2 Previous Next 16 Replies Latest reply: Apr 5, 2012 4:33 AM by Arpit Todi RSS

    How to deploy war file into Jboss 5.1.0

    surender m Newbie

      Hi Friends,

       

       

      I have application which is running properly under Tomcat 5.5 and now I want to move that application to Jboss 5.1.0.


         For that purpose i have deployed the war file at the location E:\SUCHOS_PROJECT\jboss-5.1.0.GA\server\default\deploy

       

      Jboss-web.xml: is as follows

      ---------------------

        <?xml version="1.0" encoding="ISO-8859-1"?>

          <!DOCTYPE jboss-web PUBLIC

       

       

       

          

       

       

      <context-root>DirectAXs-Admin</context-root>

           </jboss-web>

       

       

       

      ( with the Jboss4.0.5, same war file running fine with jboss-web.xml as

       

      <?xml version="1.0" encoding="ISO-8859-1"?> 

          <!DOCTYPE jboss-web PUBLIC    

         "-//JBoss//DTD Web Application 2.3V2//EN"

      "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">

       

      <jboss-web>

         <context-root>DirectAXs-Admin</context-root>

       

      </jboss-web>

       

       

       

       


         but when I start the jboss5.1.0 server, i am unable to start it and it is giving the following errors..

      i.e,

       

       

      15:48:55,406 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/E:/SUCHOS_PROJECT/jboss-5.1.0.GA/server/default/deploy/DirectAXs-Admin.war/ state=Not Installed mode=Manual requiredState=Parse

       

       

       

      : Error creating managed object for vfszip:/E:/SUCHOS_PROJECT/jboss-5.1.0.GA/server/default/deploy/DirectAXs-Admin.war/

       

      at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

      at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:362)

      at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:322)

      at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:294)

      at org.jboss.deployment.JBossAppParsingDeployer.createMetaData(JBossAppParsingDeployer.java:119)

      at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:234)

      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

      at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

      at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

      at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

      at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

      at org.jboss.Main.boot(Main.java:221)

      at org.jboss.Main$1.run(Main.java:556)

      at java.lang.Thread.run(Thread.java:619)

      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: app-name not found as a child of jboss-app in unordered_sequence: module* security-role* jmx-name? loader-repository? unauthenticated-principal? security-domain? library-directory? module-order?

      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)

      at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)

      at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:189)

      at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:166)

      at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137)

      at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121)

      at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)

      at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)

      at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)

      ... 34 more

      Caused by: org.jboss.xb.binding.JBossXBRuntimeException: app-name not found as a child of jboss-app in unordered_sequence: module* security-role* jmx-name? loader-repository? unauthenticated-principal? security-domain? library-directory? module-order?

      at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:383)

      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)

      at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

      at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)

      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)

      ... 42 more

       

      org.jboss.deployers.spi.DeploymentException

      )

      <jboss-web> 

       

      "-//JBoss//DTD Web Application 5.0//EN"

       

       

      "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">

        • 1. Re: How to deploy war file into Jboss 5.1.0
          Peter Johnson Master

          Always follow the "caused by" trail to get to the root problem which is:

           

          Caused by: org.jboss.xb.binding.JBossXBRuntimeException: app-name not found as a child of jboss-app in unordered_sequence: module* security-role* jmx-name? loader-repository? unauthenticated-principal? security-domain? library-directory? module-order?

           

          JBoss AS 5.0.0 and higher are pickier about config file contents than prior releases. Simple remove app-name from the config file.

          • 2. Re: How to deploy war file into Jboss 5.1.0
            surender m Newbie

            Thanks Johnson for giving reply...

             

            As you said, I removed app-name tag from my jboss-app.xml  i.e,

             

            before removing app-name atg

            <jboss-app>
                <app-name>DirectAXs-Admin</app-name>
            </jboss-app>

             

            after removing or now my jboss-app.xml is like

            <jboss-app>

             


            </jboss-app>

            and my another config file jboss-web.xml is as

            <?xml version="1.0" encoding="ISO-8859-1"?>

            <!DOCTYPE jboss-web PUBLIC
                    "-//JBoss//DTD Web Application 2.3V2//EN"
                "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">

            <jboss-web>
            <context-root>DirectAXs-Admin</context-root>   
            </jboss-web>

            and web.xml is as

             

             

            <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

            <?xml version="1.0" encoding="UTF-8"?>

             

             

             

            <display-name>DirectAXs-Admin</display-name>

             

            <property environment="env"/>

             

            <property name="tomcat.home" value="${env.DirectAX_DB}"/>

            <context-param>

            <param-name>contextConfigLocation</param-name>

            <param-value>/WEB-INF/applicationContext.xml</param-value>

            </context-param>

             

            <filter>

            <filter-name>DirectAXs-Admin</filter-name>

            <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>

            </filter>

             

              

            <filter-mapping>

            <filter-name>DirectAXs-Admin</filter-name>

            <url-pattern>/*</url-pattern>

            </filter-mapping>

             

            <!-- mondrian resources initializer -->

            <listener>

            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

            </listener>

             

              

            <listener>

            <listener-class>com.suchos.directax.adminconsole.util.SessionWatcher</listener-class>

            </listener>

             

             

             

            <servlet>

            <servlet-name>tiles</servlet-name>

            <servlet-class>org.apache.tiles.web.startup.TilesServlet</servlet-class>

            <init-param>

            <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>

            <param-value>/WEB-INF/classes/config_files/tiles_config.xml</param-value>

            </init-param>

            <load-on-startup>2</load-on-startup>

            </servlet>

             

            <servlet>

            <servlet-name>dwr</servlet-name>

            <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>

            <init-param>

            <param-name>debug</param-name>

            <param-value>true</param-value>

            </init-param>

            </servlet>

             

            <servlet>

            <servlet-name>DAXAdminHealthDashBoardAction</servlet-name>

            <servlet-class>com.suchos.directax.adminconsole.webui.actions.DAXAdminHealthDashBoardAction</servlet-class>

            </servlet>

            <servlet>

            <description>This is the description of my J2EE component</description>

            <display-name>This is the display name of my J2EE component</display-name>

            <servlet-name>DaxAdminQuartzInitializerServlet</servlet-name>

            <servlet-class>com.suchos.directax.adminconsole.webui.actions.DaxAdminQuartzInitializerServlet</servlet-class>

            <load-on-startup>1</load-on-startup>

            </servlet>

            <servlet>

            <servlet-name>DaxAdminFileReceiverAction</servlet-name>

            <servlet-class>com.suchos.directax.adminconsole.webui.actions.DaxAdminFileReceiverAction</servlet-class>

            </servlet>

            <servlet>

            <servlet-name>DaxProvisioningLogReceiverAction</servlet-name>

            <servlet-class>com.suchos.directax.adminconsole.webui.actions.DaxProvisioningLogReceiverAction</servlet-class>

            </servlet>

            <servlet>

            <servlet-name>DaxAdminLogReceiverAction</servlet-name>

            <display-name>This is the display name of my J2EE component</display-name>

            <description>This is the description of my J2EE component</description>

            <servlet-class>com.suchos.directax.adminconsole.webui.actions.DaxAdminLogReceiverAction</servlet-class>

            </servlet>

             

            <servlet>

            <servlet-name>TestDataTransferServlet</servlet-name>

            <servlet-class>com.suchos.directax.adminconsole.util.TestDataTransferServlet</servlet-class>

            </servlet>

             

            <servlet-mapping>

            <servlet-name>dwr</servlet-name>

            <url-pattern>/dwr/*</url-pattern>

            </servlet-mapping>

             

            <servlet-mapping>

            <servlet-name>DaxAdminQuartzInitializerServlet</servlet-name>

            <url-pattern>/DaxAdminQuartzInitializerServlet</url-pattern>

            </servlet-mapping>

             

            <servlet-mapping>

            <servlet-name>DAXAdminHealthDashBoardAction</servlet-name>

            <url-pattern>/healthReceiverAction</url-pattern>

            </servlet-mapping>

             

            <servlet-mapping>

            <servlet-name>DaxAdminFileReceiverAction</servlet-name>

            <url-pattern>/fileReceiverAction</url-pattern>

            </servlet-mapping>

             

            <servlet-mapping>

            <servlet-name>DaxProvisioningLogReceiverAction</servlet-name>

            <url-pattern>/provisioningAction</url-pattern>

            </servlet-mapping>

             

              

            <servlet-mapping>

            <servlet-name>DaxAdminLogReceiverAction</servlet-name>

            <url-pattern>/logReceiverAction</url-pattern>

            </servlet-mapping>

             

            <servlet-mapping>

            <servlet-name>TestDataTransferServlet</servlet-name>

            <url-pattern>/testDataTransferServlet</url-pattern>

            </servlet-mapping>

             

             

            <servlet-name>LdapsyncDataReceiver</servlet-name>

            <servlet-class>com.suchos.directax.adminconsole.webui.actions.LdapsyncDataReceiver</servlet-class>

            </servlet>

             

            <servlet-mapping>

            <servlet-name>LdapsyncDataReceiver</servlet-name>

            <url-pattern>/LdapsyncDataReceiver</url-pattern>

            </servlet-mapping>

             

            <session-config>

            <session-timeout>300</session-timeout>

            </session-config>

             

            <welcome-file-list>

            <welcome-file>/view/jsps/login.jsp</welcome-file>

            </welcome-file-list>

             

             

            <error-page>

            <error-code>404</error-code>

            <location>/404error.jsp</location>

            </error-page>

             

            <error-page>

            <exception-type>java.lang.Exception</exception-type>

            <location>/aodException.jsp</location>

            </error-page>

             

             

            <!-- Tag lib -->

            <taglib>

            <taglib-uri>/WEB-INF/tlds/struts-bean.tld</taglib-uri>

            <taglib-location>/WEB-INF/tlds/struts-bean.tld</taglib-location>

            </taglib>

            <taglib>

            <taglib-uri>/WEB-INF/tlds/fmt.tld</taglib-uri>

            <taglib-location>/WEB-INF/tlds/fmt.tld</taglib-location>

            </taglib>

            <taglib>

            <taglib-uri>/WEB-INF/tlds/struts-html.tld</taglib-uri>

            <taglib-location>/WEB-INF/tlds/struts-html.tld</taglib-location>

            </taglib>

            <taglib>

            <taglib-uri>/WEB-INF/tlds/c.tld</taglib-uri>

            <taglib-location>/WEB-INF/tlds/c.tld</taglib-location>

            </taglib>

            <taglib>

            <taglib-uri>/WEB-INF/tlds/fn.tld</taglib-uri>

            <taglib-location>/WEB-INF/tlds/fn.tld</taglib-location>

            </taglib>

            <taglib>

            <taglib-uri>/WEB-INF/tlds/x.tld</taglib-uri>

            <taglib-location>/WEB-INF/tlds/x.tld</taglib-location>

            </taglib>

            <taglib>

            <taglib-uri>/WEB-INF/tlds/struts-logic.tld</taglib-uri>

            <taglib-location>/WEB-INF/tlds/struts-logic.tld</taglib-location>

            </taglib>

            <taglib>

            <taglib-uri>/WEB-INF/tlds/struts-tiles.tld</taglib-uri>

            <taglib-location>/WEB-INF/tlds/struts-tiles.tld</taglib-location>

            </taglib>

            <!-- taglib for struts displaytable -->

            <taglib>

            <taglib-uri>/WEB-INF/tlds/displaytag-12.tld</taglib-uri>

            <taglib-location>/WEB-INF/tlds/displaytag-12.tld</taglib-location>

            </taglib>

            <taglib>

            <taglib-uri>/WEB-INF/tlds/displaytag-11.tld</taglib-uri>

            <taglib-location>/WEB-INF/tlds/displaytag-11.tld</taglib-location>

            </taglib>

             

             

             

            Then again tried to run the Jboss server, but error is given as

             

            Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.a: Invalid content was found starting with element 'property'. One of '{"http://java.sun.com/xml/ns/j2ee":description, "http://java.sun.com/xml/ns/j2ee":display-name, "http://java.sun.com/xml/ns/j2ee":icon, "http://java.sun.com/xml/ns/j2ee":distributable, "http://java.sun.com/xml/ns/j2ee":context-param, "http://java.sun.com/xml/ns/j2ee":filter, "http://java.sun.com/xml/ns/j2ee":filter-mapping, "http://java.sun.com/xml/ns/j2ee":listener, "http://java.sun.com/xml/ns/j2ee":servlet, "http://java.sun.com/xml/ns/j2ee":servlet-mapping, "http://java.sun.com/xml/ns/j2ee":session-config, "http://java.sun.com/xml/ns/j2ee":mime-mapping, "http://java.sun.com/xml/ns/j2ee":welcome-file-list, "http://java.sun.com/xml/ns/j2ee":error-page, "http://java.sun.com/xml/ns/j2ee":jsp-config, "http://java.sun.com/xml/ns/j2ee":security-constraint, "http://java.sun.com/xml/ns/j2ee":login-config, "http://java.sun.com/xml/ns/j2ee":security-role, "http://java.sun.com/xml/ns/j2ee":env-entry, "http://java.sun.com/xml/ns/j2ee":ejb-ref, "http://java.sun.com/xml/ns/j2ee":ejb-local-ref, "http://java.sun.com/xml/ns/j2ee":service-ref, "http://java.sun.com/xml/ns/j2ee":resource-ref, "http://java.sun.com/xml/ns/j2ee":resource-env-ref, "http://java.sun.com/xml/ns/j2ee":message-destination-ref, "http://java.sun.com/xml/ns/j2ee":message-destination, "http://java.sun.com/xml/ns/j2ee":locale-encoding-mapping-list}' is expected. @ vfszip:/E:/SUCHOS_PROJECT/jboss-5.1.0.GA/server/default/deploy/DirectAXs-Admin.war/WEB-INF/web.xml[6,31]

            at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)

            at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)

            at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:189)

            at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:166)

            at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137)

            at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121)

            at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)

            at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)

            at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)

            ... 33 more

             

             

            In this tag <property environment="env"/> and in the

            <

            display-name>This is the display name of my J2EE component</display-name> tag showing error as above.

             

            With same files Jboss4.0.5.GA server is running fine & application runs. but the problem with Jboss5.1.0.GA

             

            Even If I change jboss-web_4_0.dtd to Jboss-web_5.1.dtd in jboss-webxml and

            changed Web.xml dtd from

            <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> to

             

            <web-app xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
               version="2.5">
            also

            am getting above error.

             

            Could you suggest me.

             

            Thanks In Advance.

             

             

             

             

             

             

             

            </web-app>

            <servlet>

            • 3. Re: How to deploy war file into Jboss 5.1.0
              Wolfgang Knauf Master

              Hi,

               

              the DTD/XSD for web.xml does not contain/allow an element "property", so you have to remove the two "property" elements from your web.xml

              See e.g. this for a small hint on alternative ways: http://www.mail-archive.com/users@tomcat.apache.org/msg16637.html

               

              But the basic question is: how do you use those properties?

               

              Best regards

               

              Wolfgang

              • 4. Re: How to deploy war file into Jboss 5.1.0
                surender m Newbie

                Thanks for your reply.

                 

                I removed two property elements and display-name, description elements also.

                 

                But again giving error as

                 

                Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'.

                 

                <taglib> tag should be used in web.xml for my struts2 application.

                 

                Please suggest me.

                 

                Thanks In Advance.

                 

                 

                • 5. Re: How to deploy war file into Jboss 5.1.0
                  Wolfgang Knauf Master

                  Hi,

                   

                  "taglib" elements must be wrapped in a jsp-config element. Here is a sample.

                   

                   

                  <jsp-config>
                          <taglib>
                              <taglib-uri>http://jakarta.apache.org/taglibs/request-1.0</taglib-uri>
                              <taglib-location>/WEB-INF/tags/taglib.tld</taglib-location>
                          </taglib>
                           <taglib>
                              <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
                              <taglib-location>/WEB-INF/tags/c.tld</taglib-location>
                          </taglib>
                      </jsp-config>
                  

                   

                   

                  By the way: I would advice you to build your project with an IDE like Eclipse, where the XML validation is part of the build process ;-).

                   

                  Best regards

                   

                  Wolfgang

                  • 6. Re: How to deploy war file into Jboss 5.1.0
                    surender m Newbie

                    Hi,

                     

                    Thanks for your reply.

                    Now I don't have any XML validation errors.

                     

                    But getting again error as following

                     

                    Caused by: org.xml.sax.SAXException: cvc-complex-type.3.2.2: Attribute 'version' is not allowed to appear in element 'jboss-web'. @ vfszip:/E:/SUCHOS_PROJECT/jboss-5.1.0.GA/server/default/deploy/DirectAXs-Admin.war/WEB-INF/jboss-web.xml[5,26]

                     

                    Even If remove 'version'

                     

                    (version=5.1) attribute also getting error as following

                     

                    Caused by: java.lang.Exception: The xml DirectAXs-Admin.war/WEB-INF/jboss-web.xml is not well formed!
                    at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:191)
                    at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:166)
                    at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137)
                    at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121)
                    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
                    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
                    at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:348)
                    ... 35 more

                     

                     

                      My jboss-web.xml is as following:

                     

                    <?xml version="1.0" encoding="UTF-8"?>
                    <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
                               xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd
                               version="5.1">


                    <context-root>DirectAXs-Admin</context-root>

                       
                    </jboss-web>

                     

                     

                     

                    Could you please guide me.

                     

                    Thanks In Advance.

                     

                     

                     

                     

                     

                     

                    • 7. Re: How to deploy war file into Jboss 5.1.0
                      Wolfgang Knauf Master

                      Hmm, maybe a typo when removing the "version" attribute? Did you e.g. delete the ">" in the same line by accident?

                       

                      Best regards

                       

                      Wolfgang

                      • 8. Re: How to deploy war file into Jboss 5.1.0
                        Peter Johnson Master

                        That is the wrong format for a jboss-web.xml file. It looks like you copied a web.xml file abd simply modified the contents. Instead, it should look like this (note the use of a doctype instead of namespaces):

                         

                        <?xml version="1.0" encoding="UTF-8"?>

                        <!DOCTYPE jboss-web PUBLIC

                            "-//JBoss//DTD Web Application 5.0//EN"

                            "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">

                        <jboss-web>

                          ...

                        </jboss-web>

                        • 9. Re: How to deploy war file into Jboss 5.1.0
                          Wolfgang Knauf Master

                          Hi Peter,

                           

                          actually, there is a http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd - but I have to admit I never gave it a try ;-).

                           

                          Best regards

                           

                          Wolfgang

                          • 10. Re: How to deploy war file into Jboss 5.1.0
                            surender m Newbie

                            Hi Peter & Wolfgang,

                             

                            I didn't remove ">" accidentally, I rechecked few times event though getting Exceptions as

                             

                            jboss-web.xml is not well formed! (when "version" attribute removed)

                            (or)

                            cvc-complex-type.3.2.2: Attribute 'version' is not allowed to appear in element 'jboss-web'.

                             

                             

                            I changed Jboss-web.xml Doctype as Peter said i.e,

                             

                            Now My jboss-web.xml is as following:

                             

                            <?xml version="1.0" encoding="UTF-8"?>

                            <!DOCTYPE jboss-web PUBLIC

                                "-//JBoss//DTD Web Application 5.0//EN"

                                "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">

                            <jboss-web>

                             

                            <context-root>DirectAXs-Admin</context-root>

                             

                               
                            </jboss-web>

                             

                            But now getting New exception as following:

                             

                            Caused by: LifecycleException: Error initializaing : javax.management.ReflectionException: Cannot find method addChild with this signature

                            at org.apache.catalina.core.StandardContext.start(StandardContext.java:4150)

                            at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)

                            ... 66 more

                            10:19:54,984 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/E:/SUCHOS_PROJECT/jboss-5.1.0.GA/server/default/deploy/DirectAXs-Admin.war/ state=PreReal mode=Manual requiredState=Real

                            org.jboss.deployers.spi.DeploymentException

                            : URL file:/E:/SUCHOS_PROJECT/jboss-5.1.0.GA/server/default/tmp/3n2z02b-pk1a3u-gq38h3tg-1-gq38nge6-9p/DirectAXs-Admin.war/ deployment failed

                            at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)

                            at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:316)

                             

                             

                             

                            Please guide me.

                             

                            Thanks In Advance.

                             

                            • 11. Re: How to deploy war file into Jboss 5.1.0
                              Wolfgang Knauf Master

                              Hi,

                               

                              sounds like a JAR file conflict. What JARs does your app bundle? Do you include any JBoss/Tomcat specific JARs? If yes, try to remove them from the deployed app, because this will cause conflicts.

                               

                              Best regards

                               

                              Wolfgang

                              • 12. Re: How to deploy war file into Jboss 5.1.0
                                surender m Newbie

                                Hi Wolfgang,

                                 

                                Thanks again for your reply.

                                 

                                I tried by removing jars like dom4j.jar, servlet-api.jar, wstx.jar but still getting same above Execetion.

                                 

                                Here I am attaching screenshot of "jars of my application".

                                 

                                Could you help me, what jars I should remove from my application.

                                 

                                 

                                 

                                 

                                 

                                Please guide me.jars_application.jpg

                                 

                                Thanks In Advance.

                                 

                                • 13. Re: How to deploy war file into Jboss 5.1.0
                                  Peter Johnson Master

                                  I think that you need to get JBoss Tattletale and run it against both this lib directory and the JBoss AS common/lib directory. Tattletale should tell you about conflicts so that you will know which JARs to remove.

                                  • 14. Re: How to deploy war file into Jboss 5.1.0
                                    Wolfgang Knauf Master

                                    I see  a few JARs which are common conflict candidates:

                                     

                                    -log4j.jar

                                    -j2ee.jar and servlet-api.jar (never bundle JavaEE api files!)

                                    -xml parser related stuff: dom4.jar, xalan.jar might cause problems, too.

                                     

                                     

                                    But I don't know which jar file causes the conflict with the "addChild" method... You will have to dig around, e.g. by taking a look at Tattletale.

                                     

                                    Best regards

                                     

                                    Wolfgang

                                     

                                    Part of my original reply was related to a completely different discussion.... "Fixed" it now.

                                    1 2 Previous Next