Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Roma + Liferay 5.x bundled with Tomcat 6?

Developers
2010-09-07
2013-04-29
  • I'm trying to create a portlet project that runs in Liferay 5.x bundled with Tomcat 6.  When creating the project one of the jars that gets copied into the WebContent\WEB-INF\lib folder is appserv-rt.jar.  It appears that the classes contained in this jar conflict with the classes provided by Tomcat 6.  Has anyone gotten this configuration to work?

     
  • Luca Garulli
    Luca Garulli
    2010-09-07

    Yes,
    remove the jars in conflict. We need to change the configuration based on the app-server the developer deploy.

    bye,
    Lvc@

     
  • From what I can tell the appserv-rt.jar is the jar file in conflict.  When this jar is included in the project I see exceptions similar to the following.  I appears that some of the catalina/tomcat classes included in appserv-rt.jar are based on Tomcat 5 and they are conflicting with the libraries provided by Tomcat 6.  Is there a version of appserv-rt.jar that does not include these classes (as the tomcat container will provide them)

    15:18:49,546 ERROR  Error installing to Start: name=jboss.web.deployment:war=/WebRoma state=Create mode=Manual requiredState=Installed
    org.jboss.deployers.spi.DeploymentException: URL file:/C:/development/jboss-5.1.0.GA/server/rez1/tmp/5p51335p-zgusab-gdt58hlv-1-gdt58txw-10/WebRoma.war/ deployment failed
    at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
    at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:316)
    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:597)
    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:619)
    Caused by: LifecycleException:  Error initializaing :  javax.management.ReflectionException: Cannot find method addChild with this signature
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4150)
    at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
    … 66 more

     
  • here's a bit more information.  I've found that when creating a portlet project and removing portlet.jar I am able to successfully deploy to liferay 5.2.3 bundled with tomcat 6.  Once the server starts up, however, I cannot access any page in liferay.  No matter what page I try to visit, the following exception occurs.  I believe this is because there are classes in appserv-rt.jar (ie, com.sun.el.*) that are conflicting with classes provided by tomcat 6.  It would be helpful to have a version of appserv-rt.jar with these conflicts removed.

    javax.servlet.ServletException: java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:275)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:140)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:193)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:271)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.servlet.filters.threadlocalcache.ThreadLocalCacheFilter.processFilter(ThreadLocalCacheFilter.java:55)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
    org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)

    root cause

    java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
    org.apache.jasper.runtime.JspApplicationContextImpl.getExpressionFactory(JspApplicationContextImpl.java:80)
    org.apache.jsp.index_jsp._jspInit(Unknown Source)
    org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
    org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:140)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:193)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:271)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.servlet.filters.threadlocalcache.ThreadLocalCacheFilter.processFilter(ThreadLocalCacheFilter.java:55)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
    com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
    com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
    org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)