1

I'm trying to deploy Infinispan cluster where each node running embedded HotRod server :

new HotRodServer().start(new  HotRodServerConfigurationBuilder().host("10.1.1.6").port(11322).build(),
            new DefaultCacheManager("infinispan.xml"));

client :

remoteCache = new RemoteCacheManager().getCache("myCache");

client cfg:

infinispan.client.hotrod.server_list=10.1.1.6:11322

The problem is that remoteCache is empty although I'm sure the JPA loader defined in infinispan.xml does it's work and I see positive entities count in jconsole for myCache entry.

Am I missing something ?

Another question : how do I expose REST endpoint on HotRod server started this way ?

dependencies :

'org.infinispan:infinispan-server-hotrod:5.3.0.Final',
'org.infinispan:infinispan-core:5.3.0.Final',
'org.infinispan:infinispan-cachestore-jpa:5.3.0.Final',
'org.infinispan:infinispan-client-hotrod:5.3.0.Final',

Thanks

Alexander.Furer
  • 1,817
  • 1
  • 16
  • 24
  • How do you check that the server is empty? Retrieving the keys directly, or via keySet? Via size? – Radim Vansa Dec 16 '13 at 13:53
  • And for REST, you have to start REST server. – Radim Vansa Dec 16 '13 at 13:53
  • I checked via size and explicit get. Size returned me -1, and get - null for the object I'm sure is there – Alexander.Furer Dec 16 '13 at 14:31
  • I just tried to get keySet and got org.infinispan.CacheException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: Class cannot be casted to array. Looks like this is marshalling issue : I load cache with JPALoader and getting the cache with remote client. How do I make sure I use the same marshaller on both sides ? – Alexander.Furer Dec 16 '13 at 14:31
  • Could you try to setup TRACE logging on org.infinispan for both server and client? – Radim Vansa Dec 17 '13 at 08:56
  • I posted a working example of an embedded HotRod server [here](http://stackoverflow.com/a/29732615/880772). You have a second question, that should be in another post. – approxiblue Jul 14 '15 at 00:12

0 Answers0