cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Connection object returning "null"

Former Member
0 Kudos

Hi All,

I am trying to connect Oracle DB from WebDynPro but I m getting error Connection object returning “null” value.

I’ve done following stpes

1) Created DataSource under VA/services/JDBC Connector passing following parametrs a) driverName = "oracle.jdbc.driver.OracleDriver"; b) URL c)Username and Password

In the WebDynProject in the compoents controller of init method I did following code

try{
InitialContext ctx = new InitialContext();
		DataSource ds = (DataSource) ctx.lookup("jdbc/TESTDS_WF");
		Connection con = ds.getConnection();
		
		wdThis.wdGetAPI().getComponent().getMessageManager().reportWarning("Connected"+connection);
	} catch (Exception e) {
		
		wdThis.wdGetAPI().getComponent().getMessageManager().reportWarning("Exception-1"+e);

I am printing connection object <b>but it’s giving “null”</b>

Thanks in Advance

-SS

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Solved By Own

Thx & Rgds

-SS

Answers (0)