Hi,
We are using hibernate in our application. When we call configuration.buildSessionFactory(), internally , the hibernate apis create an instance of JCS. I am getting an NullPointerException here.
Error:
caused by java.lang.NullPointerException
at org.apache.jcs.config.OptionConverter.findAndSubst(OptionConverter.java:298)
at org.apache.jcs.config.OptionConverter.instantiateByKey(OptionConverter.java:186)
at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseElementAttributes(CompositeCacheConfigurator.java:371)
at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(CompositeCacheConfigurator.java:261)
at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(CompositeCacheConfigurator.java:243)
at org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheManager.java:356)
at org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheManager.java:315)
at org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheManager.java:308)
at org.apache.jcs.JCS.getInstance(JCS.java:103)
at net.sf.hibernate.cache.JCSCache.<init>(JCSCache.java:22)
at net.sf.hibernate.cache.JCSCacheProvider.buildCache(JCSCacheProvider.java:14)
at net.sf.hibernate.cfg.Configuration.configureCaches(Configuration.java:1013)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:717)
----------
I tried creating an instance of JCS outside my application by using a simple jsp(JCSTest.jsp). <b>code:</b> org.apache.jcs.JCS region = org.apache.jcs.JCS.getInstance("com.docent.lms.entities.reference.ReferenceAudience_T"); out.println(region);
Even in this case, I am getting NullPointerException.
<b>Error</b> java.lang.NullPointerException at org.apache.jcs.config.OptionConverter.findAndSubst(OptionConverter.java:298) at org.apache.jcs.config.OptionConverter.instantiateByKey(OptionConverter.java:186) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseElementAttributes(CompositeCacheConfigurator.java:371) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(CompositeCacheConfigurator.java:261) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(CompositeCacheConfigurator.java:243) at org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheManager.java:356) at org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheManager.java:315) at org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheManager.java:308) at org.apache.jcs.JCS.getInstance(JCS.java:103) at org.apache.jsp._JCSTest._jspService(_JCSTest.java:70)
What could be the problem here?. Is websphere appserver not supporting the JCS .
The above simple jsp works fine when I tried in Weblogic and JBoss app servers.
|