I faced the same issue and it's fixed now :)
The fix is,
String DATASOURCE_CONTEXT = prop.getProperty("tcDataSourceContext");
log("DATASOURCE_CONTEXT.."+DATASOURCE_CONTEXT);
Properties env = new Properties( );
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL,"t3://abc.com:8001");
Context initialContext = new InitialContext(env);
DataSource datasource = (DataSource)initialContext.lookup(DATASOURCE_CONTEXT);
if (datasource != null) {
conn = datasource.getConnection();
}
else{
log("Failed to lookup datasource.");
}
1#. abc.com is the server URL where WebLogic is deployed.
2#. 8001 is the port number where WebLogic Admin server is listening.
3#. Make sure the below is configured correctly.
Wrong one:
tcDataSourceContext=java:comp/env/jdbc/datasourcename
Correct one:
tcDataSourceContext=jdbc/datasourcename
4#. Also, go to WebLogic server and navigate to /Oracle/Middleware/wlserver_10.3/server/lib/ and execute the below command.
Command:
java -jar wljarbuilder.jar -profile wlfullclient5
The above command creates a jar file with all the jar's inside WebLogic server /lib folder and place it in your client java code build path and server/lib folder as well.
Hope this helps! Kindly let me know if you have any issues.