XStream
  1. XStream
  2. XSTR-437

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
        Jörg 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
        Jörg 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
        Jörg Schaible added a comment -

        Closing issues before next release.

        Show
        Jörg Schaible added a comment - Closing issues before next release.

          People

          • Assignee:
            Jörg Schaible
            Reporter:
            Felix Mayer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: