cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-7596) ClassNotFoundException: javax.net.SocketFactory not found by org.apache.cxf.cxf-rt-transports-http
Date Fri, 29 Dec 2017 00:50:00 GMT

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

ASF GitHub Bot commented on CXF-7596:
-------------------------------------

ffang closed pull request #362: [CXF-7596] Adding javax.net OSGI package import into HTTP
Transports …
URL: https://github.com/apache/cxf/pull/362
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/rt/transports/http/pom.xml b/rt/transports/http/pom.xml
index e5432d9a308..1c174d534bd 100644
--- a/rt/transports/http/pom.xml
+++ b/rt/transports/http/pom.xml
@@ -33,6 +33,7 @@
     <properties>
         <cxf.bundle.activator>org.apache.cxf.transport.http.osgi.HTTPTransportActivator</cxf.bundle.activator>
         <cxf.osgi.import>
+            javax.net,
             javax.servlet*;version="${cxf.osgi.javax.servlet.version}",
             org.apache.aries*;version="${cxf.aries.version.range}";resolution:=optional,
             org.springframework*;resolution:="optional";version="${cxf.osgi.spring.version}",


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> ClassNotFoundException: javax.net.SocketFactory not found by org.apache.cxf.cxf-rt-transports-http
> --------------------------------------------------------------------------------------------------
>
>                 Key: CXF-7596
>                 URL: https://issues.apache.org/jira/browse/CXF-7596
>             Project: CXF
>          Issue Type: Bug
>          Components: OSGi
>    Affects Versions: 3.2.1
>         Environment: I am running CXF OSGI Bundles in an Apache Felix framework.
>            Reporter: Mehmet Can Cömert
>            Assignee: Freeman Fang
>
> For my resource server, I am writing a custom OpenID interceptor and this interceptor
needs to communicate with OpenID server to get some information via HTTPS requests.
> HTTPS Communication triggered from the Input Interceptor with a CXF Web Client fails
due to a OSGI Wiring Problem.
> I have seen that "org.apache.cxf.cxf-rt-transports-http" Bundle Imports "javax.net.ssl"
> However an abstract class in the "javax.net" package (javax.net.SocketFactory) is tired
to be loaded as well.
> This causes a ClassNotFoundException since the "javax.net" package is not Imported in
MANIFEST.MF.
> If I add "javax.net" package to the Import-Package MANIFEST.MF file in the 
> org.apache.cxf.cxf-rt-transports-http.jar
> I do not get any ClassNotFoundException and GET request to HTTPS endpoint can be completed.
> This is the Exception Stack Trace:
> 2017-12-21T12:37:07.535Z ERROR [qtp2011886533-56|org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver:114]
Error occurred during error handling, give up!
> org.apache.cxf.interceptor.Fault: java.io.IOException: Error while initializing secure
socket
> 	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:75)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:374)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:332)
> 	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> 	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
> 	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
> 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
> 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
> 	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:191)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584)
> 	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
> 	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> 	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:534)
> 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
> 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
> 	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
> 	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
> 	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
> 	at java.lang.Thread.run(Thread.java:748)
> Caused by: javax.ws.rs.ProcessingException: java.io.IOException: Error while initializing
secure socket
> 	at org.apache.cxf.jaxrs.client.AbstractClient.checkClientException(AbstractClient.java:611)
> 	at org.apache.cxf.jaxrs.client.AbstractClient.preProcessResult(AbstractClient.java:587)
> 	at org.apache.cxf.jaxrs.client.WebClient.doResponse(WebClient.java:1114)
> 	at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1051)
> 	at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:897)
> 	at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:866)
> 	at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:431)
> 	at org.apache.cxf.jaxrs.client.SyncInvokerImpl.method(SyncInvokerImpl.java:135)
> 	at org.apache.cxf.jaxrs.client.SyncInvokerImpl.method(SyncInvokerImpl.java:130)
> 	at org.apache.cxf.jaxrs.client.SyncInvokerImpl.get(SyncInvokerImpl.java:50)
> 	at org.apache.cxf.jaxrs.client.spec.InvocationBuilderImpl.get(InvocationBuilderImpl.java:88)
> 	at com.helper.service.security.oauth2.impl.OAuth2HelperFactory.getEndpoints(OAuth2HelperFactory.java:211)
> 	at com.helper.service.security.oauth2.impl.OAuth2Helper.getPublicKey(OAuth2Helper.java:178)
> 	at com.helper.service.security.oauth2.impl.OAuth2Helper.authenticate(OAuth2Helper.java:139)
> 	at com.helper.bundle.rest.impl.dosgi.security.OpenIdAuthorizationInterceptor.handleMessage(OpenIdAuthorizationInterceptor.java:71)
> 	at org.apache.cxf.jaxrs.security.SimpleAuthorizingFilter.filter(SimpleAuthorizingFilter.java:39)
> 	at org.apache.cxf.jaxrs.utils.JAXRSUtils.runContainerRequestFilters(JAXRSUtils.java:1687)
> 	at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:201)
> 	at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> 	... 36 common frames omitted
> Caused by: java.io.IOException: Error while initializing secure socket
> 	at org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(HttpsURLConnectionFactory.java:104)
> 	at org.apache.cxf.transport.http.URLConnectionHTTPConduit.createConnection(URLConnectionHTTPConduit.java:122)
> 	at org.apache.cxf.transport.http.URLConnectionHTTPConduit.setupConnection(URLConnectionHTTPConduit.java:126)
> 	at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:504)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> 	at org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:683)
> 	at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1050)
> 	... 52 common frames omitted
> Caused by: java.lang.NoClassDefFoundError: javax/net/SocketFactory
> 	at org.apache.cxf.transport.https.HttpsURLConnectionFactory.decorateWithTLS(HttpsURLConnectionFactory.java:155)
> 	at org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(HttpsURLConnectionFactory.java:99)
> 	... 59 common frames omitted
> Caused by: java.lang.ClassNotFoundException: javax.net.SocketFactory not found by org.apache.cxf.cxf-rt-transports-http
[75]
> 	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1610)
> 	at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
> 	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> 	... 61 common frames omitted



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message