XStream

CompositeClassLoader does not find classes in dependent OSGi bundles in Eclipse

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2.2
  • Fix Version/s: 1.3
  • Component/s: Core
  • Labels:
    None
  • JDK version and platform:
    1.5.0_11

Description

The current configuration of the CompositeClassLoader cannot find classes in OSGi bundles that depend on the bundle that loaded the XStream JAR, since it only looks there in the bootstrap loader. With a line of code like this

((CompositeClassLoader) this.stream.getClassLoader()).add( getClass().getClassLoader() );

I was able to work around the issue, but I would like to suggest a solution that does it out of the box:

Method Annotations.configureAliases() (or something it calls) could add the ClassLoaders of the configured classes to the CompositeClassLoader, thereby ensuring that they can be loaded later.

Activity

Hide
Joerg Schaible added a comment -

XStream uses internally no longer a static cache for all the examined classes. This should solve the issue. You may give the head revision a try.

Show
Joerg Schaible added a comment - XStream uses internally no longer a static cache for all the examined classes. This should solve the issue. You may give the head revision a try.
Hide
Joerg Schaible added a comment -

Closing issues before next release.

Show
Joerg Schaible added a comment - Closing issues before next release.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: