Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.14
-
None
-
None
Description
Since the upgrade to Shindig 2.5.0-beta2, Rave's ROOT.war web archive can't be re-deployed to Tomcat without restarting the entire Tomcat process. It seems like it has to do with Shindig registering an EhCache class as an MBean, which apparently stays in the JVM between web context restarts, and Shindig doesn't seem to be removing it or handling that case properly.
This will affect any deployments of Rave in environments, for example, where you plan to use Tomcat's auto-deploy feature to only redeploy a web application without restarting the entire container (such as a CI environment).
HOW TO REPRODUCE
----------------------------------
1) Build and deploy Rave using the standard mvn install / mvn cargo:run commands
2) Force Tomcat to reload the web application by making a change the the ROOT.war file located in $RAVE_HOME/rave-portal/target/tomcat6x/webapps. Any easy way to do this is simply add a text file into the war.
3) Watch the Tomcat logs as the ROOT webapp reloads - you will eventually see the following error stack:
[WARNING] [talledLocalContainer] SEVERE: Exception starting filter authFilter
[WARNING] [talledLocalContainer] com.google.inject.ProvisionException: Guice provision errors:
[WARNING] [talledLocalContainer]
[WARNING] [talledLocalContainer] 1) Error injecting constructor, net.sf.ehcache.CacheException: javax.management.InstanceAlreadyExistsException: net.sf.ehcache:type=CacheManager,name=ShindigCM
[WARNING] [talledLocalContainer] at org.apache.shindig.common.cache.ehcache.EhCacheCacheProvider.<init>(EhCacheCacheProvider.java:75)
[WARNING] [talledLocalContainer] while locating org.apache.shindig.common.cache.ehcache.EhCacheCacheProvider
[WARNING] [talledLocalContainer] at org.apache.shindig.common.cache.ehcache.EhCacheModule.configure(EhCacheModule.java:32)
[WARNING] [talledLocalContainer] while locating org.apache.shindig.common.cache.CacheProvider
[WARNING] [talledLocalContainer] for parameter 1 at org.apache.shindig.expressions.Expressions.<init>(Expressions.java:79)
[WARNING] [talledLocalContainer] at org.apache.shindig.expressions.Expressions.class(Expressions.java:51)
[WARNING] [talledLocalContainer] while locating org.apache.shindig.expressions.Expressions
[WARNING] [talledLocalContainer] for parameter 4 at org.apache.shindig.config.JsonContainerConfig.<init>(JsonContainerConfig.java:63)
[WARNING] [talledLocalContainer] at org.apache.shindig.config.JsonContainerConfig.class(JsonContainerConfig.java:50)
[WARNING] [talledLocalContainer] while locating org.apache.shindig.config.JsonContainerConfig
[WARNING] [talledLocalContainer] while locating org.apache.shindig.config.ContainerConfig
[WARNING] [talledLocalContainer] for parameter 0 at org.apache.shindig.auth.DefaultSecurityTokenCodec.<init>(DefaultSecurityTokenCodec.java:53)
[WARNING] [talledLocalContainer] at org.apache.shindig.auth.DefaultSecurityTokenCodec.class(DefaultSecurityTokenCodec.java:53)
[WARNING] [talledLocalContainer] while locating org.apache.shindig.auth.DefaultSecurityTokenCodec
[WARNING] [talledLocalContainer] while locating org.apache.shindig.auth.SecurityTokenCodec
[WARNING] [talledLocalContainer] for parameter 0 at org.apache.shindig.auth.UrlParameterAuthenticationHandler.<init>(UrlParameterAuthenticationHandler.java:47)
[WARNING] [talledLocalContainer] while locating org.apache.shindig.auth.UrlParameterAuthenticationHandler
[WARNING] [talledLocalContainer] for parameter 1 at org.apache.shindig.social.core.oauth.AuthenticationHandlerProvider.<init>(AuthenticationHandlerProvider.java:40)
[WARNING] [talledLocalContainer] while locating org.apache.shindig.social.core.oauth.AuthenticationHandlerProvider
[WARNING] [talledLocalContainer] while locating java.util.List<org.apache.shindig.auth.AuthenticationHandler>
[WARNING] [talledLocalContainer] for parameter 0 at org.apache.shindig.auth.AuthenticationServletFilter.setAuthenticationHandlers(AuthenticationServletFilter.java:74)
[WARNING] [talledLocalContainer] while locating org.apache.shindig.auth.AuthenticationServletFilter
[WARNING] [talledLocalContainer]
[WARNING] [talledLocalContainer] 1 error
[WARNING] [talledLocalContainer] at com.google.inject.internal.Errors.throwProvisionExceptionIfErrorsExist(Errors.java:451)
[WARNING] [talledLocalContainer] at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:65)
[WARNING] [talledLocalContainer] at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:944)
[WARNING] [talledLocalContainer] at org.apache.shindig.common.servlet.InjectedFilter.init(InjectedFilter.java:47)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
[WARNING] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
[WARNING] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
[WARNING] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
[WARNING] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1385)
[WARNING] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
[WARNING] [talledLocalContainer] at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1389)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1653)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1662)
[WARNING] [talledLocalContainer] at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1642)
[WARNING] [talledLocalContainer] at java.lang.Thread.run(Thread.java:662)
[WARNING] [talledLocalContainer] Caused by: net.sf.ehcache.CacheException: javax.management.InstanceAlreadyExistsException: net.sf.ehcache:type=CacheManager,name=ShindigCM