[infinispan-issues] [JBoss JIRA] (ISPN-7991) Compatibility between Rest and HotRod not working on both ways

Martin Gencur (JIRA) issues at jboss.org
Mon Jul 10 04:15:00 EDT 2017


    [ https://issues.jboss.org/browse/ISPN-7991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433278#comment-13433278 ] 

Martin Gencur edited comment on ISPN-7991 at 7/10/17 4:14 AM:
--------------------------------------------------------------

Option 1 is what I had in mind. I've tried it and it worked for me.
Steps to reproduce my behavior:
1) add no-arg constructor to StringMarshaller (https://github.com/infinispan/infinispan/blob/master/commons/src/main/java/org/infinispan/commons/marshall/StringMarshaller.java):
{code}
public StringMarshaller() {
     this.charset = Charset.forName("UTF-8");
}
{code}
2) deploy the compiled marshaller to the server and register it via
{code}
<compatibility enabled="true" marshaller="org.infinispan.commons.marshall.StringMarshaller"/>
{code}
3) register the marshaller in HotRod client: 
{code}
builder.marshaller(org.infinispan.commons.marshall.StringMarshaller.class)
{code}
4) put the data via REST: 
{code}
curl -v -u test:test -X POST -H 'Content-type: application/xml' -d @file.xml http://localhost:8080/rest/compat/1
{code}
5) read the data via HotRod:
{code}
cache.get("1")
{code}
I really get what I stored there, i.e. the XML.



was (Author: mgencur):
I've tried option 1) and it worked for me.
Steps to reproduce my behavior:
1) add no-arg constructor to org.infinispan.commons.marshall.StringMarshaller:
{code}
public StringMarshaller() {
     this.charset = Charset.forName("UTF-8");
}
{code}
2) deploy the compiled marshaller to the server and register it via
{code}
<compatibility enabled="true" marshaller="org.infinispan.commons.marshall.StringMarshaller"/>
{code}
3) register the marshaller in HotRod client: 
{code}
builder.marshaller(org.infinispan.commons.marshall.StringMarshaller.class)
{code}
4) put the data via 
{code}
curl -v -u test:test -X POST -H 'Content-type: application/xml' -d @file.xml http://localhost:8080/rest/compat/1
{code}
5) read the data a via HotRod:
{code}
cache.get("1")
{code}
I really get what I stored there, i.e. the XML.


> Compatibility between Rest and HotRod not working on both ways
> --------------------------------------------------------------
>
>                 Key: ISPN-7991
>                 URL: https://issues.jboss.org/browse/ISPN-7991
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 8.2.7.Final, 9.1.0.Beta1, 9.0.3.Final
>            Reporter: Gustavo Fernandes
>            Assignee: Gustavo Fernandes
>
> Writing via Hot Rod and reading via Rest works fine, but not the other way around



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the infinispan-issues mailing list