SQLContainer, PostgreSQL, table schema

Hi all!

I’m trying to run this code:

dbconnection = new SimpleJDBCConnectionPool(dbclass, url, user, password);
TableQuery table = new TableQuery(“obras_particulares”, dbconnection);
container = new SQLContainer(table);

The connection is correctly made to the PostgreSQL database, and the query that Vaadin does correctly returns tha name of the table and the respective schema.
But… then Vaadin does:

SELECT * FROM obras_particulares ORDER BY “id” ASC LIMIT 1 OFFSET 0

and Postgres says that the table obras_particulares doesn’t exist, and is true because tha table is inside a schema.

But if i put in my code the SCHEMA.TABLE as:

TableQuery table = new TableQuery(“obras_particulares.obras_particulares”, dbconnection);

Postgres reports to Vaadin that that table doesn’t exist.

Any help is appreciated.
David Pinheiro

Any Help on this?

FreeformQuery works ok, but TableQuery doesn’t, both on postgres.

David Pinheiro


maybe I’m wrong, but I think that the correct syntax should be : “obras_particulares”.“obras_particulares” instead of “obras_particulares.obras_particulares”
The dot should be outside the quotes.

Gilles Carpentier

I have same problem with oracle. I tried doing this

tq_appUserRoles = new TableQuery("\"SHARED\".\"APP_USER_ROLES\"", ora_connectionPool, new OracleGenerator());

and it still doesn’t recognize the table. Has anyone got it to work? I am trying to avoid having to create a personal app db user synonym for every table

I have the same problem, too.
Is there still no solution for this problem?

“obras_particulares”.“obras_particulares” doesn’t work.


Same problem here! Using Vaadin 7.0.4. Any help? Any Fix?

for PostgreSQL, if the shema is the user name or “public”, you just have to provide the name of the table because this is the default search list for PostgreSQL.
So,the next test I will try, is to append another schema to the PostgreSQL search list instead of providing the shema name to TableQuery.

I created a schema called myschema into the database called isep on my local Postgres server, and created a phonebook table :

The trick is to set the schema when you create the connection :

connectionPool = new SimpleJDBCConnectionPool(
“jdbc:postgresql://localhost:5432/isep?searchpath=myschema”, “gilles”, “”, 2, 2);

Then I am still able to refer to my table directly as “phonebook” :

TableQuery tq = new TableQuery(“phonebook”, connectionPool, generator);

Gilles Carpentier


I am facing the same issue. I have tried all the possible solutions mentioned everywhere but this is not working.
I have tried giving search path but no use, it is still giving the error “relation does not exist”
I have tried copying my table in public schema but no use.
I really need this to work as I cannot use FreeForm Query so please any solution for this?
I also check one ticket related to this issue http://dev.vaadin.com/ticket/7827
but it does not mention what was the resolution. Does anybody know? Any help is appreciated.