2 Replies Latest reply on Oct 13, 2011 12:38 PM by grahamaj

    JBoss update problems

    grahamaj

      Hello JBoss Community,

       

      I have inherited a project that has long needed an upgrade.  It has been running on JBoss 4.0.2 with an embedded Tomcat 5.5.9.  Due to various vulnerablilities in the Tomcat version, the upgrade has become imperitive.

       

      I would like to update to AS 7 but our project is running EJB 2.0 technology which won't be supported in AS 7 until 7.1.  My attempts at deploying the project on AS 6.1.0 have been thrawted due to serveral incompatiblilities.  I have worked out many of the issues, but now I am stuck on an exception coming from a ClassCastException complaining about the struts.  Sadly the project uses an ancient version of struts (1.1).  Could this be the reason for the deployment issues?  If possible, it would be very nice to avoid a struts upgrade due to the vast amount of work that it would take to do so. Could this be fixed by using class loading isolation?  Here is the output that the server yeilds upon deployment of our .ear

       

      10:50:56,462 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'

      10:50:57,451 INFO  [xnio] XNIO Version 2.1.0.CR2

      10:50:57,463 INFO  [nio] XNIO NIO Implementation Version 2.1.0.CR2

      10:50:57,608 INFO  [remoting] JBoss Remoting version 3.1.0.Beta2

      10:50:57,696 INFO  [TomcatDeployment] deploy, ctxPath=/

      10:50:57,969 INFO  [EjbDeployer] installing bean: ejb/myProject.jar#MyEntity1,uid16863825

      10:50:57,970 INFO  [EjbDeployer]   with dependencies:

      10:50:57,972 INFO  [EjbDeployer]   and supplies:

      10:50:57,975 INFO  [EjbDeployer]        jndi:MyEntity1

      10:50:57,977 INFO  [EjbDeployer]        jndi:/myProject/MyEntity1EnityLocal

      10:50:57,978 INFO  [EjbDeployer] installing bean: ejb/myProject.jar#MyEntity2,uid805984

      10:50:57,980 INFO  [EjbDeployer]   with dependencies:

      10:50:57,982 INFO  [EjbDeployer]   and supplies:

      10:50:57,985 INFO  [EjbDeployer]        jndi:MyEntity2

      10:50:57,986 INFO  [EjbDeployer]        jndi:/myProject/MyEntity2EnityLocal

      .

      .

      .

      10:50:57,996 INFO  [EjbDeployer] installing bean: ejb/myProject.jar#MySessionBean,uid4040031

      10:50:57,998 INFO  [EjbDeployer]   with dependencies:

      10:50:57,999 INFO  [EjbDeployer]   and supplies:

      10:50:58,000 INFO  [EjbDeployer]        jndi:myProject/MySessionBean/myPackage.MySessionBeanLocal

      10:50:58,003 INFO  [EjbDeployer]        jndi:myProject/MySessionBean/

      10:50:58,005 INFO  [EjbDeployer]        jndi:myProject/MySessionBean/myPackage.MySessionBean

      10:50:58,006 INFO  [EjbDeployer]        jndi:MySessionBeanLocal

      .

      .

      .

      10:50:58,878 INFO  [EjbModule] Deploying MyEntity1

      10:50:58,971 INFO  [EjbModule] Deploying MyEntity2

      .

      .

      .

      10:50:58,986 INFO  [EjbModule] Deploying MySessionBean

      .

      .

      .

      10:51:02,189 INFO  [BaseLocalProxyFactory] Bound EJB LocalHome 'MyEntity1' to jndi '/myProject/MyEntity1Local'

      10:51:02,210 INFO  [ProxyFactory] Bound EJB Home 'MyEntity1' to jndi 'MyEntity1'

      10:51:02,218 INFO  [BaseLocalProxyFactory] Bound EJB LocalHome 'MyEntity2' to jndi '/myProject/MyEntity2Local'

      10:51:02,226 INFO  [ProxyFactory] Bound EJB Home 'MyEntity2' to jndi 'MyEntity2'

      .

      .

      .

      10:51:02,251 INFO  [BaseLocalProxyFactory] Bound EJB LocalHome 'MySessionBean' to jndi 'MySessionBeanLocal'

      10:51:02,261 INFO  [ProxyFactory] Bound EJB Home 'MySessionBean' to jndi '/myProject/MySessionBean'

      .

      .

      .

      10:51:03,439 INFO  [TomcatDeployment] deploy, ctxPath=/myProject

      10:51:03,514 INFO  [[/myProject]] Marking servlet action as unavailable

      10:51:03,516 ERROR [[/myProject]] Servlet /myProject threw load() exception: java.lang.ClassCastException: org.apache.struts.action.ActionServlet cannot be cast to javax.servlet.Servlet

              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1162) [:6.1.0.Final]

              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1108) [:6.1.0.Final]

              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3628) [:6.1.0.Final]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3851) [:6.1.0.Final]

              at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:294) [:6.1.0.Final]

              at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146) [:6.1.0.Final]

              at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:476) [:6.1.0.Final]

              at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) [:6.1.0.Final]

              at org.jboss.web.deployers.WebModule.start(WebModule.java:95) [:6.1.0.Final]

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_24]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]

              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]

              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]

              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]

              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]

              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]

              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]

              at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) [:2.2.0.SP2]

              at $Proxy41.start(Unknown Source)       at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53) [:2.2.0.SP2]

              at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41) [:2.2.0.SP2]

              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301) [:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.system.ServiceController.doChange(ServiceController.java:671) [:6.1.0.Final (Build SVNTag:JBoss_6.1.0.Final date: 20110816)]

              at org.jboss.system.ServiceController.start(ServiceController.java:443) [:6.1.0.Final (Build SVNTag:JBoss_6.1.0.Final date: 20110816)]

              at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:189) [:6.1.0.Final]

              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:102) [:6.1.0.Final]

              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:49) [:6.1.0.Final]

              at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:63) [:2.2.2.GA]

              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.2.GA]

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.2.GA]

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.2.GA]

              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.1.0.Final]

              at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]

              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.SP2]

              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]

              at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]

              at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]

              at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) [:0.2.2]

              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.1.0.Final]

              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]

              at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

              at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

       

       

      10:51:03,607 INFO  [HornetQServerImpl] trying to deploy queue jms.queue.DLQ

      10:51:03,635 INFO  [HornetQServerImpl] trying to deploy queue jms.queue.ExpiryQueue

      10:51:03,707 INFO  [service] Removing bootstrap log handlers

      10:51:03,786 INFO  [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080

      10:51:03,790 INFO  [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009

      10:51:03,791 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.1.0.Final "Neo"] Started in 42s:336ms

       

      Any suggestions or ideas would be helpful.  Let me know if further information is needed (i.e. the application.xml, jboss-app.xml, etc.)

        • 1. Re: JBoss update problems
          wdfink

          You may try JBoss 5.1, I suppose there are less problems.

           

          For this problem you might use classloading separation, do you have configured a class loader scope in your archive?

          Also it might happen that you have the same struts*.jar in different EAR/WAR files, if it picked up by different class loaders the class is the same but from classloader perspective it isn't and can not be cast.

          A solutiom might be that you drop the struts stuff from your archive and put it in the server/.../lib folder visible for all.

          • 2. Re: JBoss update problems
            grahamaj

            Ah, I see what my mistake was.  When I was attempting to upgrade to AS 7, I found on one of the community discussions that it was necessary to place the classpath dependencies in the ear/lib.  When I found out that AS 7.0 wouldn't work for my project and tried JBoss 6.1 I didn't change the build so the struts library got placed in the ear/lib directory and in the war/WEB-INF/lib directory as well.  Thanks for the help