on ‎2005 Aug 09 9:40 AM
Hello.
I am experiencing a problem trying to retrieve data from an oracle database.
I am using ep6 sp2 and have set up a connection pool using the com.sap.portals.jdbc.oracle.OracleDriver as a driver.
The problem is that when trying to get a connection that my service can use (in the java code), I keep receiving this error message:
java.sql.SQLException: [SAP_Portals][Oracle JDBC Driver]No more data available to read.
The error appears to come from the Statement initialization with con.createStatement() in the code.
Anyone has any idea of what I might be doing wrong?
Thank you in advance.
Silviu.
Request clarification before answering.
Hi,
If you are sure that the connection has been established from your portal to oracle DB, then I think you have problem with the query you are using.Did you by any chance try to run your query alone in oracle backend directly and saw what's happening?Or if your query is correct whether did you check whether you have data in the table?
Hint :- Put a system.out.println("some msg"); after each & every line in your DB conection in ur try block.I mean after creation of connection,initilization of statement etc.This way also you can figure out where the problem is...
Hope these info helps.
Regards,
Guru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again, and thanks for the answer.
Yes, I did run the query directly into my oracle backend. It works just fine (it's a very simple insert query).
I already put the system.out lines, that is why I said that the error appears to be at statement initialization (when I do Statement stat = con.createStatement(); where con is the db connection).
To be more clear, I have lines like (i am using a logger instead of the system.out, but this example is close enough; ds is a datasource object):
system.out.println("check 0. trying to establish con");
Connection con = ds.getConnection();
system.out.println("check 1. con : "+con);
Statement stat = con.createStatement();
system.out.println("check 2. stat : "+stat);
stat.executeQuery("insert into testtable(id, name) VALUES('asdadsad','asdasdasds')");
system.out.println("check 3. query ok");
In the above, the "check 2....." line does not appear, but the "check 1...." line does. Hence, I think the error is at statement initialization.
I know the code is very childish, but this is just for testing purposes, and it should work... right?
Please tell me if any ideas cross your mind.
Thank you again.
Silviu.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.