My Oracle Support Banner

WebLogic JARs Needed to Access a WebLogic Datasource from An External Java Client (Doc ID 2005891.1)

Last updated on DECEMBER 16, 2023

Applies to:

Oracle WebLogic Server - Version 12.1.1.0 and later
Information in this document applies to any platform.

Goal

When trying to access a Weblogic configured datasource from a stand alone  Java client, if only wlthint3client.jar is included in the CLASSPATH, the following exception  is thrown:

java.lang.ClassCastException:
weblogic.jdbc.common.internal.RmiDataSource_1211_WLStub cannot be cast to javax.sql.DataSource


As example, the following code shows how a datasource is obtained using JNDI lookup API :


What are the minimum WebLogic jars needed to lookup a datasource and connection from a stand alone java  client ?
 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.