6 Replies Latest reply on Sep 18, 2015 5:16 PM by chetansoftware

    migrate from jboss 4.2 to jboss AS 7

    neil88

      Hi everybody

       

      I am migrating my application from jboss 4.2 to jboss as 7, my aplication uses spring 2 + ext 2, during the deployment, it reports error as following:

       

      12:43:20,164 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-16) MSC000

      01: Failed to start service jboss.deployment.unit."pms.war".PARSE: org.jboss.msc

      .service.StartException in service jboss.deployment.unit."pms.war".PARSE: Failed

      to process phase PARSE of deployment "pms.war"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(Deplo

      ymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Se

      rviceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceCont

      rollerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec

      utor.java:886) [rt.jar:1.6.0_31]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

      .java:908) [rt.jar:1.6.0_31]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBA

      S018014: Failed to parse XML descriptor "/D:/jboss-as-7.1.1.Final/bin/content/pm

      s.war/WEB-INF/lib/spring-modules-validation-0.5.jar/META-INF/valang.tld" at [13,

      23]

       

      Can anybody help me fix this problem? It's urgent for me.

       

      Thanks

      Neil

        • 1. Re: migrate from jboss 4.2 to jboss AS 7
          sfcoy

          You appear to be a victim of http://java.net/jira/browse/SPRINGMODULES-13, which was reported early in 2011. This project does not appear to be very active (last svn activity was over 4 years ago), so you may want to consider alternative solutions for this.

           

          You don't say which version of Spring 2 you're using, but be aware that Spring Framework versions between 2.5 andabout 3.0.3 have a URL processing bug that makes them incompatible with every JBoss AS version since about 5.0 or so.

          • 2. Re: migrate from jboss 4.2 to jboss AS 7
            neil88

            Thanks Stephen. I am using Spring 2.0. It did help me fix the previous problem. After I changed the valang.tld file, it didn't complain that error again. However another error appears.

             

            23:55:26,066 INFO  [org.springframework.web.filter.CharacterEncodingFilter] (MSC service thread 1-4) Filter 'encodingFilter' configured successfully
            23:55:26,067 INFO  [org.springframework.web.filter.DelegatingFilterProxy] (MSC service thread 1-4) Initializing filter 'securityFilter'
            23:55:26,072 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/pms]] (MSC service thread 1-4) Exception starting filter securityFilter:
            org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'securityFilterBean' is defined
                    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:355) [spring.jar:2.0]

             

            The definition for securityFilter in web.xml is

             

                <filter>
                    <filter-name>securityFilter</filter-name>
                    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
                    <init-param>
                        <param-name>targetBeanName</param-name>
                        <param-value>securityFilterBean</param-value>
                    </init-param>
                    <init-param>
                        <param-name>targetFilterLifecycle</param-name>
                        <param-value>true</param-value>
                    </init-param>
                    <init-param>
                        <param-name>loginUrl</param-name>
                        <param-value>/login.do</param-value>
                    </init-param>
                    <init-param>
                        <param-name>unprotectedUrls</param-name>
                        <param-value>/index.jsp,/login.jsp,/loginSubmit.do</param-value>
                    </init-param>
                </filter>

            I do have the bean defined as named securityFilterBean in the spring bean xml file.

             

               <bean id="securityFilterBean" class="com.lt.testcenter.framework.common.SecurityFilter" autowire="byName">
                </bean>

            If I removed the securityFilter from web.xml, the war file was successfully deployed on jboss 7, but I can't open the site.

             

            Any help on this problem?

             

            Best Regards.

            Neil

            • 3. Re: migrate from jboss 4.2 to jboss AS 7
              sfcoy

              Can you add a complete server.log as an attachment so that we can check for other clues?

              • 4. Re: migrate from jboss 4.2 to jboss AS 7
                neil88

                Sorry, I didn't see where to add one attachment. My Jboss didn't write message into server.log for the problem war file during deployment. So I copied all output information from console. The detail message is listed below:

                 

                AS015876: Starting deployment of "pms.war"
                23:15:44,295 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-14) Class Path entry ant-contrib.jar in "/D:/jboss-as-7.1.1.Final/bin/content/pms.war/WEB-INF/lib/ant-contrib-1.0b2.jar"  does not point to a valid jar for a Class-Path reference.
                23:15:44,998 INFO  [org.springframework.web.context.ContextLoader] (MSC servicethread 1-30) Root WebApplicationContext: initialization started
                23:15:45,000 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/pms]] (MSC service thread 1-30) Loading Spring root WebApplicationContext
                23:15:45,040 INFO  [org.springframework.core.CollectionFactory] (MSC service thread 1-30) JDK 1.4+ collections available

                23:15:45,044 INFO  [org.springframework.core.CollectionFactory] (MSC service thread 1-30) Commons Collections 3.x available
                23:15:45,072 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-30) Bean factory for application context [Root WebApplicationContext]: org.springframework.beans.factory.support.DefaultListableBean
                Factory defining beans []; root of BeanFactory hierarchy
                23:15:45,088 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-30) No beans defined in application context [Root WebApplicationContext]
                23:15:45,093 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-30) Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@57096198]
                23:15:45,097 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-30) Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context
                .event.SimpleApplicationEventMulticaster@19f1c7fc]
                23:15:45,102 INFO  [org.springframework.ui.context.support.UiApplicationContextUtils] (MSC service thread 1-30) Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.ResourceBundleThemeS
                ource@50807eb2]
                23:15:45,104 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-30) Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans
                []; root of BeanFactory hierarchy]
                23:15:45,107 INFO  [org.springframework.web.context.ContextLoader] (MSC servicethread 1-30) Using context class [org.springframework.web.context.support.XmlWebApplicationContext] for root WebApplicationContext
                23:15:45,109 INFO  [org.springframework.web.context.ContextLoader] (MSC servicethread 1-30) Root WebApplicationContext: initialization completed in 111 ms
                23:15:45,208 INFO  [org.springframework.orm.hibernate3.support.OpenSessionInViewFilter] (MSC service thread 1-30) Initializing filter 'hibernateFilter'
                23:15:45,236 INFO  [org.springframework.orm.hibernate3.support.OpenSessionInViewFilter] (MSC service thread 1-30) Filter 'hibernateFilter' configured successfully
                23:15:45,238 INFO  [com.longtop.testcenter.framework.logging.Log4jFilter] (MSC service thread 1-30) Initializing filter 'log4jFilter'
                23:15:45,239 INFO  [com.longtop.testcenter.framework.logging.Log4jFilter] (MSC service thread 1-30) Filter 'log4jFilter' configured successfully
                23:15:45,241 INFO  [org.springframework.web.filter.CharacterEncodingFilter] (MSC service thread 1-30) Initializing filter 'encodingFilter'
                23:15:45,245 INFO  [org.springframework.web.filter.CharacterEncodingFilter] (MSC service thread 1-30) Filter 'encodingFilter' configured successfully
                23:15:45,258 INFO  [org.springframework.web.filter.DelegatingFilterProxy] (MSC service thread 1-30) Initializing filter 'securityFilter'
                23:15:45,263 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/pms]] (MSC service thread 1-30) Exception starting filter securityFilter
                : org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'securityFilterBean' is defined

                at org.springframework.beans.factory.support.DefaultListableBeanFactory.

                getBeanDefinition(DefaultListableBeanFactory.java:355) [spring.jar:2.0]
                        at org.springframework.beans.factory.support.AbstractBeanFactory.getMerg
                edBeanDefinition(AbstractBeanFactory.java:800) [spring.jar:2.0]
                        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
                (AbstractBeanFactory.java:237) [spring.jar:2.0]
                        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
                (AbstractBeanFactory.java:160) [spring.jar:2.0]
                        at org.springframework.context.support.AbstractApplicationContext.getBea
                n(AbstractApplicationContext.java:646) [spring.jar:2.0]
                        at org.springframework.web.filter.DelegatingFilterProxy.initDelegate(Del
                egatingFilterProxy.java:163) [spring.jar:2.0]
                        at org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(D
                elegatingFilterProxy.java:123) [spring.jar:2.0]
                        at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBe
                an.java:174) [spring.jar:2.0]
                        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(Applicatio
                nFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:]
                        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.
                java:3269) [jbossweb-7.0.13.Final.jar:]
                        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
                865) [jbossweb-7.0.13.Final.jar:]
                        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentS
                ervice.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Se
                rviceControllerImpl.java:1811)
                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceCont
                rollerImpl.java:1746)
                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
                utor.java:886) [rt.jar:1.6.0_31]
                        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]

                23:15:45,284 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-30) Error filterStart
                23:15:45,285 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-30) Context [/pms] startup failed due to previous errors
                23:15:45,308 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/pms]] (MSC service thread 1-30) Closing Spring root WebApplicationContext
                23:15:45,310 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-30) Closing application context [Root WebApplicationContext]
                23:15:45,312 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-30) Destroying singletons in {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans []; root of Be
                anFactory hierarchy}
                23:15:45,335 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-30) MSC00001: Failed to start service jboss.web.deployment.default-host./pms: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./pms: JBAS
                018040: Failed to start context
                        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentS
                ervice.java:95)
                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Se
                rviceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceCont
                rollerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
                utor.java:886) [rt.jar:1.6.0_31]
                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
                .java:908) [rt.jar:1.6.0_31]
                        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
                23:15:45,549 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015
                870: Deploy of deployment "pms.war" was rolled back with failure message {"JBAS0
                14671: Failed services" => {"jboss.web.deployment.default-host./pms" => "org.jbo
                ss.msc.service.StartException in service jboss.web.deployment.default-host./pms:
                JBAS018040: Failed to start context"}}
                23:15:47,601 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-25) JB
                AS015877: Stopped deployment pms.war in 2059ms
                23:15:47,604 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBA
                S014774: Service status report
                JBAS014777:   Services which failed to start:      service jboss.web.deployment.
                default-host./pms: org.jboss.msc.service.StartException in service jboss.web.dep
                loyment.default-host./pms: JBAS018040: Failed to start context

                23:15:47,607 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-t
                hreads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps
                that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jbos
                s.web.deployment.default-host./pms" => "org.jboss.msc.service.StartException in
                service jboss.web.deployment.default-host./pms: JBAS018040: Failed to start cont
                ext"}}}}
                       

                BTW, the application runs well in Tomcat 6 and 7.

                • 5. Re: migrate from jboss 4.2 to jboss AS 7
                  sfcoy

                  It looks like you need to get to the bottom of:

                  23:15:45,000 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/pms]] (MSC service thread 1-30) Loading Spring root WebApplicationContext
                  23:15:45,040 INFO  [org.springframework.core.CollectionFactory] (MSC service thread 1-30) JDK 1.4+ collections available
                  23:15:45,044 INFO  [org.springframework.core.CollectionFactory] (MSC service thread 1-30) Commons Collections 3.x available
                  23:15:45,072 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-30) Bean factory for application context [Root WebApplicationContext]: org.springframework.beans.factory.support.DefaultListableBean Factory defining beans []; root of BeanFactory hierarchy
                  23:15:45,088 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-30) No beans defined in application context [Root WebApplicationContext]
                  • 6. Re: migrate from jboss 4.2 to jboss AS 7
                    chetansoftware

                    Hi Guys.

                     

                    I am getting below error even after changing <body-content>None</body-content> to  <body-content>empty</body-content> in valang.tld

                     

                    Failed to define class org.springmodules.validation.valang.javascript.taglib.ValangValidateTag in Module "MyApplication.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/springmodules/validation/valang/javascript/taglib/ValangValidateTag

                    ....

                    .....

                    NoClassDefFoundError: org/springframework/web/servlet/tags/RequestContextAwareTag



                    Do I need to fix something else? I have just made changes in spring-modules-validation.jar/META-INF/valang.tld