Hide Forgot
project_key: EDG extract testbean1.zip project mvn install run EAP datagrid profile mvn jboss:deploy the TestBean1 loads value "InfinispanRESTServerTestBean1_key1" -> "data" via InVM method telnet localhost 11211 get InfinispanRESTServerTestBean1_key1 SERVER_ERROR org.infinispan.server.core.ServerException: java.lang.ClassCastException: java.lang.String cannot be cast to org.infinispan.server.memcached.MemcachedValue this is caused by line 70 in http://anonsvn.jboss.org/repos/infinispan/tags/4.1.0.FINAL/server/memcached/src/main/scala/org/infinispan/server/memcached/MemcachedDecoder.scala where the returned value is always expected to be MemcachedValue
Attachment: Added: testbean1.zip
You can always get a CCE if you try to access contents in a way that it's not designed to do so and we can't control the casting that it's done on the client side. We can't help either if a client passes a key of a different type and it's not in the cache. Only generics, can help here but it's down to the client. Currently Memcached or Hot Rod servers are not designed to be sharing contents with in-VM code, although this is actually workable if clients are smart enough, see what in-VM client could do to check Hot Rod contents: http://community.jboss.org/docs/DOC-15985. However, even if we implement ISPN-706, all we'd be doing would be to hide internal details and do the marshalling/unmarshalling for the client.