Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-67078

Strip off opensocial-portlet's dependency to junit

    Details

      Description

      This is a work around fix, a formal fix should be done at the wab generator bnd processing level.

      The issue was discovered on CI, where we randomly ran into tomcat shutdown failure which said we are trying to access ehcaches after they have been destroyed.

      The following is a captured error stack during shutdown from CI log:

          [junit] 11:38:00,887 ERROR [Refresh Thread: Equinox Container: 9022ff77-fe44-0016-189d-95b82cfa3906][HotDeployImpl:120] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error unregistering plugins for classic-theme
          [junit] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error unregistering plugins for classic-theme
          [junit] 	at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:38)
          [junit] 	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.invokeUndeploy(PluginPackageHotDeployListener.java:80)
          [junit] 	at com.liferay.portal.deploy.hot.HotDeployImpl.fireUndeployEvent(HotDeployImpl.java:117)
          [junit] 	at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireUndeployEvent(HotDeployUtil.java:32)
          [junit] 	at com.liferay.portal.kernel.servlet.PluginContextListener.fireUndeployEvent(PluginContextListener.java:169)
          [junit] 	at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalDestroy(PluginContextListener.java:132)
          [junit] 	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalDestroy(BasePortalLifecycle.java:31)
          [junit] 	at com.liferay.portal.kernel.servlet.PluginContextListener.contextDestroyed(PluginContextListener.java:97)
          [junit] 	at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter.contextDestroyed(ServletContextListenerExceptionAdapter.java:38)
          [junit] 	at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration.destroy(ListenerRegistration.java:72)
          [junit] 	at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.removedService(ContextListenerTrackerCustomizer.java:100)
          [junit] 	at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.removedService(ContextListenerTrackerCustomizer.java:1)
          [junit] 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:967)
          [junit] 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1)
          [junit] 	at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
          [junit] 	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:909)
          [junit] 	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
          [junit] 	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
          [junit] 	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
          [junit] 	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
          [junit] 	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
          [junit] 	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
          [junit] 	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:222)
          [junit] 	at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.destroyListeners(WabBundleProcessor.java:323)
          [junit] 	at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.destroy(WabBundleProcessor.java:106)
          [junit] 	at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStop(WebBundleDeployer.java:129)
          [junit] 	at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.destroy(WabFactory.java:156)
          [junit] 	at org.apache.felix.utils.extender.AbstractExtender$2.run(AbstractExtender.java:290)
          [junit] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          [junit] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          [junit] 	at org.apache.felix.utils.extender.AbstractExtender.destroyExtension(AbstractExtender.java:312)
          [junit] 	at org.apache.felix.utils.extender.AbstractExtender.bundleChanged(AbstractExtender.java:186)
          [junit] 	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:905)
          [junit] 	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
          [junit] 	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
          [junit] 	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
          [junit] 	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
          [junit] 	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
          [junit] 	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
          [junit] 	at org.eclipse.osgi.container.Module.publishEvent(Module.java:461)
          [junit] 	at org.eclipse.osgi.container.Module.doStop(Module.java:619)
          [junit] 	at org.eclipse.osgi.container.Module.stop(Module.java:483)
          [junit] 	at org.eclipse.osgi.container.ModuleContainer.unresolve0(ModuleContainer.java:841)
          [junit] 	at org.eclipse.osgi.container.ModuleContainer.unresolve(ModuleContainer.java:755)
          [junit] 	at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:953)
          [junit] 	at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)
          [junit] 	at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
          [junit] 	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
          [junit] 	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
          [junit] Caused by: java.lang.IllegalStateException: The com.liferay.portal.kernel.dao.orm.FinderCache.com.liferay.journal.model.impl.JournalArticleResourceImpl.List2 Cache is not alive (STATUS_SHUTDOWN)
          [junit] 	at net.sf.ehcache.Cache$CacheStatus.checkAlive(Cache.java:4064)
          [junit] 	at net.sf.ehcache.Cache.checkStatus(Cache.java:2755)
          [junit] 	at net.sf.ehcache.Cache.removeAll(Cache.java:2488)
          [junit] 	at net.sf.ehcache.Cache.removeAll(Cache.java:2474)
          [junit] 	at com.liferay.portal.cache.ehcache.internal.EhcachePortalCache.removeAll(EhcachePortalCache.java:78)
          [junit] 	at com.liferay.portal.kernel.cache.transactional.TransactionalPortalCacheHelper$UncommittedBuffer.commitTo(TransactionalPortalCacheHelper.java:289)
          [junit] 	at com.liferay.portal.kernel.cache.transactional.TransactionalPortalCacheHelper.commit(TransactionalPortalCacheHelper.java:151)
          [junit] 	at com.liferay.portal.kernel.cache.transactional.TransactionalPortalCacheHelper$1.committed(TransactionalPortalCacheHelper.java:69)
          [junit] 	at com.liferay.portal.kernel.transaction.TransactionLifecycleManager.fireTransactionCommittedEvent(TransactionLifecycleManager.java:33)
          [junit] 	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.commit(DefaultTransactionExecutor.java:66)
          [junit] 	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:93)
          [junit] 	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          [junit] 	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
          [junit] 	at com.sun.proxy.$Proxy246.destroyServiceComponent(Unknown Source)
          [junit] 	at com.liferay.portal.kernel.service.ServiceComponentLocalServiceUtil.destroyServiceComponent(ServiceComponentLocalServiceUtil.java:272)
          [junit] 	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.destroyServiceComponent(PluginPackageHotDeployListener.java:90)
          [junit] 	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.doInvokeUndeploy(PluginPackageHotDeployListener.java:165)
          [junit] 	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.invokeUndeploy(PluginPackageHotDeployListener.java:77)
          [junit] 	... 47 more
      

      This is partly locally reproducable with the following steps:

      1. ant all
      2. copy the 4 jars under $LIFERAY_HOME/osgi/test to $LIFERAY_HOME/osgi/modules (this step must happen before 3))
      3. start tomcat
      4. after tomcat is fully up, remove $LIFERAY_HOME/osgi/modules/com.liferay.portal.test.jar

      The expected behavior is:

      22:14:39,979 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/modules][BundleStartStopLogger:38] STOPPED com.liferay.portal.test_1.0.1 [170]
      22:14:40,073 INFO  [Refresh Thread: Equinox Container: 809438a7-b347-0016-19f9-b92dcde6caef][BundleStartStopLogger:38] STOPPED com.liferay.portal.test.integration_1.0.1 [448]
      22:14:40,077 INFO  [Refresh Thread: Equinox Container: 809438a7-b347-0016-19f9-b92dcde6caef][BundleStartStopLogger:38] STOPPED com.liferay.dynamic.data.mapping.test.util_2.1.1 [274]
      22:14:40,079 INFO  [Refresh Thread: Equinox Container: 809438a7-b347-0016-19f9-b92dcde6caef][BundleStartStopLogger:38] STOPPED com.liferay.portal.cache.test.util_1.1.1 [264]
      22:14:40,204 INFO  [Refresh Thread: Equinox Container: 809438a7-b347-0016-19f9-b92dcde6caef][BundleStartStopLogger:35] STARTED com.liferay.portal.test.integration_1.0.1 [448]
      

      The actual behavior is:

      22:02:55,295 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/modules][BundleStartStopLogger:38] STOPPED com.liferay.portal.test_1.0.1 [170]
      22:02:55,476 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][ThemeHotDeployListener:152] Unregistering themes for user-profile-theme
      22:02:55,479 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][ThemeHotDeployListener:184] 1 theme for user-profile-theme was unregistered
      11-Jul-2016 22:02:55.482 INFO [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
      22:02:55,485 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][PluginPackageUtil:1006] Reading plugin package for user-profile-theme
      22:02:55,535 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][BundleStartStopLogger:38] STOPPED user-profile-theme_7.0.1 [519]
      22:02:55,581 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][ThemeHotDeployListener:152] Unregistering themes for admin-theme
      22:02:55,582 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][ThemeHotDeployListener:184] 1 theme for admin-theme was unregistered
      11-Jul-2016 22:02:55.583 INFO [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
      22:02:55,585 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][PluginPackageUtil:1006] Reading plugin package for admin-theme
      22:02:55,639 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][BundleStartStopLogger:38] STOPPED admin-theme_7.0.1 [518]
      22:02:55,679 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][ThemeHotDeployListener:152] Unregistering themes for classic-theme
      22:02:55,680 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][ThemeHotDeployListener:184] 1 theme for classic-theme was unregistered
      11-Jul-2016 22:02:55.682 INFO [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
      22:02:55,682 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][PluginPackageUtil:1006] Reading plugin package for classic-theme
      22:02:55,724 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][BundleStartStopLogger:38] STOPPED classic-theme_7.0.1 [517]
      22:02:56,002 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][PortletHotDeployListener:364] Unregistering portlets for opensocial-portlet
      22:02:56,056 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][PortletHotDeployListener:399] 4 portlets for opensocial-portlet were unregistered
      22:02:56,139 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][HookHotDeployListener:601] Hook for opensocial-portlet was unregistered
      11-Jul-2016 22:02:56.141 INFO [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
      22:02:56,311 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][PluginPackageUtil:1006] Reading plugin package for opensocial-portlet
      22:02:56,339 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][BundleStartStopLogger:38] STOPPED opensocial-portlet_7.0.0.5 [516]
      22:02:56,385 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][ThemeHotDeployListener:152] Unregistering themes for user-dashboard-theme
      22:02:56,386 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][ThemeHotDeployListener:184] 1 theme for user-dashboard-theme was unregistered
      11-Jul-2016 22:02:56.387 INFO [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
      22:02:56,387 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][PluginPackageUtil:1006] Reading plugin package for user-dashboard-theme
      22:02:56,425 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][BundleStartStopLogger:38] STOPPED user-dashboard-theme_7.0.1 [515]
      22:02:56,455 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][ThemeHotDeployListener:152] Unregistering themes for product-app-theme
      22:02:56,456 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][ThemeHotDeployListener:184] 1 theme for product-app-theme was unregistered
      11-Jul-2016 22:02:56.458 INFO [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
      22:02:56,458 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][PluginPackageUtil:1006] Reading plugin package for product-app-theme
      22:02:56,494 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][BundleStartStopLogger:38] STOPPED product-app-theme_7.0.1 [514]
      22:02:56,497 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][BundleStartStopLogger:38] STOPPED com.liferay.portal.test.integration_1.0.1 [448]
      22:02:56,501 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][BundleStartStopLogger:38] STOPPED com.liferay.dynamic.data.mapping.test.util_2.1.1 [274]
      22:02:56,503 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][BundleStartStopLogger:38] STOPPED com.liferay.portal.cache.test.util_1.1.1 [264]
      22:02:56,505 INFO  [Refresh Thread: Equinox Container: b030c188-af47-0016-1ce2-fc5b487dc4ef][BundleStartStopLogger:38] STOPPED com.liferay.portal.remote.axis.extender_1.0.2 [118]
      22:02:57,049 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/modules][BundleStartStopLogger:35] STARTED com.liferay.portal.test.integration_1.0.1 [448]
      22:02:57,078 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][BundleStartStopLogger:35] STARTED com.liferay.portal.remote.axis.extender_1.0.2 [118]
      22:02:57,080 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][BundleStartStopLogger:35] STARTED product-app-theme_7.0.1 [514]
      22:02:58,473 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HotDeployImpl:226] Deploying product-app-theme from queue
      22:02:58,475 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][PluginPackageUtil:1006] Reading plugin package for product-app-theme
      11-Jul-2016 22:02:58.479 INFO [fileinstall-/opt/liferay-portal-trunk/osgi/war] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
      22:02:58,489 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][ThemeHotDeployListener:94] Registering themes for product-app-theme
      22:02:58,646 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][ThemeHotDeployListener:109] 1 theme for product-app-theme is available for use
      22:02:59,050 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][BundleStartStopLogger:35] STARTED user-dashboard-theme_7.0.1 [515]
      22:02:59,371 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HotDeployImpl:226] Deploying user-dashboard-theme from queue
      22:02:59,372 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][PluginPackageUtil:1006] Reading plugin package for user-dashboard-theme
      11-Jul-2016 22:02:59.375 INFO [fileinstall-/opt/liferay-portal-trunk/osgi/war] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
      22:02:59,379 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][ThemeHotDeployListener:94] Registering themes for user-dashboard-theme
      22:02:59,522 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][ThemeHotDeployListener:109] 1 theme for user-dashboard-theme is available for use
      22:02:59,702 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][BundleStartStopLogger:35] STARTED opensocial-portlet_7.0.0.5 [516]
      22:03:00,183 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HotDeployImpl:226] Deploying opensocial-portlet from queue
      22:03:00,183 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][PluginPackageUtil:1006] Reading plugin package for opensocial-portlet
      11-Jul-2016 22:03:00.198 INFO [fileinstall-/opt/liferay-portal-trunk/osgi/war] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
      22:03:02,380 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:477] Registering hook for opensocial-portlet
      22:03:02,394 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_ar.properties
      22:03:02,395 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_bg.properties
      22:03:02,399 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_cs.properties
      22:03:02,399 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_da.properties
      22:03:02,404 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_el.properties
      22:03:02,412 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_et.properties
      22:03:02,413 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_eu.properties
      22:03:02,413 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_fa.properties
      22:03:02,422 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_gl.properties
      22:03:02,426 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_hr.properties
      22:03:02,431 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_in.properties
      22:03:02,431 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_it.properties
      22:03:02,440 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_ko.properties
      22:03:02,441 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_lo.properties
      22:03:02,441 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_lt.properties
      22:03:02,441 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_nb.properties
      22:03:02,460 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_pl.properties
      22:03:02,469 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_ro.properties
      22:03:02,470 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_ru.properties
      22:03:02,470 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_sk.properties
      22:03:02,470 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_sl.properties
      22:03:02,478 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_sv.properties
      22:03:02,479 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_tr.properties
      22:03:02,479 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_uk.properties
      22:03:02,479 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:1191] Ignoring content/Language_vi.properties
      22:03:02,487 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HookHotDeployListener:553] Hook for opensocial-portlet is available for use
      22:03:02,601 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][PortletHotDeployListener:202] Registering portlets for opensocial-portlet
      22:03:03,643 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][PortletHotDeployListener:336] 4 portlets for opensocial-portlet are available for use
      22:03:05,487 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][BundleStartStopLogger:35] STARTED admin-theme_7.0.1 [518]
      22:03:05,797 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HotDeployImpl:226] Deploying admin-theme from queue
      22:03:05,797 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][PluginPackageUtil:1006] Reading plugin package for admin-theme
      11-Jul-2016 22:03:05.800 INFO [fileinstall-/opt/liferay-portal-trunk/osgi/war] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
      22:03:05,804 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][ThemeHotDeployListener:94] Registering themes for admin-theme
      22:03:05,920 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][ThemeHotDeployListener:109] 1 theme for admin-theme is available for use
      22:03:06,041 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][BundleStartStopLogger:35] STARTED user-profile-theme_7.0.1 [519]
      22:03:06,347 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HotDeployImpl:226] Deploying user-profile-theme from queue
      22:03:06,348 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][PluginPackageUtil:1006] Reading plugin package for user-profile-theme
      11-Jul-2016 22:03:06.351 INFO [fileinstall-/opt/liferay-portal-trunk/osgi/war] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
      22:03:06,355 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][ThemeHotDeployListener:94] Registering themes for user-profile-theme
      22:03:06,480 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][ThemeHotDeployListener:109] 1 theme for user-profile-theme is available for use
      22:03:06,599 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][BundleStartStopLogger:35] STARTED classic-theme_7.0.1 [517]
      22:03:06,921 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][HotDeployImpl:226] Deploying classic-theme from queue
      22:03:06,922 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][PluginPackageUtil:1006] Reading plugin package for classic-theme
      11-Jul-2016 22:03:06.925 INFO [fileinstall-/opt/liferay-portal-trunk/osgi/war] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
      22:03:07,009 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][ThemeHotDeployListener:94] Registering themes for classic-theme
      22:03:07,130 INFO  [fileinstall-/opt/liferay-portal-trunk/osgi/war][ThemeHotDeployListener:109] 1 theme for classic-theme is available for use
      

      Those wab theme bundles get reloaded just because the com.liferay.portal.test.jar got removed.

      The root issue is inside modules/apps/opensocial/opensocial-portlet module. When wab generator processes the opensocial-portlet.war, it generates a "junit.framework;resolution:=optional" import which is most likely due to some inner jars it bundled with. In normal production mode everything will be fine, due to no one will be exporting the junit.framework package. But it will cause issue in the test mode, as com.liferay.portal.test.jar exports that package.

      This will bind opensocial wab bundle to portal test bundle. And enlarging portal test bundle's dependency closure to:

      [com.liferay.dynamic.data.mapping.test.util_2.1.1 [274], user-profile-theme_7.0.1 [519], com.liferay.portal.test.integration_1.0.1 [448], com.liferay.portal.cache.test.util_1.1.1 [264], admin-theme_7.0.1 [518], com.liferay.portal.remote.axis.extender_1.0.2 [118], com.liferay.portal.test_1.0.1 [170], classic-theme_7.0.1 [517], user-dashboard-theme_7.0.1 [515], product-app-theme_7.0.1 [514], com.liferay.test.module.dependency.closure.test_1.0.0 [521], opensocial-portlet_7.0.0.5 [516]]
      

      Therefore on removing portal test bundle, the whole dependency closure needs to be refreshed (due to the junit.framework is only optional, not required.)

      On CI, the shutdown logic is:

      1. call shutdown.sh
      2. clean up the previously deployed test jars (those 4 jars from osgi/test)

      Due to shutdown.sh is an async operation, there is a good chance we end up removing the test jars before tomcat is fully shutdown. Therefore triggering a round of wab theme bundles reloading while portal is shutting down. Then there will be a good chance that we try to access ehcaches after they got destroyed.

      In the general rules, production modules must never have any sort of dependency on test modules. The fix here is only explicitly removing junit.framework import from wab generator bnd processed result.
      A proper fix should be done as: wab generator bnd processing logic prevents any test dependency being listed out in the first place.

        Attachments

          Activity

            People

            • Assignee:
              linda.sui Linda Sui
              Reporter:
              shuyang.zhou Shuyang Zhou
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 22 weeks, 2 days ago

                Packages

                Version Package
                7.0.0 DXP FP1
                7.0.2 CE GA3
                7.0.0 DXP SP1
                7.0.3 CE GA4
                7.1.X
                Master