Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5284

CXF clients do not work in Eclipse RCP: Exception says BindingProvider interface not visible

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.7
    • 2.7.7, 3.0.0-milestone1
    • Core
    • None
    • Unknown

    Description

      When using CXF in Eclipse RCP there is there is a problem with CXF clients.

      When CXF creates the proxy using the ProxyHelper class it fails with the message that BindingProvider interface is not visible.

      In fact the BindingProvider interface is visible but the class created in ProxyHelper is not the same as the class BindingProvider.class given to the ProxyHelper.

      I was not able to reproduce the error outside of Eclipse RCP. I also tested with an extended DOSGi distro on pure Equinox without karaf. There like in Karaf the error did not happen.

      We made sure that the package javax.xml.ws is only exported once and that it is the version from servicemix bundles.

      When the error happens it seems that the incorrect BindingProvider.class is loaded by classloader null (the bootstrap classloader). So it seems on RCP the BindingProvider interface is also coming from the bootstrap classloader under these circumstances ... no idea why.

      In any case until recently we were able to work around the issue by importing the package javax.xml.ws in the bundle containing the service interface. This made sure that the classloader of this bundle was able to see the class and could be used on its own.
      Without the import the package was not visible to the bundle classloader of the user bundle and a proxy class loader was used and the problem occured.

      So I see two things we can do:
      1. Undo the change to move BindingProvider.class to the front of the interfaces in the call to ProxyHelper. This does not fully solve the problem but will enable the workaround again.
      2. Find the root problem which might be in equinox or even in the rcp code.

      In general it would also be great if we could avoid to create a proxy with interfaces that are invisible to the bundle but I am not sure if this can be done at all.

      Attachments

        Activity

          People

            cschneider Christian Schneider
            cschneider Christian Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: