[JBoss JIRA] (ISPN-9561) GlobalConfiguration should keep strong reference to classloader
by Gustavo Fernandes (Jira)
[ https://issues.jboss.org/browse/ISPN-9561?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes updated ISPN-9561:
------------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> GlobalConfiguration should keep strong reference to classloader
> ---------------------------------------------------------------
>
> Key: ISPN-9561
> URL: https://issues.jboss.org/browse/ISPN-9561
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 9.4.0.CR3
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 9.4.0.Final
>
>
> {{GlobalConfiguration}} uses a {{WeakReference}} to store its classloader, in order to allow {{JCachingProvider}} to use a {{WeakHashMap<ClassLoader, DefaultCacheManager>}}.
> The weak reference works fine when the classloader is the application classloader, but if the application (or the server, in our case) creates a {{ClassLoader}} instance just for the Infinispan configuration, that classloader can be garbage collected while the cache manager is starting. That is exactly what happens during server startup sometimes, making {{GlobalComponentRegistry}} use the TCCL for module initialization and ignoring all the non-core modules.
> We can still use a {{WeakClassLoader}} adapter that wraps a {{WeakReference<ClassLoader>}} for {{JCachingProvider}}.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 7 months
[JBoss JIRA] (ISPN-9563) Intermittent NPE when starting the server
by Gustavo Fernandes (Jira)
[ https://issues.jboss.org/browse/ISPN-9563?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes updated ISPN-9563:
------------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Intermittent NPE when starting the server
> -----------------------------------------
>
> Key: ISPN-9563
> URL: https://issues.jboss.org/browse/ISPN-9563
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Server
> Reporter: Gustavo Fernandes
> Assignee: Dan Berindei
> Priority: Blocker
>
> Sometime the server throws NPE when starting due to missing components in the internal component registry. One of the exceptions is:
> {noformat}
> 2018-09-27 14:14:43,163 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.datagrid-infinispan-endpoint.hotrod.hotrod-connector: org.jboss.msc.service.StartException in service jboss.datagrid-infinispan-endpoint.hotrod.hotrod-connector: DGENDPT10004: Failed to start HotRodServer
> at org.infinispan.server.endpoint.subsystem.ProtocolServerService.start(ProtocolServerService.java:160)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)
> at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NullPointerException
> at org.infinispan.counter.EmbeddedCounterManagerFactory.asCounterManager(EmbeddedCounterManagerFactory.java:28)
> at org.infinispan.server.hotrod.HotRodServer.startInternal(HotRodServer.java:236)
> at org.infinispan.server.hotrod.HotRodServer.startInternal(HotRodServer.java:108)
> at org.infinispan.server.core.AbstractProtocolServer.start(AbstractProtocolServer.java:79)
> at org.infinispan.server.endpoint.subsystem.SecurityActions$6.run(SecurityActions.java:136)
> at org.infinispan.server.endpoint.subsystem.SecurityActions$6.run(SecurityActions.java:133)
> at org.infinispan.security.Security.doPrivileged(Security.java:44)
> at org.infinispan.server.endpoint.subsystem.SecurityActions.doPrivileged(SecurityActions.java:42)
> at org.infinispan.server.endpoint.subsystem.SecurityActions.startProtocolServer(SecurityActions.java:140)
> at org.infinispan.server.endpoint.subsystem.ProtocolServerService.startProtocolServer(ProtocolServerService.java:194)
> at org.infinispan.server.endpoint.subsystem.ProtocolServerService.start(ProtocolServerService.java:152)
> ... 8 more
> {noformat}
> This was due to the fact that the {{ModuleLifecycle}} from the several modules in the server are sometimes simply ignored.
> The cause is a {{WeakReference<ClassLoader>}} present in {{org.infinispan.configuration.global.GlobalConfiguration}} that sometimes is {{null}} and when the GlobalConfigurationRegistry is started, the Classloader used will default to {{Thread.currentThread().getContextClassLoader()}} that cannot detect the Lifecycle implementations
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 7 months
[JBoss JIRA] (ISPN-8379) Support configuration wildcards
by Pedro Zapata (Jira)
[ https://issues.jboss.org/browse/ISPN-8379?page=com.atlassian.jira.plugin.... ]
Pedro Zapata updated ISPN-8379:
-------------------------------
Issue Type: Feature Request (was: Enhancement)
> Support configuration wildcards
> -------------------------------
>
> Key: ISPN-8379
> URL: https://issues.jboss.org/browse/ISPN-8379
> Project: Infinispan
> Issue Type: Feature Request
> Components: Configuration
> Reporter: Tristan Tarrant
> Assignee: Tristan Tarrant
> Priority: Major
> Fix For: 9.2.0.Alpha2, 9.2.0.Final
>
>
> Allow defining configuration names containing wildcards so that they are implicitly used for caches whose names match. This would be particularly useful for using templates with JCache which doesn't allow specifying additional configuration properties outside what is available in MutableConfiguration.
> Therefore, declaring a cache configuration such as:
> {code:xml}
> <invalidation-cache-configuration name="invalidation-*" />
> {code}
> and invoking:
> {code:java}
> cacheManager.getCache("invalidation-1");
> {code}
> would use the above configuration
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 7 months