You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "S. Ali Tokmen (JIRA)" <ji...@apache.org> on 2011/03/14 20:23:29 UTC

[jira] Commented: (CXF-3184) SOAPBindingUtil.getProxy can't load right class in OSGi

    [ https://issues.apache.org/jira/browse/CXF-3184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006585#comment-13006585 ] 

S. Ali Tokmen commented on CXF-3184:
------------------------------------

This issue being critical on many OSGi systems, would it be possible to release a CXF version 2.2.13 ?

Thank you

> SOAPBindingUtil.getProxy can't load right class in OSGi
> -------------------------------------------------------
>
>                 Key: CXF-3184
>                 URL: https://issues.apache.org/jira/browse/CXF-3184
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.2.12, 2.3.1
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.3.2, 2.2.13, 2.4
>
>
> As a fix for CXF-3143 SOAPBindingUtil.getProxy uses now thread context classloader.
> This causes the following problem:
> {code}
> Caused by: java.lang.IllegalArgumentException: interface org.apache.cxf.tools.common.extensions.soap.SoapBinding is not visible from class loader
> 	at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
> 	at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
> 	at org.apache.cxf.tools.util.SOAPBindingUtil.getProxy(SOAPBindingUtil.java:87)
> 	at org.apache.cxf.tools.util.SOAPBindingUtil.getSoapBinding(SOAPBindingUtil.java:274)
> 	at org.apache.cxf.tools.util.SOAPBindingUtil.createSoapBinding(SOAPBindingUtil.java:426)
> 	at org.apache.cxf.binding.soap.SoapBindingFactory.createSoapBinding(SoapBindingFactory.java:190)
> 	at org.apache.cxf.binding.soap.SoapBindingFactory.createBindingInfo(SoapBindingFactory.java:175)
> 	at org.apache.cxf.binding.AbstractBindingFactory.createBindingInfo(AbstractBindingFactory.java:80)
> 	at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:360)
> 	at org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:160)
> 	at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:257)
> 	at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:145)
> 	at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:105)
> 	at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:177)
> 	at com.sabre.gateway.g2g.G2GInConnector.&lt;init&gt;(G2GInConnector.java:105)
> 	at com.sabre.gateway.g2g.G2GInConnector.&lt;init&gt;(G2GInConnector.java:76)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> 	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
> {code}
> To avoid it we would to set context classloader to CXF bundle one before calling CXF code that causes this exception or import the cxf packages in our bundle and set context classloader to our bundle's one. 
> Both solutions look like workarounds.
> We need to make the SOAPBindingUtil.getProxy more smart to load  the class.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira