[infinispan-dev] NPE with legacy config in 5.2
Galder Zamarreño
galder at redhat.com
Thu Aug 30 04:32:06 EDT 2012
Alesj, create a JIRA to track these issues and assign it to Tristan since he's been reworking (much neeeded) cache store configuration.
Cheers,
On Aug 30, 2012, at 10:00 AM, Ales Justin wrote:
> Fixing that NPE, leads to another few lines later:
>
> Caused by: java.lang.NullPointerException
> at org.infinispan.configuration.cache.LegacyConfigurationAdaptor.getLoaderConfig(LegacyConfigurationAdaptor.java:292)
> at org.infinispan.configuration.cache.LegacyConfigurationAdaptor.adapt(LegacyConfigurationAdaptor.java:251)
> at org.infinispan.loaders.CacheLoaderManagerImpl.createCacheLoader(CacheLoaderManagerImpl.java:281)
> at org.infinispan.loaders.CacheLoaderManagerImpl.start(CacheLoaderManagerImpl.java:147)
> ... 22 more
>
> Need to see which legacy port is invalid in this commit:
> * https://github.com/alesj/jboss-as/commit/e1b73e018367ee7632d19ad383a7d8a83eb2e4da
>
> Any idea?
>
> On Aug 30, 2012, at 1:51 AM, Ales Justin <ales.justin at gmail.com> wrote:
>
>> I updated AS7 upstream master to run against Ispn upstream master.
>>
>> But now I get this NPE:
>>
>> I guess we should check for null "cacheLoader" here?
>>
>> private static CacheLoaderConfig getLoaderConfig(LoaderConfiguration loader, CacheLoader cacheLoader) {
>> if (cacheLoader.getClass().isAnnotationPresent(CacheLoaderMetadata.class)) { // << ----- HERE
>> return Util.getInstance(cacheLoader.getClass().getAnnotation(CacheLoaderMetadata.class).configurationClass());
>> } else {
>>
>>
>> ---
>>
>> 01:47:24,176 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 32) MSC00001: Failed to start service jboss.infinispan.capedwarf.dist: org.jboss.msc.service.StartException in service jboss.infinispan.capedwarf.dist: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.loaders.CacheLoaderManagerImpl.start() on object of type CacheLoaderManagerImpl
>> at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:87)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_33]
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_33]
>> at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_33]
>> at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]
>> Caused by: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.loaders.CacheLoaderManagerImpl.start() on object of type CacheLoaderManagerImpl
>> at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:238)
>> at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:889)
>> at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:639)
>> at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:628)
>> at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:531)
>> at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:174)
>> at org.infinispan.CacheImpl.start(CacheImpl.java:523)
>> at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:661)
>> at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:554)
>> at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:568)
>> at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:125)
>> at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:116)
>> at org.jboss.as.clustering.infinispan.subsystem.CacheService.start(CacheService.java:78)
>> at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:82)
>> ... 4 more
>> Caused by: org.infinispan.CacheException: Unable to start cache loaders
>> at org.infinispan.loaders.CacheLoaderManagerImpl.start(CacheLoaderManagerImpl.java:161)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [classes.jar:1.6.0_33]
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [classes.jar:1.6.0_33]
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [classes.jar:1.6.0_33]
>> at java.lang.reflect.Method.invoke(Method.java:597) [classes.jar:1.6.0_33]
>> at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:236)
>> ... 17 more
>> Caused by: java.lang.NullPointerException
>> at org.infinispan.configuration.cache.LegacyConfigurationAdaptor.getLoaderConfig(LegacyConfigurationAdaptor.java:286)
>> at org.infinispan.configuration.cache.LegacyConfigurationAdaptor.adapt(LegacyConfigurationAdaptor.java:251)
>> at org.infinispan.loaders.CacheLoaderManagerImpl.createCacheLoader(CacheLoaderManagerImpl.java:281)
>> at org.infinispan.loaders.CacheLoaderManagerImpl.start(CacheLoaderManagerImpl.java:147)
>> ... 22 more
>>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
More information about the infinispan-dev
mailing list