JBoss Developer: Message List - JBoss 5.1.0-GA CacheManager is NULL when trying to get from JNDIMost recent forum messageshttps://developer.jboss.org/community/jbosscache?view=discussionsJive Engage2012-04-20T20:52:02Z2012-04-20T20:52:02ZenJBoss 5.1.0-GA CacheManager is NULL when trying to get from JNDIvadimk/people/vadimkdo-not-reply@jboss.com2012-04-20T20:52:02Z2012-04-20T20:52:02Z<!-- [DocumentBodyStart:68e5c260-f573-4b6d-ba25-b6cab0faf483] --><div class="jive-rendered-content"><p>I'm trying to setup our application to run in Cluster, so we need to convert local cache to a distributed cache. </p><p>I'm trying to use JBossCache available in the "ALL" deployment profile. </p><p>Documentation is pretty straight forward and I was able to add my custom cache to jboss-cache-manager-jboss-beans.xml file and even "eagerStarted" it. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>When I go to JMX Console I can see CacheManager and my own custom cache started successfully. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>The problem is that when I try to get CacheManager in my service from JNDI as ctx.lookup("java:CacheManager") it returns null. I'm not getting NamingException, just null.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>If I use CacheManagerLocator, which does the same thing under the covers, it throws IllegalStateException: CacheManager not found. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>I looked at many different posts and tried their suggestions, such as </p><p>-moving my application to deploy.last folder</p><p>-adding &lt;depends&gt;CacheManager&lt;/depends&gt; to jboss-web.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Nothing works....</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>I'm running JBoss 5.1.0GA on Windows 7 64bit machine. Any help will be greatly appreciated...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>Vadim</p></div><!-- [DocumentBodyEnd:68e5c260-f573-4b6d-ba25-b6cab0faf483] --><img src='/beacon?t=1438547990369' />2012-04-20T20:52:02Z3 years 3 months ago0