2 Replies Latest reply on Apr 19, 2006 7:28 AM by jaikiran pai

    NullpointerException in FileCacheLoader

    jaikiran pai Master

      Hi,
      We were trying with setting up the FileCacheLoader through the treecache.xml and ran into a NullpointerException, the reason being that we had specified a filename in the location attribute instead of a directory name, something like the following:

      <attribute name="CacheLoaderConfig" replace="false">
      location=c:\\tmp\\filename.txt
      </attribute>


      I would have expected a ERROR message to be logged instead of NullpointerException being thrown.
      Following is the exception:
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:395)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: org.hibernate.cache.CacheException: java.lang.NullPointerException
      at org.hibernate.cache.TreeCacheProvider.start(TreeCacheProvider.java:58)
      at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:172)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
      at org.hibernate.jmx.HibernateService.buildSessionFactory(HibernateService.java:64)
      at org.hibernate.jmx.SessionFactoryStub.getImpl(SessionFactoryStub.java:82)
      at org.hibernate.jmx.SessionFactoryStub.openSession(SessionFactoryStub.java:70)
      at com.teradata.tap.system.persistence.SessionHandler.getHibernateSession(SessionHandler.ja
      ... 125 more
      Caused by: java.lang.NullPointerException
      at org.jboss.cache.loader.FileCacheLoader.getChildrenNames
      (FileCacheLoader.java:67)
      at org.jboss.cache.loader.AsyncCacheLoader.getChildrenNames(AsyncCacheLoader.java:73)
      at org.jboss.cache.TreeCache.preload(TreeCache.java:1794)
      at org.jboss.cache.TreeCache.cacheLoaderPreload(TreeCache.java:1749)
      at org.jboss.cache.TreeCache.startService(TreeCache.java:1263)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:172)
      at org.hibernate.cache.TreeCacheProvider.start(TreeCacheProvider.java:55)