[
https://issues.jboss.org/browse/ISPN-6548?page=com.atlassian.jira.plugin....
]
Pedro Ruivo updated ISPN-6548:
------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 9.0.0.Alpha3
Resolution: Done
Newer version of Weld SE throw exceptions during shutdown
---------------------------------------------------------
Key: ISPN-6548
URL:
https://issues.jboss.org/browse/ISPN-6548
Project: Infinispan
Issue Type: Bug
Components: CDI Integration
Affects Versions: 8.2.1.Final
Reporter: Sebastian Łaskawiec
Assignee: Sebastian Łaskawiec
Priority: Critical
Fix For: 9.0.0.Alpha3
When using newer versions of Weld SE (2.3.x), during shutdown an exception is thrown:
{code}
Exception in thread "Thread-1" org.infinispan.jmx.JmxDomainConflictException:
ISPN000034: There's already a JMX MBean instance
type=CacheManager,name="CDIExtensionDefaultCacheManager" already registered
under 'org.infinispan' JMX domain. If you want to allow multiple instances
configured with same JMX domain enable 'allowDuplicateDomains' attribute in
'globalJmxStatistics' config element
at org.infinispan.jmx.JmxUtil.buildJmxDomain(JmxUtil.java:52)
at
org.infinispan.jmx.CacheManagerJmxRegistration.updateDomain(CacheManagerJmxRegistration.java:79)
at
org.infinispan.jmx.CacheManagerJmxRegistration.buildRegistrar(CacheManagerJmxRegistration.java:73)
at
org.infinispan.jmx.AbstractJmxRegistration.registerMBeans(AbstractJmxRegistration.java:37)
at
org.infinispan.jmx.CacheManagerJmxRegistration.start(CacheManagerJmxRegistration.java:41)
at org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:657)
at
org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:232)
at
org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:209)
at
org.infinispan.cdi.DefaultEmbeddedCacheManagerProducer.getDefaultEmbeddedCacheManager(DefaultEmbeddedCacheManagerProducer.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88)
at
org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78)
at
org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:99)
at
org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:161)
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:181)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
at
org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
at
org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
at
org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
at
org.infinispan.manager.BasicCacheContainer$CacheContainer$EmbeddedCacheManager$Lifecycle$Listenable$112368021$Proxy$_$$_WeldClientProxy.toString(Unknown
Source)
at java.lang.String.valueOf(String.java:2982)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at
org.infinispan.cdi.util.Reflections.buildInvokeMethodErrorMessage(Reflections.java:87)
at org.infinispan.cdi.util.Reflections.invokeMethod(Reflections.java:203)
at org.infinispan.cdi.util.Reflections.invokeMethod(Reflections.java:126)
at org.infinispan.cdi.util.InjectableMethod.invoke(InjectableMethod.java:153)
at org.infinispan.cdi.util.InjectableMethod.invoke(InjectableMethod.java:110)
at
org.infinispan.cdi.util.defaultbean.DefaultProducerMethod.destroy(DefaultProducerMethod.java:42)
at
org.jboss.weld.util.bean.IsolatedForwardingBean.destroy(IsolatedForwardingBean.java:50)
at
org.jboss.weld.context.AbstractContext.destroyContextualInstance(AbstractContext.java:147)
at org.jboss.weld.context.AbstractContext.destroy(AbstractContext.java:161)
at org.jboss.weld.context.AbstractSharedContext.destroy(AbstractSharedContext.java:61)
at
org.jboss.weld.context.AbstractSharedContext.invalidate(AbstractSharedContext.java:56)
at org.jboss.weld.bootstrap.WeldRuntime.shutdown(WeldRuntime.java:56)
at org.jboss.weld.bootstrap.WeldBootstrap.shutdown(WeldBootstrap.java:113)
at org.jboss.weld.environment.se.WeldContainer.shutdown(WeldContainer.java:237)
at org.jboss.weld.environment.se.WeldContainer$ShutdownHook.run(WeldContainer.java:276)
{code}
Most probably cause:
{code}
at
org.infinispan.cdi.util.Reflections.buildInvokeMethodErrorMessage(Reflections.java:87)
at org.infinispan.cdi.util.Reflections.invokeMethod(Reflections.java:203)
at org.infinispan.cdi.util.Reflections.invokeMethod(Reflections.java:126)
at org.infinispan.cdi.util.InjectableMethod.invoke(InjectableMethod.java:153)
at org.infinispan.cdi.util.InjectableMethod.invoke(InjectableMethod.java:110)
at
org.infinispan.cdi.util.defaultbean.DefaultProducerMethod.destroy(DefaultProducerMethod.java:42)
{code}
It seems our error handling code tries to print out an {{EmbeddedCacheManager}} argument
which causes creating another instance.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)