cancel
Showing results for 
Search instead for 
Did you mean: 

Lookup error. Cannot find DataSource

Former Member
0 Kudos

Hello all!

I have a datasource like this image above in my netweaver enviroment.

[http://img31.imageshack.us/img31/2765/datasource.png]

I have tried to lookup this DataSource like this:


InitialContext dbInitContext = new InitialContext();

DataSource dataSource = (DataSource) dbInitContext.lookup(DATASOURCE_NAME);
Connection con = dataSource.getConnection();

I have already tried these names to lookup: mysql_laboral, mysql_con.. Also java:comp/mysql..... And anothers.....

All tries I got the same error... "Object Not Found in Lookup of (plus name)"

How is the correct way to do this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Vinicius,

Refer to the following blog for a good description and example code implementation:

/people/divyakumar.jain/blog/2006/05/27/data-migration

Regards,

Ventsi Tsachev

Former Member
0 Kudos

Thank you a lot!!! The problem was solved by adding a "jdbc/" + Alias name!!!

Answers (0)