You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Colm O hEigeartaigh (Jira)" <ji...@apache.org> on 2021/01/04 09:47:04 UTC
[jira] [Closed] (CXF-8378) NoClassDefFoundError:
org/apache/cxf/common/util/ReflectionUtil from ReferencingAuthenticator
[ https://issues.apache.org/jira/browse/CXF-8378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Colm O hEigeartaigh closed CXF-8378.
------------------------------------
> NoClassDefFoundError: org/apache/cxf/common/util/ReflectionUtil from ReferencingAuthenticator
> ---------------------------------------------------------------------------------------------
>
> Key: CXF-8378
> URL: https://issues.apache.org/jira/browse/CXF-8378
> Project: CXF
> Issue Type: Bug
> Components: Transports
> Affects Versions: 3.3.8, 3.4.1
> Reporter: Jim Ma
> Assignee: Jim Ma
> Priority: Major
> Fix For: 3.4.2, 3.3.9
>
>
> After upgrade to 3.3.8 ,there is some not backward compatible change cause this error :
> {noformat}
> java.lang.NoClassDefFoundError: org/apache/cxf/common/util/ReflectionUtil
> at org.apache.cxf.transport.http.ReferencingAuthenticator.tryWith(ReferencingAuthenticator.java:125)
> at org.apache.cxf.transport.http.ReferencingAuthenticator.getPasswordAuthentication(ReferencingAuthenticator.java:58)
> at java.net.Authenticator.requestPasswordAuthentication(Authenticator.java:317)
> at sun.net.www.protocol.http.HttpURLConnection$1.run(HttpURLConnection.java:453)
> at sun.net.www.protocol.http.HttpURLConnection$1.run(HttpURLConnection.java:448)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.net.www.protocol.http.HttpURLConnection.privilegedRequestPasswordAuthentication(HttpURLConnection.java:447)
> at sun.net.www.protocol.http.HttpURLConnection.getServerAuthentication(HttpURLConnection.java:2439)
> at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1737)
> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
> at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
> at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream$2.run(URLConnectionHTTPConduit.java:377)
> at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream$2.run(URLConnectionHTTPConduit.java:373)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:373)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1597)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1625)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1570)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1371)
> at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671)
> at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
> at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
> at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
> {noformat}
> After debug some code, it looks after this change https://github.com/apache/cxf/commit/58539be7c6367b0e7db354cd90467fe006ddef57 it requires *ReferencingAuthenticator* to load another class *ReflectionUtil*. But *ReferencingAuthenticator* is loaded with a special classloader :
> {code:java}
> new URLClassLoader(new URL[0], ClassLoader.getSystemClassLoader()
> {code}
> which to aovid the classloader leakage issue described in https://issues.apache.org/jira/browse/CXF-4529. This special classloader always fail to load this new added *ReflectionUtil* class.
> .
--
This message was sent by Atlassian Jira
(v8.3.4#803005)