on 07-20-2015 12:24 PM
Hi PI Experts,
I am facing a problem to connect to Database from UDF/ Java Mapping using Data Source Name.
I have created one data source name in Netweaver Administrator and updated all the configuration details like URL of the database server and properties(username & password) for creating connection to the Database.
I am using this data source name in my UDF to connect database. But i am getting below errors like
Error Description:1 Object not found in the lokkup.
after doing small changes in my lookup i got the below error
Error Description:2 Caused by: ORA-00942: table or view does not exist OpenSQLExceptionCategories: [NON_TRANSIENT, DB_OBJECT_UNKNOWN
But table already exist and using in other scenario. There is no issue with Table.
This is the program that i am using: In this program i am sending Data source name and sqlStmt values as a parametrs from my UDF.
ds = (DataSource)ctx.lookup(s);
if (ds == null)
{
value = "Error - No dataSource: " + dataSource;
return value;
}
}
catch (Exception e)
{
value = e.getMessage();
return value+"Context Lookup";
}
try
{
conn = ds.getConnection();
//trace.addInfo("Connected");
if (conn != null)
{
stmt = conn.createStatement();
rst = stmt.executeQuery(sqlStmt);
if (rst.next())
{
value = rst.getString(1);
}
conn.close();
}
Can any one help me on this...............................
Thanks In Advance.
Regards,
Srikanth Mavuri.
Any Updates on this... ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.