1 Reply Latest reply on Apr 18, 2006 11:16 AM by Steve Moyer

    Deployment differences between exploded and unexploded EARs

    Steve Moyer Newbie

      I searched around but couldn't find a direct answer to how the deployment process differs when an EAR is exploded vs. unexploded. I have my first portlet project patterned after the HelloWorldPortlet which behaves differently depending on how it is deployed.

      If I deploy it as an "Enterprise Archive", I get the following error:

      13:30:32,303 INFO [EARDeployer] Init J2EE application: file:/usr/local/jboss-portal-2.2.1RC3-bundled/server/default/deploy/portlettest.ear
      13:30:32,430 INFO [TomcatDeployer] deploy, ctxPath=/portlettest, warUrl=.../tmp/deploy/tmp54604portlettest.ear-contents/portlettest-exp.war/
      13:30:33,213 INFO [JBossCacheManager] init(): replicationGranularity_ is 0 and invaldateSessionPolicy is 2
      13:30:33,215 ERROR [JBossCacheService] jboss.cache:service=TomcatClusteringCache service to Tomcat clustering not found
      13:30:33,216 ERROR [JBossCacheManager] JBossCacheService to Tomcat clustering not found
      13:30:33,217 ERROR [TomcatDeployer] Failed to setup clustering, clustering disabled
      13:30:33,479 ERROR [PortletWebApp] An error occured when the portlet started
      org.jboss.portal.portlet.PortletInitializationException: Portlet class not found portlettest.PortletTestPortlet
       at org.jboss.portal.portlet.PortletContainer.start(PortletContainer.java:249)
       at org.jboss.portal.portlet.PortletWebApp.startService(PortletWebApp.java:112)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
       at org.jboss.portal.common.system.AbstractJBossService.start(AbstractJBossService.java:86)
       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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:991)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
       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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:287)
       at $Proxy119.start(Unknown Source)
       at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.create(PortletAppDeployment.java:139)
       at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfo$DeploymentContext.create(PortalDeploymentInfo.java:196)
       at org.jboss.portal.server.deployment.jboss.ServerDeployer.create(ServerDeployer.java:229)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
       at sun.reflect.GeneratedMethodAccessor654.invoke(Unknown Source)
       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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
       at $Proxy106.deploy(Unknown Source)
       at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:298)
       at sun.reflect.GeneratedMethodAccessor662.invoke(Unknown Source)
       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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
       at $Proxy82.deploy(Unknown Source)
       at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:62)
       at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:152)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
       at $Proxy107.handleNotification(Unknown Source)
       at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
       at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)
       at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
       at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:485)
       at sun.reflect.GeneratedMethodAccessor658.invoke(Unknown Source)
       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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
       at $Proxy89.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
       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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
       at $Proxy8.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:522)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:218)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:197)
      Caused by: java.lang.ClassNotFoundException: portlettest.PortletTestPortlet
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1338)
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1187)
       at org.jboss.portal.portlet.PortletContainer.start(PortletContainer.java:225)
       ... 106 more
      13:30:34,116 INFO [EARDeployer] Started J2EE application: file:/usr/local/jboss-portal-2.2.1RC3-bundled/server/default/deploy/portlettest.ear


      If I explode the EAR and deploy it, the portlet works but I do get a couple (obviously non-fatal) errors like this:

      org.jboss.deployment.DeploymentInfo@1f52fcb9 { url=file:/usr/local/jboss-portal-2.2.1RC3-bundled/server/default/deploy/portlettest-ear/META-INF/MANIFEST.MF }
       deployer: null
       status: null
       state: INIT_WAITING_DEPLOYER
       watch: file:/usr/local/jboss-portal-2.2.1RC3-bundled/server/default/deploy/portlettest-ear/META-INF/MANIFEST.MF
       altDD: null
       lastDeployed: 1145367242090
       lastModified: 1145367242000
       mbeans:
      
      org.jboss.deployment.DeploymentInfo@f4902a7a { url=file:/usr/local/jboss-portal-2.2.1RC3-bundled/server/default/deploy/portlettest-ear/META-INF/application.xml }
       deployer: null
       status: null
       state: INIT_WAITING_DEPLOYER
       watch: file:/usr/local/jboss-portal-2.2.1RC3-bundled/server/default/deploy/portlettest-ear/META-INF/application.xml
       altDD: null
       lastDeployed: 1145367242133
       lastModified: 1145367242000
       mbeans:
      


      Can someone point me to a reference regarding the different deployment mechanisms (or explain them to me)? What am I missing that I'm still getting the odd deploy-time messages with the exploded EAR?

      Thanks for you help!