CXF
  1. CXF
  2. CXF-3021

Try to remove a wsdl4J dependency from the JAXRS frontend

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 3.0.0-milestone1
    • Component/s: JAX-RS
    • Labels:
      None

      Description

      HTTP Transport and API modules depend strongly at runtime on javax.wsdl.* (wsdl4j)

      1. cxf3021.patch
        5 kB
        Sergey Beryozkin
      2. cxf3021-2.patch
        29 kB
        Sergey Beryozkin

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        45d 2h 22m 1 Sergey Beryozkin 17/Nov/10 23:05
        Resolved Resolved Reopened Reopened
        1d 35m 2 Sergey Beryozkin 08/Feb/11 18:58
        Closed Closed Reopened Reopened
        21d 21h 39m 1 Sergey Beryozkin 10/May/11 11:29
        Reopened Reopened Resolved Resolved
        916d 16h 49m 3 Daniel Kulp 14/Jun/13 15:13
        Resolved Resolved Closed Closed
        165d 3h 30m 2 Daniel Kulp 26/Nov/13 17:39
        Daniel Kulp made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Daniel Kulp made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Assignee Sergey Beryozkin [ sergey_beryozkin ] Daniel Kulp [ dkulp ]
        Fix Version/s 3.0.0 [ 12323927 ]
        Resolution Fixed [ 1 ]
        Hide
        Sergey Beryozkin added a comment -

        Hi - it appears that works in a non-Spring case, but with Spring we are getting some early resolution happening. Actually - I think I know what is happening,
        can you please add
        "factory.setTransportId("http://cxf.apache.org/transports/http");"

        that should avoid the early loading, please confirm when you get a chance, as I'm keen now to close this JIRA
        thanks

        Show
        Sergey Beryozkin added a comment - Hi - it appears that works in a non-Spring case, but with Spring we are getting some early resolution happening. Actually - I think I know what is happening, can you please add "factory.setTransportId("http://cxf.apache.org/transports/http");" that should avoid the early loading, please confirm when you get a chance, as I'm keen now to close this JIRA thanks
        Daniel Kulp made changes -
        Fix Version/s 2.4 [ 12315386 ]
        Sergey Beryozkin made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Hide
        Sergey Beryozkin added a comment -

        it may be a regression - unfortunately I don't have tests on the trunk - more investigation is needed

        Show
        Sergey Beryozkin added a comment - it may be a regression - unfortunately I don't have tests on the trunk - more investigation is needed
        Hide
        Travis Finch added a comment -

        Recently upgraded from CXF 2.2.12 to 2.4 for our JAX-RS server. We are using embedded Jetty 7.3.1.

        I tried to remove wsdl4j from our server-side dependency list, but server fails when launching. Here is the stack trace:

        !ENTRY org.eclipse.osgi 4 0 2011-05-04 00:10:34.897
        !MESSAGE Application error
        !STACK 1
        java.lang.NoClassDefFoundError: javax/wsdl/extensions/ElementExtensible
        at java.lang.Class.getDeclaredFields0(Native Method)
        at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
        at java.lang.Class.getField0(Class.java:2618)
        at java.lang.Class.getField(Class.java:1518)
        at org.apache.cxf.transport.TransportFinder$3.loadBean(TransportFinder.java:200)
        at org.apache.cxf.bus.extension.ExtensionManagerImpl.loadBeansOfType(ExtensionManagerImpl.java:267)
        at org.apache.cxf.transport.TransportFinder.loadDefaultURIs(TransportFinder.java:212)
        at org.apache.cxf.transport.TransportFinder.findTransportForURI(TransportFinder.java:81)
        at org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFactoryForUri(DestinationFactoryManagerImpl.java:132)
        at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.createEndpointInfo(AbstractJAXRSFactoryBean.java:125)
        at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.createEndpoint(AbstractJAXRSFactoryBean.java:207)
        at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:147)
        at com.vmware.vide.ws.WsServer.start(WsServer.java:167)

        From WsServer:

        164: JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean();
        165: factory.setResourceProviders(providers);
        166: factory.setAddress("http://0.0.0.0:8080/");
        167: Server server = factory.create();

        If I add wsdl4j back, everything works find with 2.4. I compared the patch attached to this issue with the 2.4 source, and it does not look like the entire patch was applied.

        Any ideas?

        Show
        Travis Finch added a comment - Recently upgraded from CXF 2.2.12 to 2.4 for our JAX-RS server. We are using embedded Jetty 7.3.1. I tried to remove wsdl4j from our server-side dependency list, but server fails when launching. Here is the stack trace: !ENTRY org.eclipse.osgi 4 0 2011-05-04 00:10:34.897 !MESSAGE Application error !STACK 1 java.lang.NoClassDefFoundError: javax/wsdl/extensions/ElementExtensible at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2291) at java.lang.Class.getField0(Class.java:2618) at java.lang.Class.getField(Class.java:1518) at org.apache.cxf.transport.TransportFinder$3.loadBean(TransportFinder.java:200) at org.apache.cxf.bus.extension.ExtensionManagerImpl.loadBeansOfType(ExtensionManagerImpl.java:267) at org.apache.cxf.transport.TransportFinder.loadDefaultURIs(TransportFinder.java:212) at org.apache.cxf.transport.TransportFinder.findTransportForURI(TransportFinder.java:81) at org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFactoryForUri(DestinationFactoryManagerImpl.java:132) at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.createEndpointInfo(AbstractJAXRSFactoryBean.java:125) at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.createEndpoint(AbstractJAXRSFactoryBean.java:207) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:147) at com.vmware.vide.ws.WsServer.start(WsServer.java:167) From WsServer: 164: JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean(); 165: factory.setResourceProviders(providers); 166: factory.setAddress("http://0.0.0.0:8080/"); 167: Server server = factory.create(); If I add wsdl4j back, everything works find with 2.4. I compared the patch attached to this issue with the 2.4 source, and it does not look like the entire patch was applied. Any ideas?
        Daniel Kulp made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Sergey Beryozkin made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 2.4 [ 12315386 ]
        Fix Version/s 2.4.1 [ 12316354 ]
        Resolution Fixed [ 1 ]
        Hide
        Sergey Beryozkin added a comment -

        This issue has been fixed, sorry, only clients accessing HttpConduit.getClient() will need it - some thinking is needed how to drop that dependency. CXF JAX-RS wiki has been updated too, wsdl4j dep is still included (for the clients to work) but can be excluded on the server side

        Show
        Sergey Beryozkin added a comment - This issue has been fixed, sorry, only clients accessing HttpConduit.getClient() will need it - some thinking is needed how to drop that dependency. CXF JAX-RS wiki has been updated too, wsdl4j dep is still included (for the clients to work) but can be excluded on the server side
        Daniel Kulp made changes -
        Fix Version/s 2.4.1 [ 12316354 ]
        Fix Version/s 2.4 [ 12315386 ]
        Mark Thomas made changes -
        Workflow jira [ 12522128 ] Default workflow, editable Closed status [ 12605065 ]
        Sergey Beryozkin made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Sergey Beryozkin added a comment -

        HttpConduit still needs on the client side -> HttpClientPolicy

        Show
        Sergey Beryozkin added a comment - HttpConduit still needs on the client side -> HttpClientPolicy
        Sergey Beryozkin made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Sergey Beryozkin made changes -
        Attachment cxf3021-2.patch [ 12459938 ]
        Hide
        Sergey Beryozkin added a comment -

        1. Basic EndpointReferenceType utility code is moved to WSAEndpointReferenceTypeUtils, with EndpointReferenceTypeUtils delegating to it.

        2. Non-WSDL code in AbstractBindingFactory has been pushed to AbstractBaseEndpointFactory which AbstractBindingFactory extends

        3. Last resort catch statements have been put in HTTP transport around HttpPolicy and Address extensions which are linked to javax.wsdl.ExtensibilityElement : this is the least ideal piece of this patch - with the rationale being that the relevant code is only making sense in WSDL-first developments

        Show
        Sergey Beryozkin added a comment - 1. Basic EndpointReferenceType utility code is moved to WSAEndpointReferenceTypeUtils, with EndpointReferenceTypeUtils delegating to it. 2. Non-WSDL code in AbstractBindingFactory has been pushed to AbstractBaseEndpointFactory which AbstractBindingFactory extends 3. Last resort catch statements have been put in HTTP transport around HttpPolicy and Address extensions which are linked to javax.wsdl.ExtensibilityElement : this is the least ideal piece of this patch - with the rationale being that the relevant code is only making sense in WSDL-first developments
        Sergey Beryozkin made changes -
        Summary Remove the dependency on WSDLEndpointFactory from AbstractHttpTransportFactory Try to remove a wsdl4J dependency from the JAXRS frontend
        Description AbstractHttpDestinationFactory implements WSDLEndpointFactory, the side-effect is that a CXF JAXRS bundle strongly depends on wsdl4j HTTP Transport and API modules depend strongly at runtime on javax.wsdl.* (wsdl4j)
        Component/s JAX-RS [ 12311911 ]
        Component/s Transports [ 12311342 ]
        Sergey Beryozkin made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Sergey Beryozkin made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Sergey Beryozkin [ sergey_beryozkin ]
        Fix Version/s 2.4 [ 12315386 ]
        Resolution Fixed [ 1 ]
        Sergey Beryozkin made changes -
        Field Original Value New Value
        Attachment cxf3021.patch [ 12459718 ]
        Hide
        Sergey Beryozkin added a comment -

        This patch removes a javax.wsdl.Port reference from WSDLEndpointFactory interface

        Show
        Sergey Beryozkin added a comment - This patch removes a javax.wsdl.Port reference from WSDLEndpointFactory interface
        Sergey Beryozkin created issue -

          People

          • Assignee:
            Daniel Kulp
            Reporter:
            Sergey Beryozkin
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development