I am using a JDBC Driver to connect into Progress DB. I am able to connect with this driver in Coldfusion and using SQL Explorer in Eclipse. I am able to connect with the java agent I created, but when I run my select, it gives me the following error:java.sql.SQLException: [JDBC Progress Driver]:Table/View/Synonym not found (7519)
at com.progress.sql.jdbc.JdbcProgress.createSQLException(JdbcProgress.java:6644)
at com.progress.sql.jdbc.JdbcProgress.standardError(JdbcProgress.java:6837)
at com.progress.sql.jdbc.JdbcProgress.SQLExecUTFDirect(JdbcProgress.java:2803)
at com.progress.sql.jdbc.JdbcProgressStatement.execute(JdbcProgressStatement.java:340)
at com.progress.sql.jdbc.JdbcProgressStatement.executeQuery(JdbcProgressStatement.java:234)
at JavaAgent.NotesMain(JavaAgent.java:46)
at lotus.domino.AgentBase.runNotes(Unknown Source)
at lotus.domino.NotesThread.run(Unknown Source)
I have properly put the owner on the table name. The strange thing is that I can run this statement just fine:
select tbl from SYSPROGRESS.systables
It doesn’t appear to be a security issue because JDBC user is granted dba access and I can run this from other dev tools.
Has anyone seen this behavior where the jdbc driver behaves differently in a Notes Java Agent than in other dev tools?
Thanks in advance for any help that can be provided.
Here is my code:
import lotus.domino.*;
import java.sql.*;
import java.lang.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
String user = "jdbc";
String password = "jdbc";
Connection dbConnect = null;
// Connect with Progress JDBC driver.
try {
dbConnect = DriverManager.getConnection("jdbc:jdbcprogress:T:pro01:10223:hfc_pjdev", user, password);
DatabaseMetaData dma = dbConnect.getMetaData();
System.out.println("\nConnected to " + dma.getURL());
System.out.println("Driver " + dma.getDriverName());
System.out.println("Version " + dma.getDriverVersion());
} catch (SQLException e) {
DriverManager.registerDriver(new com.progress.sql.jdbc.JdbcProgressDriver());
dbConnect = DriverManager.getConnection("jdbc:jdbcprogress:T:pro013:10223:hfc_pjdev", user, password);
}
Statement stmt = dbConnect.createStatement();
//String sSTMT = new String("select tbl from SYSPROGRESS.systables");
String sSTMT = new String("select a.proj from PUB.project a");
System.out.println("SQL-Statement : " + sSTMT + "\n");
ResultSet rs= stmt.executeQuery(sSTMT);
System.out.println("Getting Result");
// Read the result set returned
while (rs.next()) {
//appendToTextList
}
// Close the statement
stmt.close();
// Close the connection
dbConnect.close();
} catch(Exception e) {
e.printStackTrace();
}
}
}