I am moving my old SpringBoot 2 / Java 8 application to the newer SpringBoot 3 / Java 17.
My issue is related to the Weblogic T3 client. Until now I used the wlthint3client artifact coming from a Weblogic 12.2.1.3 installation (compiled by Java 8) which runs with no issues.
Using the same artifact inside the new architecture, based on SpringBoot 3 / Java 17 the new InitialContext(environment) instruction stucks forever!!!
Could anybody tell me if there exist a newer release of the Weblogic Client, or a workaround for that issue?
Here is a fragment of the code which uses the client:
public static MyRemoteEJB lookup(
String clusterAddress,
String userName,
String password
)
throws NamingException
{
Properties environment = new Properties();
environment.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
environment.put(Context.PROVIDER_URL, clusterAddress);
if (null != userName) {
environment.put(Context.SECURITY_PRINCIPAL, userName);
}
if (null != password) {
environment.put(Context.SECURITY_CREDENTIALS, password);
}
environment.put("weblogic.jndi.allowExternalAppLookup", "true");
environment.put("weblogic.jndi.relaxVersionLookup", "true");
InitialContext context = new InitialContext(environment);
String resourceName = String.format(
"remote-app#%s",
MyRemoteEJB.class.getName()
);
return (MyRemoteEJB)context.lookup(resourceName);
}
Thank you so much!
With a lot of effort, I finally solved the issue!
I am going to describe which the solution is, and how I achieved it.
The first step was to ask to the Oracle support, provided by my company, the Jakarta version of the Weblogic T3 Thin Client shipped with Weblogic 14.1.1.0.
I decompiled and debugged it by the IntelliJ built-in java decompiler to get enough information to active and redirect the T3 client debug logs to my console (look at the below source code).
Here the relevant source code:
logging.properties
Main.java
Running it I got several exceptions, but only one really related to my problem:
The above one was the root cause of:
The solution was provided by this post, so I added the JVM arguments:
All the connections issues are gone!!!