[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [jira] [Comment Edited] (LANG-1049) SerializationUtils.deserialize() can not be used within OSGi
From:       "Marcus Klein (JIRA)" <jira () apache ! org>
Date:       2015-10-30 8:11:27
Message-ID: JIRA.12748032.1413293548000.105575.1446192687768 () Atlassian ! JIRA
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/LANG-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14982098#comment-14982098 \
] 

Marcus Klein edited comment on LANG-1049 at 10/30/15 8:11 AM:
--------------------------------------------------------------

First you told me, that you don't want to implement this. Then you ignored this issue \
for a whole year. Are you sure, that somebody can wait in this agile world to get \
something solved for a whole year?

We solved the problem in October 2014 by using plain Java:

byte[] bytes = reader.readByteArray();
bais = new ByteArrayInputStream(bytes);
ois = new ObjectInputStream(bais);
Object object = ois.readObject();

This even works in OSGi, because the ClassLoader of the ObjectInputStream is aware of \
the classes to deserialize because we use for that bundle buddy class loading. \
Replacing this four lines with SerializationUtils.deserialize() is no convenience any \
more when class loading kludge is needed. Sorry.


was (Author: marcus.klein):
First you told me, that you don't want to implement this. Then you ignored this issue \
for a whole year. Are you sure, that somebody can wait in this agile world to get \
something solved for a whole year?

We solved the problem in October 2014 by using plain Java:

byte[] bytes = reader.readByteArray();
bais = new ByteArrayInputStream(bytes);
ois = new ObjectInputStream(bais);
Object object = ois.readObject();

This even works in OSGi, because the ClassLoader of the ObjectInputStream is aware of \
the classes to deserialize because we use for that bundle buddy class loading. \
Replacing this four lines with SerializationUtils.deserialize() is no convenience any \
more when class loading kludge is needed.

> SerializationUtils.deserialize() can not be used within OSGi
> ------------------------------------------------------------
> 
> Key: LANG-1049
> URL: https://issues.apache.org/jira/browse/LANG-1049
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 2.6
> Environment: Equinox
> Reporter: Marcus Klein
> Priority: Blocker
> 
> SerializationUtils.deserialize() throws a SerializationException if objects should \
> be deserialized that can not be resolved by OSGi classloader of \
> org.apache.commons.lang bundle. To solve this problem I suggest to allow buddy \
> classloading within commons.lang to allow other bundles to register their class \
> loaders. Please add
> Eclipse-BuddyPolicy: registered
> to the MANIFEST.MF of commons.lang to solve this problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic