cancel
Showing results for 
Search instead for 
Did you mean: 

could not retreive datasource oracle in webdynpro

Former Member
0 Kudos

Hi,

I've defined a datasource for oracle in the visual administrator :

jdbc datasource :

Data Source Type: driver-based

Driver Library: ojdbc14.jar

SQL Engine: vendor sql

Isolation Level: default

driver class : oracle.jdbc.OracleDriver

URL: jdbc:oracle:thin:@<host>:<port>:<sid>

I try to use it in my webdynpro :

javax.sql.DataSource ds=(javax.sql.DataSource)ctx.lookup(<dataSource name>);

java.sql.Connection con=ds.getConnection();

java.sql.Statement stmt=con.createStatement();

con.close();

But it throws the following exception :

com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of Baical_V1.

Does someone know what I could do ?

Thanks

Regards

Claire

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

How you are passing the DataSource value in

javax.sql.DataSource ds=(javax.sql.DataSource)ctx.lookup(<dataSource name>); ??

Check th post

You should give the Datasource as "jdbc/<DataSourceName>"/

Regards, Anilkumar

Former Member
0 Kudos

yes, i tried to give the datasource as "jdbc/<DataSource_name>"

it doesn't work...

the link you gave, goes to the webdynpro forum home page, could you re-send it please ?

thanks

Regards, Claire

Former Member
0 Kudos

Regards, Anilkumar

Former Member
0 Kudos

Thanks Anilkumar,

I've resolved my problem :

this parameters can't work :

Data Source Type: driver-based

Driver Library: ojdbc14.jar

SQL Engine: vendor sql

Isolation Level: default

driver class : oracle.jdbc.OracleDriver

URL: jdbc:oracle:thin:@<host>:<port>:<sid>

like it is explained in thread :

I couldn't issue with a "driver-based" dataSource type AND the ojdbc14.jar driver like indicated in note 941594.

I've used this parameters :

Datasource type: ConnectionPoolDataSource

JDBC Version: 2.0

Driver: <name of the ojdbc14.jar deployed driver> (this driver has to be deployed before ! : http://help.sap.com/saphelp_nw04/helpdata/en/80/4f34c587f05048adee640f4c346417/frameset.htm)

SQL Engine: vendor sql

Isolation Level: default

Driver class: oracle.jdbc.pool.OracleDataSourceFactory

CPDS Classname: oracle.jdbc.pool.OracleConnectionPoolDataSource

Additional properties:

url = jdbc:oracle:thin:@host:port:instance

user = xxxx

password = yyyyy

(Names of properties must be lower-cased)

A good solution to find where was the problem, was to try to declare the datasource directly in the application (adding a data-sources.xml in the META-INF directory http://help.sap.com/saphelp_nw04/helpdata/en/64/0bee3da7138e5be10000000a114084/frameset.htm

) so you can have the detail of the exception in the datasource when you deploy the application, whereas when you create a wrong datasource, in the WAS, you have no message !

Regards,

Claire

Answers (0)