[msgpack][JIRA] Created: (MSGPACK-79) Not able to deserialize derived class object

48 views
Skip to first unread message

muzammil (JIRA)

unread,
Jun 19, 2012, 7:17:47 AM6/19/12
to msgpa...@googlegroups.com
Not able to deserialize derived class object
--------------------------------------------

Key: MSGPACK-79
URL: http://jira.msgpack.org/browse/MSGPACK-79
Project: MessagePack
Issue Type: Task
Components: Java
Environment: MessagePack - CentOs - Eclipse 3.7
Reporter: muzammil
Assignee: FURUHASHI Sadayuki


public class A
{
private InnerClass obj;
//Some other variables with getters and setters.
// There will be a getter and setter for obj(InnerClass) aswell.
}
class InnerClass
{
//Some variables with getters and setters.
}
class InnerDerivedClass extends InnerClass
{
//some variables with getters and setters.
}

I like to serialize my java class object using Messagepack. My class structure is described above. What I like to do is to create the object for InnerDerivedClass and assign some values to it. Then I would add the object to the Class A as base class object.Now when I serialize and deserialize the Class A object with Messagepack I am not able to get the object as InnerDerivedClass object rather its comes as InnerClass obj. How can I achieve this using MessagePack. I am not using any annotations rather I register each class in the messagepack.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Muga Nishizawa (JIRA)

unread,
Jun 19, 2012, 10:50:45 PM6/19/12
to msgpa...@googlegroups.com

[ http://jira.msgpack.org/browse/MSGPACK-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10396#comment-10396 ]

Muga Nishizawa commented on MSGPACK-79:
---------------------------------------

Thank you for your report.

Could you give us a simple (or small) example that enables to reproduce the problem? We want to clarify your problem.

Thanks,
Muga Nishizawa

> Not able to deserialize derived class object
> --------------------------------------------
>
> Key: MSGPACK-79
> URL: http://jira.msgpack.org/browse/MSGPACK-79
> Project: MessagePack
> Issue Type: Task
> Components: Java
> Environment: MessagePack - CentOs - Eclipse 3.7
> Reporter: muzammil
> Assignee: FURUHASHI Sadayuki
> Labels: Java, pack/unpack, unserialize

muzammil (JIRA)

unread,
Jul 17, 2012, 5:58:49 AM7/17/12
to msgpa...@googlegroups.com

[ http://jira.msgpack.org/browse/MSGPACK-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10406#comment-10406 ]

muzammil commented on MSGPACK-79:
---------------------------------

Hi Muga Nishizawa. Can I plz know the status of the issue and when it will be solved?

> Not able to deserialize derived class object
> --------------------------------------------
>
> Key: MSGPACK-79
> URL: http://jira.msgpack.org/browse/MSGPACK-79
> Project: MessagePack
> Issue Type: Task
> Components: Java
> Environment: MessagePack - CentOs - Eclipse 3.7
> Reporter: muzammil
> Assignee: FURUHASHI Sadayuki
> Labels: Java, pack/unpack, unserialize

Muga Nishizawa (JIRA)

unread,
Jul 23, 2012, 1:58:45 AM7/23/12
to msgpa...@googlegroups.com

[ http://jira.msgpack.org/browse/MSGPACK-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10407#comment-10407 ]

Muga Nishizawa commented on MSGPACK-79:
---------------------------------------

Hi,

I'm trying to reproduce your problem with an attached program, named Main2.java. Its program was created according to your comment. I hit MessageTypeException that is caused by javassist.CannotCompileException.

Is it same as your problem? If not, please tell me your source code.


> Not able to deserialize derived class object
> --------------------------------------------
>
> Key: MSGPACK-79
> URL: http://jira.msgpack.org/browse/MSGPACK-79
> Project: MessagePack
> Issue Type: Task
> Components: Java
> Environment: MessagePack - CentOs - Eclipse 3.7
> Reporter: muzammil
> Assignee: Muga Nishizawa
> Labels: Java, pack/unpack, unserialize
> Attachments: Main2.java

muzammil (JIRA)

unread,
Jul 26, 2012, 10:29:45 AM7/26/12
to msgpa...@googlegroups.com

[ http://jira.msgpack.org/browse/MSGPACK-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10410#comment-10410 ]

muzammil commented on MSGPACK-79:
---------------------------------

Hi,

I had send the sample of my scenario in the attachment.

> Not able to deserialize derived class object
> --------------------------------------------
>
> Key: MSGPACK-79
> URL: http://jira.msgpack.org/browse/MSGPACK-79
> Project: MessagePack
> Issue Type: Task
> Components: Java
> Environment: MessagePack - CentOs - Eclipse 3.7
> Reporter: muzammil
> Assignee: Muga Nishizawa
> Labels: Java, pack/unpack, unserialize
> Attachments: Main2.java, msgpack.zip

Wolf-Dieter Mische (JIRA)

unread,
Aug 10, 2012, 10:56:11 AM8/10/12
to msgpa...@googlegroups.com

[ http://jira.msgpack.org/browse/MSGPACK-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10500#comment-10500 ]

Wolf-Dieter Mische commented on MSGPACK-79:
-------------------------------------------

I have the same issue. MspPack ignores my inheritance.

> Not able to deserialize derived class object
> --------------------------------------------
>
> Key: MSGPACK-79
> URL: http://jira.msgpack.org/browse/MSGPACK-79
> Project: MessagePack
> Issue Type: Task
> Components: Java
> Environment: MessagePack - CentOs - Eclipse 3.7
> Reporter: muzammil
> Assignee: Muga Nishizawa
> Labels: Java, pack/unpack, unserialize
> Attachments: Main2.java, msgpack.zip
>
>
Reply all
Reply to author
Forward
0 new messages