13 Replies Latest reply on Aug 7, 2009 5:33 AM by Kim Nguyen

    Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed

    Adi Prab Newbie

      trying to deploy war file that was working in jboss 4.0.5 to jboss 5.1.0 but getting following error:

      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Failed to parse schema for nsURI=, baseURI=null, schemaLocation=http://www.jboss.org/j2ee/dtd/jboss-web.dtd
      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)
      ... 35 more
      Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to parse schema for nsURI=, baseURI=null, schemaLocation=http://www.jboss.org/j2ee/dtd/jboss-web.dtd
      at org.jboss.xb.binding.resolver.AbstractMutableSchemaResolver.resolve(AbstractMutableSchemaResolver.java:293)
      at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:274)
      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.dtd.XMLDTDValidator.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)
      ... 43 more

        • 1. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
          Kim Nguyen Newbie

          hi,

          Try to delete the xerces.jar from your project folder.

          • 2. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
            Adi Prab Newbie

            Thanks. I made to not include xerces jars, but it doesnt seem to help. Do you see anything wrong with my web.xml? I am trying to deploy on Jboss-5.1.0

            <?xml version="1.0" encoding="UTF-8"?>
            <web-app
            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"
            version="2.4">

            Thanks
            AP

            • 3. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
              Kim Nguyen Newbie

              hi,

              There are many things which you should do to migrate an application from jboss 4 to jboss 5. Please post the exceptions. This help to see which is running wrong.

              In web.xml for jboss 5. you should use this
              <web-app 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-app_2_5.xsd"
              version="2.5">

              • 4. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
                Kim Nguyen Newbie

                here are some of jars i have to delete from project folder (Please delete them, is seams not anough to exclude them from project)

                xerces.jar
                jaxp-api.jar

                el-api.jar

                Could you post the libs reference of your project?

                • 5. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
                  Adi Prab Newbie

                  SUPER THANKS, ITS WORKING!!!!!! I was able to deploy 3 of my wars, but the last one is throwing an exception on ServletContextListener.... here's an excerpt...help would be greatly appreciated

                  2009-08-06 08:27:35,306 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[<war file>]] (main) Exception sending context destroyed event to listener instance of class com.XXXXXXXXX.ApplicationContextListener
                  java.lang.NoClassDefFoundError
                  at com.galaxyplus.fiapi.ApplicationContextListener.contextDestroyed(ApplicationContextListener.java:29)
                  at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3949)
                  at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4615)
                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4437)
                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
                  at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
                  at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
                  at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  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:264)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                  at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
                  at $Proxy38.start(Unknown Source)
                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
                  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:348)
                  at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
                  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.ServiceController.doChange(ServiceController.java:688)
                  at org.jboss.system.ServiceController.start(ServiceController.java:460)
                  at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
                  at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                  at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                  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.doInstallParentFirst(DeployersImpl.java:1178)
                  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:595)
                  2009-08-06 08:27:35,369 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss.web.deployment:war=/XXXXXX state=Create mode=Manual requiredState=Installed
                  org.jboss.deployers.spi.DeploymentException: URL file:/C:/JBoss-5.1.0.GA/server/default/tmp/a5u524-cx0ay0-fy1gnbpa-1-fy1gqp95-9p/XXXXX.war/ deployment failed
                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:331)
                  at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
                  at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
                  at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
                  at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:585)
                  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:264)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                  at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
                  at $Proxy38.start(Unknown Source)
                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
                  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:348)
                  at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
                  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.ServiceController.doChange(ServiceController.java:688)
                  at org.jboss.system.ServiceController.start(ServiceController.java:460)
                  at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
                  at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                  at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                  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.doInstallParentFirst(DeployersImpl.java:1178)
                  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:595)

                  • 6. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
                    Wolfgang Knauf Master

                    Is "com.galaxyplus.fiapi.ApplicationContextListener" your code?

                    java.lang.NoClassDefFoundError
                    at com.galaxyplus.fiapi.ApplicationContextListener.contextDestroyed(ApplicationContextListener.java:29)


                    It seems that in line 29 a class is accessed which is missing in your deployment.

                    Hope this helps

                    Wolfgang

                    • 7. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
                      Adi Prab Newbie

                      Thanks for the suggestion.

                      Yes that my code. But the interesting part is, same war works perfect on Jboss-4.0.5

                      • 8. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
                        Kim Nguyen Newbie

                        hmm it seems that lib is not correctly use from your project.

                        try to add this to your jboss-web.xml

                        <class-loading java2ClassLoadingCompliance="false">
                        <loader-repository>
                        com.example:archive=unique-archive-name
                        <loader-repository-config>java2ParentDelegation=false
                        </loader-repository-config>
                        </loader-repository>
                        </class-loading>

                        Do you use JFS in your application?

                        • 9. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
                          Kim Nguyen Newbie

                          I had the same error on migration app form jboss 4 to 5.1.
                          In Jboss 5 there are many libs which is include within and cause conflict with libs from your project folder. Either you try to delete libs from your project or if you need them to compiling code, just copy the libs from your jboss folder into your project.
                          Futhermore there many modified configuration for different technology you use. So it could be helpfull to tell which technology you use on your app (Spring, JFS...)

                          • 10. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
                            Adi Prab Newbie

                            Thanks a lot for your suggestion guys. I am using Spring and no JFS. Meanwhile I'll make java2ClassLoadingCompliance change and test it out.

                            • 11. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
                              Adi Prab Newbie

                              Thanks a lot for your suggestions guys. I am using Spring, JAXB, and NO JFS.

                              Meanwhile I'll add java2ClassLoadingCompliance and test it out.

                              • 12. Re: Migrating from Jboss4.0.5 to jboss 5.1.0 - Help needed
                                Adi Prab Newbie

                                what goes in

                                archive and unique-archive-name ???

                                <class-loading java2ClassLoadingCompliance="false">
                                <loader-repository>
                                com.example:archive=unique-archive-name
                                <loader-repository-config>java2ParentDelegation=false
                                </loader-repository-config>
                                </loader-repository>
                                </class-loading>