You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jim Ma (Jira)" <ji...@apache.org> on 2020/11/20 09:48:00 UTC

[jira] [Created] (CXF-8378) NoClassDefFoundError: org/apache/cxf/common/util/ReflectionUtil from ReferencingAuthenticator

Jim Ma created CXF-8378:
---------------------------

             Summary: 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.4.1, 3.3.8
            Reporter: Jim Ma
            Assignee: Jim Ma
             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}

It looks this change https://github.com/apache/cxf/commit/58539be7c6367b0e7db354cd90467fe006ddef57  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)