OptimizedMarshaller doesn't work as well.

igniteConfig.setMarshaller(new OptimizedMarshaller());

On Mon, Jan 11, 2016 at 12:59 PM, Paulo Pires <[email protected]> wrote:

> The following does not work.
>
>     private void writeObject(ObjectOutputStream s)
>         throws IOException {
>         s.defaultWriteObject();
>     }
>
> On Mon, Jan 11, 2016 at 12:54 PM, Paulo Pires <[email protected]> wrote:
>
>> 1.5.0.final doesn't fix this. Is there a way I can use 1.5.0.final?
>>
>> On Mon, Dec 7, 2015 at 10:33 PM, Dmitriy Setrakyan <[email protected]
>> > wrote:
>>
>>> I absolutely agree with Valentin on this. We should make sure that we
>>> support Java serialization without any omissions. Can this be fixed quickly
>>> before 1.5 GA is out?
>>>
>>> D.
>>>
>>> On Mon, Dec 7, 2015 at 11:12 AM, Valentin Kulichenko <
>>> [email protected]> wrote:
>>>
>>>> Alex,
>>>>
>>>> I don't like this. I think both marshallers should behave in the same
>>>> way and this behavior should be consistent with Java serialization spec. I
>>>> hardly believe that classes like in Paulo's example will be used for
>>>> communication with .NET/C++. And I would prefer to have such restrictions
>>>> for interop, rather than for Java-only scenario.
>>>>
>>>> -Val
>>>>
>>>> On Mon, Dec 7, 2015 at 9:51 AM, Alexey Goncharuk <
>>>> [email protected]> wrote:
>>>>
>>>>> Paulo,
>>>>>
>>>>> After a closer look I see that BinaryMarshaller works the way it was
>>>>> designed to work. The issue is that your class implements Map and
>>>>> Serializable, but does not define writeObject(), that's why Ignite
>>>>> serializes it in the portable format discarding information about the
>>>>> custom user type (this way it can be read in other platforms - .NET and 
>>>>> C++)
>>>>>
>>>>> There are two ways to solve this. First is to set OptimizedMarshaller
>>>>> in configuration (this marshaller was the default marshaller in
>>>>> ignite-1.4). The second one would be to define writeObject() method in 
>>>>> your
>>>>> class which will call defaultWriteObject, like this:
>>>>>
>>>>>     private void writeObject(ObjectOutputStream s)
>>>>>         throws IOException {
>>>>>         s.defaultWriteObject();
>>>>>     }
>>>>>
>>>>> I am also curious what other community members think about current
>>>>> behavior.
>>>>>
>>>>> 2015-12-07 20:38 GMT+03:00 Paulo Pires <[email protected]>:
>>>>>
>>>>>> With 3fbf3e9 the issue is still there.
>>>>>>
>>>>>> On Mon, Dec 7, 2015 at 11:28 AM, Andrey Gura <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Paulo,
>>>>>>>
>>>>>>> I see commit with fix in master branch.
>>>>>>>
>>>>>>> commit 2564a556e353269d4adc58160512ed9d0a5979b4
>>>>>>> Author: Alexey Goncharuk <[email protected]>
>>>>>>> Date:   Tue Dec 1 17:37:41 2015 +0300
>>>>>>>
>>>>>>>     IGNITE-1695 - Fixed writing polymorphic types.
>>>>>>>
>>>>>>>
>>>>>>> Could you please make sure that you have codebase with this commit
>>>>>>> and repeat your test?
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Dec 7, 2015 at 1:37 PM, Paulo Pires <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Andrey,
>>>>>>>>
>>>>>>>> This is great news! While marked as fixed, it doesn't seem to have
>>>>>>>> hit the Github clone repo. Am I missing something? Would like to keep 
>>>>>>>> on
>>>>>>>> testing 1.5 before it gets released.
>>>>>>>>
>>>>>>>> Pires
>>>>>>>>
>>>>>>>> On Mon, Dec 7, 2015 at 10:22 AM, Andrey Gura <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Paulo,
>>>>>>>>>
>>>>>>>>> it is know issue (see JIRA ticket
>>>>>>>>> https://issues.apache.org/jira/browse/IGNITE-1695)
>>>>>>>>>
>>>>>>>>> The problem is fixed and fix will be included into nearest
>>>>>>>>> ignite-1.5 release.
>>>>>>>>>
>>>>>>>>> On Mon, Dec 7, 2015 at 2:32 AM, Paulo Pires <[email protected]>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I have the following class http://pastebin.com/QD4tmH29 and
>>>>>>>>>> while it works fine with 1.4.0 it is not working with 1.5 built from
>>>>>>>>>> source. The error is:
>>>>>>>>>>
>>>>>>>>>> java.lang.ClassCastException: java.util.HashMap cannot be cast to
>>>>>>>>>> xxx.DeviceSubscriptionFilterMap
>>>>>>>>>>
>>>>>>>>>> Ideas?
>>>>>>>>>> --
>>>>>>>>>> Cheers,
>>>>>>>>>> Pires
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Andrey Gura
>>>>>>>>> GridGain Systems, Inc.
>>>>>>>>> www.gridgain.com
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Cheers,
>>>>>>>> Pires
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Andrey Gura
>>>>>>> GridGain Systems, Inc.
>>>>>>> www.gridgain.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Cheers,
>>>>>> Pires
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>>
>> --
>> Cheers,
>> Pires
>>
>
>
>
> --
> Cheers,
> Pires
>



-- 
Cheers,
Pires

Reply via email to