1 Reply Latest reply: Apr 15, 2013 1:58 PM by 1003171 RSS

    ClassNotFoundException: com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl

    1001382
      I updated JDK from 6 to 7 and our application is broken as show in the exception below. As I found out that in JDK7, jsse.jar did repackage com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl was repackaged to com.sun.net.ssl.SSLSocketFactoryImpl and that is why cause ClassNotFoundException. My code (in highlight) did not reference the class directly. Any advise on fixing this issue will be appreciated.



      Exception naming Exception = fidVirtualDir-QA.fmr.com:2491null
      Exception naming Exception = fidVirtualDir-QA.fmr.com:2491java.net.SocketException: java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
      javax.naming.CommunicationException: fidVirtualDir-QA.fmr.com:2491 [Root exception is java.net.SocketException: java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl]
           at com.sun.jndi.ldap.Connection.<init>(Connection.java:214)
           at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:136)
           at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1600)
           at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2698)
           at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:316)
           at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:193)
           at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:211)
           at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154)
           at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84)
           at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
           at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
           at javax.naming.InitialContext.init(InitialContext.java:242)
           at javax.naming.InitialContext.<init>(InitialContext.java:216)
           at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)
           at fmtc.common.util.DirAuthService.ldapBind(DirAuthService.java:103)          
      at com.pyramis.security.acl.internal.FMTCUser.basicAuthentication(FMTCUser.java:297)
           at com.pyramis.security.acl.internal.FMTCUser.authenticate(FMTCUser.java:283)
           at com.pyramis.security.realm.JDBCRealm.authentication(JDBCRealm.java:199)
           at com.pyramis.security.realm.JDBCRealm.getUser(JDBCRealm.java:189)
           at com.pyramis.security.service.PSECServicesBean.authenticate(PSECServicesBean.java:226)
           at com.pyramis.security.service.PSECServicesBean.authenticate(PSECServicesBean.java:276)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:601)
           at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:203)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)
           at com.pyramis.security.advice.MethodProfilingInterceptor.invoke(MethodProfilingInterceptor.java:85)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
           at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
           at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:53)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
           at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
           at com.sun.proxy.$Proxy22.authenticate(Unknown Source)
           at fmtc.security.ws.FSECWebServiceImpl.authenticate(FSECWebServiceImpl.java:125)
           at fmtc.security.ws.FSECWebService.authenticate(FSECWebService.java:111)
           at fmtc.security.ws.FSECWebService$$FastClassByCGLIB$$e89c62e8.invoke(<generated>)
           at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
           at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:714)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)
           at com.pyramis.security.advice.MethodProfilingInterceptor.invoke(MethodProfilingInterceptor.java:85)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
           at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:51)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
           at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:53)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
           at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:652)
           at fmtc.security.ws.FSECWebService$$EnhancerByCGLIB$$faaea86b.authenticate(<generated>)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:601)
           at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:246)
           at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
           at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
           at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
           at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
           at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
           at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
           at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
           at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
           at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:471)
           at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
           at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
           at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)
           at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)
           at com.sun.xml.ws.transport.http.servlet.WSSpringServlet.doPost(WSSpringServlet.java:52)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
           at java.lang.Thread.run(Thread.java:722)
      Caused by: java.net.SocketException: java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
           at javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:198)
           at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:211)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:601)
           at com.sun.jndi.ldap.Connection.createSocket(Connection.java:331)
           at com.sun.jndi.ldap.Connection.<init>(Connection.java:201)
           ... 83 more
      Caused by: java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
           at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
           at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
           at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
           at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:104)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:601)
           at com.sun.jndi.ldap.Connection.createSocket(Connection.java:287)
           ... 84 more