Bug 745814 (EDG-65) - memcached server module ClassCastException when accessing value put by InVM method
Summary: memcached server module ClassCastException when accessing value put by InVM m...
Keywords:
Status: CLOSED NOTABUG
Alias: EDG-65
Product: JBoss Data Grid 5
Classification: JBoss
Component: Infinispan
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: EAP 5.1.0 EDG TP
Assignee: Default User
QA Contact:
URL: http://jira.jboss.org/jira/browse/EDG-65
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-21 12:40 UTC by Michal Linhard
Modified: 2014-03-17 04:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-25 13:40:26 UTC
Type: Bug


Attachments (Terms of Use)
testbean1.zip (10.67 KB, application/zip)
2010-10-21 12:41 UTC, Michal Linhard
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EDG-65 0 Major Closed memcached server module ClassCastException when accessing value put by InVM method 2012-07-19 20:36:14 UTC

Description Michal Linhard 2010-10-21 12:40:45 UTC
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

Comment 1 Michal Linhard 2010-10-21 12:41:25 UTC
Attachment: Added: testbean1.zip


Comment 2 Galder Zamarreño 2010-10-25 13:40:25 UTC
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. 


Note You need to log in before you can comment on or make changes to this bug.