SSLContext NoSuchAlgorithmException in WebLogic 6.1

I am having difficulties using the JSSE 1.0.2 extension in WebLogic Server (WLS) 6.1. Basically, I'm migrating from WLS 5.1, where the code worked fine.

My situation is that I have a servlet that is acting as an HTTPS client, making an SSL socket connection to a different server.

-start code-

//Enable the SSL Provider

String prevHandler =

System.setProperty("java.protocol.handler.pkgs",

"com.sun.net.ssl.internal.www.protocol");

int jsseInclude = Security.addProvider(

new com.sun.net.ssl.internal.ssl.Provider());

//Inspect the Provider list here

//Initalize Static SSL objects

SSLContext mySSLContext = SSLContext.getInstance("SSL");

- end code -

The SSLContext.getInstance() call returns the following excpetion:

java.security.NoSuchAlgorithmException: Class

com.sun.net.ssl.internal.ssl.SSLContextImpl configured for SSLContext not a SSLContext

at com.sun.net.ssl.b.a([DashoPro-V1.2-120198])

at com.sun.net.ssl.SSLContext.getInstance([DashoPro-V1.2-120198])

at mypackage.myclass.myFunction(myFunction.java:111)

When I inspected the provider list (running on WLS 6.1), I found two providers (the same two as in WLS 5.1):

1. SUN version 1.2

2. SunJSSE version 1.02

So it looks like the provider is there.

The main difference between the WLS is that 5.1 is using JDK 1.2.2 and 6.1 is using JDK 1.3.1. Might this problem be JDK related?

TIA,

SV

[1532 byte] By [vlcans] at [2008-2-17]
# 1

Is there any chance you have different

versions of JSSE being loaded by different

class loaders? Perhaps you installed

the jsse into the extension directory,

and also pointed your -classpath to

it? Or maybe installed two different jars?

Maybe there's a conflict of some type going on.

Generally, you should install into lib/ext,

and not point your class path at it.

wetmore at 2007-7-1 > top of java,Security,Java Secure Socket Extension (JSSE)...
# 2
That is exactly the problem. I've noticed I get the error when I put the jsse.jar file into two different J2EE web applications. If jsse.jar only exists in one application, there is no conflict. I believe it is a classloader conflict.
vlcans at 2007-7-1 > top of java,Security,Java Secure Socket Extension (JSSE)...