12 Replies Latest reply on Jun 29, 2011 9:01 PM by abhi0123

    Problem on deploying war file to jboss Server

    garfield335

      hello, this is my first post in this forum.

       

      I searched on Google and here but i have not found a solution of my problem.

       

      First i am using jboss AS 6.0 and Apache Myfaces, EJB 3.0 and JPA.

       

      I have no Idea how to resolve the problem: When deploying I get always the same error:

       

       

      10:36:34,140 WARN  [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] SchemaLocation: schemaLocation value = 'http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd' must have even number of URI's. @ vfszip:/D:/EclipseWorkspaces/jbosstest/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1269004640812/deploy/jbosstest.war/WEB-INF/lib/trinidad-impl-1.2.12.jar/META-INF/tr.tld[1,238]
      10:36:55,046 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Parse: name=vfsfile:/D:/EclipseWorkspaces/jbosstest/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1269004640812/deploy/jbosstest.war/ state=PreParse mode=Manual requiredState=Parse: org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfsfile:/D:/EclipseWorkspaces/jbosstest/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1269004640812/deploy/jbosstest.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.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:234)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1660)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1378)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1319)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
          at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:898)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:677)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
          at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
          at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Failed to resolve schema nsURI=http://java.sun.com/xml/ns/javaee location=null
          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:229)
          at org.jboss.xb.util.JBossXBHelper.parse(JBossXBHelper.java:206)
          at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:137)
          at org.jboss.deployment.TldParsingDeployer.parse(TldParsingDeployer.java:64)
          at org.jboss.deployment.TldParsingDeployer.parse(TldParsingDeployer.java:38)
          at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:121)
          at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.handleMultipleFiles(AbstractVFSParsingDeployer.java:397)
          at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:282)
          at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:355)
          ... 29 more
      Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to resolve schema nsURI=http://java.sun.com/xml/ns/javaee location=null
          at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:283)
          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.impl.xs.XMLSchemaValidator.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.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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)
          ... 39 more

       

      I am confusing about this message:

      SchemaLocation: schemaLocation value = 'http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd' must have even number of URI's

       

      I have no Idea what this means and how to fix it.

        • 1. Re: Problem on deploying war file to jboss Server
          jaikiran

          Jeff, welcome to the forums.

           

          Yes, the error message isn't very informative. I see two messages in there. One is the WARN message pointing to tr.tld in a jar file nested inside WEB-INF/lib of the war. I am not sure whether this is the culprit for the deployment ERROR.

           

          The next message sort of looks like complaining about a missing xsd declaration for some xml file. What does your web.xml file look like? Can you post its contents?

           

          (While posting the  xml contents, please use the forum editor's formatting options).

          • 2. Re: Problem on deploying war file to jboss Server
            wolfgangknauf

            Hi Jeff,

             

            it seems that Trinidad contains an invalid tag library definition.

             

            The file "META-INF\tr.tld" in "trinidad-impl-1.2.13.jar" starts with this:

             

            {code:xml}<?xml version="1.0" encoding="utf-8"?>

            <taglib xmlns="http://java.sun.com/xml/ns/javaee"

               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"

               version="2.1">
            {code}

             

            But it should be:

             

            {code:xml}<?xml version="1.0" encoding="utf-8"?>

            <taglib xmlns="http://java.sun.com/xml/ns/javaee"

               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"

               version="2.1">{code}

             

            This will probably fix the exception, too.

             

            You can fix this by editing the "tr.tld" in "trinidad-impl-1.2.13.jar" (you will have to expand and repackage it). If the fix works, you should report the bug to the Trinidad developers.

             

            Best regards

             

            Wolfgang

            • 3. Re: Problem on deploying war file to jboss Server
              garfield335

              @Wolfgang Knauf,

               

              You're right there are bugs in in the trinidad jar.

               

              I have to fix the error  in tr.tld and thr.tld  by editing the schemaLocation attribute.

              I previously used a Tomcat Server, and there i never had a problem with this issue. Can somebody explain why?

               

               

              But the application stil doesn't work.

              Now i have a new error:

               

               

               

              11:23:03,906 INFO  [javax.enterprise.resource.webcontainer.jsf.config] Unsanitized stacktrace from failed start...: com.sun.faces.config.ConfigurationException: Factory 'javax.faces.context.FacesContextFactory' was not configured properly.
                  at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:305)
                  at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:220)
                  at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:335)
                  at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:223)
                  at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:72)
                  at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3926)
                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4447)
                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:315)
                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:145)
                  at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:462)
                  at org.jboss.web.deployers.WebModule.startModule(WebModule.java:116)
                  at org.jboss.web.deployers.WebModule.start(WebModule.java:95)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)
                  at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
                  at $Proxy41.start(Unknown Source)
                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53)
                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41)
                  at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                  at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                  at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                  at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
                  at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301)
                  at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
                  at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
                  at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
                  at org.jboss.system.ServiceController.doChange(ServiceController.java:671)
                  at org.jboss.system.ServiceController.start(ServiceController.java:443)
                  at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:189)
                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:102)
                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:49)
                  at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                  at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
                  at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1660)
                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1378)
                  at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1399)
                  at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1319)
                  at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:378)
                  at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2029)
                  at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1050)
                  at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1289)
                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1213)
                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1107)
                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:918)
                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:633)
                  at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:898)
                  at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:677)
                  at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)
                  at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
                  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
                  at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
                  at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                  at java.lang.Thread.run(Unknown Source)
              Caused by: javax.faces.FacesException: org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl
                  at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:606)
                  at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:472)
                  at javax.faces.FactoryFinder.access$400(FactoryFinder.java:139)
                  at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:796)
                  at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)
                  at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:303)
                  ... 70 more
              Caused by: java.lang.InstantiationException: org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl
                  at java.lang.Class.newInstance0(Unknown Source)
                  at java.lang.Class.newInstance(Unknown Source)
                  at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:604)
                  ... 75 more

               

              my web.xml

               

              <?xml version="1.0" encoding="UTF-8"?>
              <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" 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" id="WebApp_ID" version="2.5">
               <description>Sample Demo</description>
               <display-name>Sample Demo</display-name>
              <!-- FaceletViewHandler configuration -->
              <context-param>
                <param-name>javax.faces.SKIP_COMMENTS</param-name>
                <param-value>true</param-value>
              </context-param>
               <context-param>
                <param-name>avax.faces.REFRESH_PERIOD</param-name>
                <param-value>2</param-value>
               </context-param>
               <context-param>
                <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                <param-value>client</param-value>
               </context-param>
               <context-param>
                <param-name>com.sun.faces.validateXml</param-name>
                <param-value>true</param-value>
               </context-param>
               <context-param>
                <param-name>com.sun.faces.verifyObjects</param-name>
                <param-value>true</param-value>
               </context-param>
              
               <context-param>
                <!--Unfortunately, Facelets provides no hook for plugging the PageResolver into the logic 
                    handling "facelets.VIEW_MAPPINGS". You should leave "facelets.VIEW_MAPPINGS" 
                    unset and use "org.apache.myfaces.trinidad.FACELETS_VIEW_MAPPINGS" instead.-->
                <param-name>org.apache.myfaces.trinidad.FACELETS_VIEW_MAPPINGS</param-name>
                <param-value>*.xhtml</param-value>
               </context-param>
               <filter>
                <filter-name>extensionsFilter</filter-name>
                <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
               </filter>
               <filter>
                <filter-name>trinidad</filter-name>
                <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
               </filter>
               <!--
                      extension mapping for adding <script/>, <link/>, and other resource
                      tags to JSF-pages
                  -->
               <filter-mapping>
                <filter-name>extensionsFilter</filter-name>
                <servlet-name>Faces Servlet</servlet-name>
               </filter-mapping>
               <!--
                      extension mapping for serving page-independent resources (javascript,
                      stylesheets, images, etc.)
                  -->
               <filter-mapping>
                <filter-name>extensionsFilter</filter-name>
                <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
               </filter-mapping>
               <filter-mapping>
                <filter-name>trinidad</filter-name>
                <servlet-name>Faces Servlet</servlet-name>
               </filter-mapping>
               <servlet>
                <servlet-name>resources</servlet-name>
                <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
               </servlet>
               <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
               </servlet>
               <servlet-mapping>
                <servlet-name>resources</servlet-name>
                <url-pattern>/adf/*</url-pattern>
               </servlet-mapping>
              
               <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.jsf</url-pattern>
               </servlet-mapping>
              
               <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>/faces/*</url-pattern>
               </servlet-mapping>
               <welcome-file-list>
                <welcome-file>index.html</welcome-file>
               </welcome-file-list>
               <login-config>
                <auth-method>BASIC</auth-method>
               </login-config>
              </web-app>
              
              • 4. Re: Problem on deploying war file to jboss Server
                wolfgangknauf

                Hi,

                 

                which jars does your web app contain in WEB-INF\lib?

                JBoss runs in a lot of problems if the web app contains a JSF implementation (as the Sun RI or MyFaces). So, best advice is to remove them and rely on the JSF implementation bundled with JBoss.

                 

                Best regards

                 

                Wolfgang

                • 5. Re: Problem on deploying war file to jboss Server
                  garfield335

                  Hello,

                   

                  I don't want to change the JSF implementations. Because I had a running application.

                   

                  Only tried to move from a tomcat server to a jboss server ....

                  • 6. Re: Problem on deploying war file to jboss Server
                    wolfgangknauf

                    Hi Jeff,

                     

                    to be more specific: JBoss already bundles a JSF implementation. For a 5.1.0 server, it can be found in "\server\default\deploy\jbossweb.sar\jsf-libs\" (it is the Sun RI 1.2_12). JBoss 6.0 includes JSF version 2.0.2.

                     

                    The easiest way to use JSF is to use the implementation bundled in JBoss, so that your deployed web app does not bundle a own version. Normally, there should be no changes required to your app besides a repackaging without the JSF jars.

                     

                    If you cannot rely on the default JSF implementation, you could define a Classloader for your web app which isolates the JSF libraries. But I never did this myself and heard of a lot of trouble with this. So, before doing this try to remove the JARs from your app.

                     

                    Best regards

                     

                    Wolfgang

                    • 7. Re: Problem on deploying war file to jboss Server
                      garfield335

                      Ok I understand

                       

                      I thought i could deploy my application without a lot of changes. But it seems that I have to do a lot of work.

                       

                       

                      So I use a JBoss 6.0,

                      • 8. Re: Problem on deploying war file to jboss Server

                        I have the same setup and ran into the same problem.

                         

                        I use

                         

                        <context-param>
                             <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
                             <param-value>true</param-value>
                        </context-param>

                         

                        in my war's web.xml.

                         

                        Nevertheless i get the same exception:

                         

                        [config] Unsanitized stacktrace from failed start...: com.sun.faces.config.ConfigurationException: Factory 'javax.faces.context.FacesContextFactory' was not configured properly.

                         

                        @Wolfgang:

                         

                        You wrote about defining a classloader. Doesn't the context-param fix the problem of multiple JSF impl.?

                         

                        Kind regards,

                         

                        Hans

                        • 9. Re: Problem on deploying war file to jboss Server

                          ah ok i read in the release notes for JBoss AS 6 M2: http://community.jboss.org/wiki/AS600M2ReleaseNotes

                           

                          The unsupported WAR_BUNDLES_JSF_IMPL option described on the JBoss AS 5 and My Faces wiki page will not work with M2.  It is expected that this option (with increased  flexibility) will return in M3.

                           

                          kind regards,

                          hans

                          • 10. Re: Problem on deploying war file to jboss Server
                            domboeckli

                            Same problem with the tomahawk12-1.1.10.jar library and proposed solution from Wolfgang Knauf solved it. Many thanks.

                            • 11. Re: Problem on deploying war file to jboss Server
                              gcontini

                              The solution proposed by Wolfgang Knauf worked partially. In the end of metadata-deployer-jboss-beans.xml i also had to add the following lines:

                              {code:xml}

                                    <!-- schema classes by QName's -->

                                    <property name="bindingClassesByElementNames">

                                       <map keyClass="javax.xml.namespace.QName" valueClass="java.lang.String">

                                          <entry>

                                             <key>

                                                <bean class="javax.xml.namespace.QName">

                                                   <constructor>

                                                      <!-- namespace -->

                                                      <parameter>http://java.sun.com/xml/ns/javaee</parameter>

                                                      <!-- root element name -->

                                                      <parameter>ejb-jar</parameter>

                                                   </constructor>

                                                </bean>

                                             </key>

                                             <value>org.jboss.metadata.ejb.spec.EjbJar31MetaData</value>

                                          </entry>

                                          <entry>

                                             <key>

                                                <bean class="javax.xml.namespace.QName">

                                                   <constructor>

                                                      <!-- namespace -->

                                                      <parameter>http://java.sun.com/xml/ns/javaee</parameter>

                                                      <!-- root element name -->

                                                      <parameter>taglib</parameter>

                                                   </constructor>

                                                </bean>

                                             </key>

                                             <value>org.jboss.metadata.web.spec.Tld21MetaData</value>

                                          </entry>

                                       </map>

                                    </property>

                                 </bean>

                              {code:xml}

                              I think this problem is linked to this jira issue : https://issues.jboss.org/browse/JBAS-8800

                              • 12. Re: Problem on deploying war file to jboss Server
                                abhi0123

                                I'd like to add something here for others who are facing similar problem. I was having trouble deploying a web service with a bodyless 2.5 web.xml. JBoss AS 6.0 Final was complaining as follows. I looked all over the web with no solution. People talked about changing metadata-deployer for ejb-jar and taglib but no one discussed anything about web-app. I finally got it working with some common sense.

                                 

                                Error:

                                 

                                DEPLOYMENTS IN ERROR:

                                  Deployment "vfs:///usr/local/share/jboss/server/default/deploy/jaxws-maven-sample.war" is in error due to the following reason(s): org.jboss.xb.binding.JBossXBRuntimeException: Failed to resolve schema binding for QName {http://java.sun.com/xml/ns/javaee}web-app with schemaLocation=null

                                 

                                    at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.GA]

                                    at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.GA]

                                 

                                Solution:


                                Add to metadata-deployer-jboss-beans.xml:

                                 

                                <property name="bindingClassesByElementNames">

                                         <map keyClass="javax.xml.namespace.QName" valueClass="java.lang.String">

                                 

                                          <!-- entries for ejb-jar and taglib -->

                                 

                                          <entry>

                                               <key>

                                                  <bean class="javax.xml.namespace.QName">

                                                     <constructor>

                                                        <!-- namespace -->

                                                        <parameter>http://java.sun.com/xml/ns/javaee</parameter>

                                                        <!-- root element name -->

                                                        <parameter>web-app</parameter>

                                                     </constructor>

                                                  </bean>

                                               </key>

                                               <value>org.jboss.metadata.web.spec.Web25MetaData</value>

                                            </entry>

                                         </map>

                                </property>