0 Replies Latest reply on Jan 27, 2014 10:57 PM by kishorer

    Null Pointer Exception occured during shutdown , Infinispan Running in Karaf container (osgi)

    kishorer

      Hi

       

      We have created a osgi bundle which has all the required dependencies as embed dependencies in the osgi bundle.

       

      when we configured infinispan in replicated mode all the bundles comeup successfully but when we try to shutdown the container we are seeing the following exception. we noticed that it is happening because of the classloader and for the log4-core dependency

       

      Exception

      $admin@sss>shutdown

      Confirm: shutdown instance root (yes/no):

      $admin@dsp>Exception in thread "Thread-49" java.lang.NullPointerException

              at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432)

              at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)

              at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

              at org.apache.logging.log4j.core.LoggerContext.stop(LoggerContext.java:199)

              at org.apache.logging.log4j.core.LoggerContext$ShutdownThread.run(LoggerContext.java:418)



      Pom.xml:

      <Embed-Dependency>infinispan-core,infinispan-jcache,infinispan-cdi,infinispan-client-hotrod,infinispan-commons,infinispan-query-dsl,infinispan-remote-query-client,protostream,org.apache.servicemix.bundles.avro,cdi-api,javax.interceptor-api,jgroups,jboss-marshalling,jboss-marshalling-river,rhq-pluginAnnotations,jboss-logging,

                                  log4j-core, disruptor, staxmapper</Embed-Dependency>

       

       

      Source Code:

       

      when we create the jsr cache manager for replicated mode we use the following

      this.cacheManager = this.cacheProvider.getCacheManager(configURI,

                          Thread.currentThread().getContextClassLoader());

       

       

      Appreciate your help. Let me know if this is a known issue if anyone come across the problem.or need more information

       

      Thanks

      Kishore