Hi there,
I have a problem when trying to get data of a Postgres DB.
Vaadin Version 7.0.2
Potgresql 9.2 JDBC 3 driver / Potgresql 9.2 JDBC 4 driver (I tryed both)
I have a working SimpleJDBCConnectionPool and I try to query a table with the name “user” and it is create on the schema “myschema”.
So I try it with the following code:
JDBCConnectionPool sqlPool = new SimpleJDBCConnectionPool("org.postgresql.Driver", "jdbc:postgresql://localhost:5432/mydatabase", "testuser", "testpassword",2,5);
TableQuery userTable = new TableQuery("myschema.user", sqlPool);
SQLContainer container;
userTable.setVersionColumn("version");
try
{
container = new SQLContainer(userTable);
return container;
}
catch (SQLException e)
{
Notification.show("Cant get data", Notification.Type.ERROR_MESSAGE);
e.printStackTrace();
return null;
}
The connection is working correctly but I get a Exception when running the command:
Caused by: java.lang.IllegalArgumentException: Table with the name “myschema.user” was not found. Check your database contents.
Does somebody of you have a idea why this happend?