0 Replies Latest reply: Apr 20, 2012 4:52 PM by vadimk RSS

JBoss 5.1.0-GA CacheManager is NULL when trying to get from JNDI

vadimk Newbie

I'm trying to setup our application to run in Cluster, so we need to convert local cache to a distributed cache.

I'm trying to use JBossCache available in the "ALL" deployment profile.

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.

 

When I go to JMX Console I can see CacheManager and my own custom cache started successfully.

 

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.

 

If I use CacheManagerLocator, which does the same thing under the covers, it throws IllegalStateException: CacheManager not found.

 

I looked at many different posts and tried their suggestions, such as

-moving my application to deploy.last folder

-adding <depends>CacheManager</depends> to jboss-web.xml

 

Nothing works....

 

 

I'm running JBoss 5.1.0GA on Windows 7 64bit machine. Any help will be greatly appreciated...

 

Vadim