Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple JNDI lookup from JDK 11 client to Weblogic 10.3.6 (JDK 7) server not working

Server Environment: Weblogic 10.3.6, JDK 1.7

I have a simple working Java SE client application runing with JDK 7. In client I am doing very simple JNDI look of a resource hosted server mentioned above.

Jars in ClassPath: wlthint3client.jar

public static void main(String[] args) throws Exception {
    Hashtable t = new Hashtable();
    t.put(InitialContext.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    t.put(InitialContext.PROVIDER_URL, "t3://localhost:7003/");
    InitialContext ic = new InitialContext(t);

    String jndiName = "weblogic.jdbc.DataSource.Workflow";

    Object obj = ic.lookup(jndiName);
    System.out.println("Found it");
}

I have to upgrade my working Java SE client application from JDK 7 to JDK 11. The server environment remains same.

As soon as I upgrade client to JDK 11, I hit following error. Which is expected because corba jars have been moved out from JDK 11.

Exception in thread "main" java.lang.NoClassDefFoundError: org/omg/CORBA/SystemException
    at weblogic.jndi.WLInitialContextFactoryDelegate.<clinit>(WLInitialContextFactoryDelegate.java:202)
    at weblogic.jndi.spi.EnvironmentManager$DefaultFactoryMaker.<clinit>(EnvironmentManager.java:27)
    at weblogic.jndi.spi.EnvironmentManager.getInstance(EnvironmentManager.java:49)
    at weblogic.jndi.Environment.getContext(Environment.java:315)
    at weblogic.jndi.Environment.getContext(Environment.java:285)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at java.naming/javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:730)
    at java.naming/javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
    at java.naming/javax.naming.InitialContext.init(InitialContext.java:236)
    at java.naming/javax.naming.InitialContext.<init>(InitialContext.java:208)
    at com.test.JndiLookupTestJdk11.main(JndiLookupTestJdk11.java:16)

Added jacorb-omgapi-3.8.jar to client classpath to fix above exception.

After this I am hitting following timeout exception and not giving any clue. Server is up and running because my old client is working.

Error is at this line

InitialContext ic = new InitialContext(t);

Stacktrace

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by weblogic.rjvm.MsgAbbrevInputStream (file:/C:/Users/ke64/OneDrive%20-%20Sun%20Life%20Financial/work_eclipse-jee-2018-12-R/jndi-lookup-test-jdk11/lib/wlthint3client.jar) to method java.io.ObjectInputStream.clear()
WARNING: Please consider reporting this to the maintainers of weblogic.rjvm.MsgAbbrevInputStream
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://localhost:7003: Bootstrap to: localhost/0:0:0:0:0:0:0:1:7003' over: 't3' got an error or timed out]
    at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)
    at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:792)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:368)
    at weblogic.jndi.Environment.getContext(Environment.java:315)
    at weblogic.jndi.Environment.getContext(Environment.java:285)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at java.naming/javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:730)
    at java.naming/javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
    at java.naming/javax.naming.InitialContext.init(InitialContext.java:236)
    at java.naming/javax.naming.InitialContext.<init>(InitialContext.java:208)
    at com.test.JndiLookupTestJdk11.main(JndiLookupTestJdk11.java:16)
Caused by: java.net.ConnectException: t3://localhost:7003: Bootstrap to: localhost/0:0:0:0:0:0:0:1:7003' over: 't3' got an error or timed out
    at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:216)
    at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:165)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:353)
    ... 8 more
Caused by: java.rmi.ConnectException: Bootstrap to: localhost/0:0:0:0:0:0:0:1:7003' over: 't3' got an error or timed out
    at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:365)
    at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:260)
    at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197)
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238)
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteCluster(RJVMFinder.java:316)
    at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:205)
    ... 11 more

Questions

  1. Has anyone got it working with configuration? Any idea how to fix this? Do I need to add any specific version of corba jars?
  2. I am thinking that standard J2EE feature of JNDI lookup should work. Is Weblogic 10.3.6 not compatible with JDK 11 client?

Any help is greatly appreciated.

like image 803
Rakesh Prajapati Avatar asked Sep 02 '25 16:09

Rakesh Prajapati


1 Answers

There is no shipping version of WebLogic Server that works on JDK 11. WLS 10.3.6 isn't even close (it doesn't even work on JDK 8).

The closest shipping version is WLS 12.2.1.3.0, which was pretty much working on JDK9 but has been broken with subsequent changes in JDK 10 and JDK 11.

A version of WebLogic Server that is certified on JDK 11 is planned for the second half of 2019.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!