I've setup a datasource on JBoss to connect to eap 6.2 to Postgresql 9.3.2.
I'm using the postgresql-9.3-1100.jdbc4.jar driver.
It connects successfully when using the test connection button in JBoss admin console.
When trying to connect (query/persist) a entity via java it gives me the following error:
org.postgresql.util.PSQLException: ERROR: relation "student" does not exist
I've added the following line in the persistence.xml to include the schema
<property name="hibernate.default_schema" value="archu"/>
But the error now just includes the schema:
org.postgresql.util.PSQLException: ERROR: relation "archu.student" does not exist
I've queried the database via Netbeans and it works by modifying the "archu.student" to say archu."Student".
In the database the table Student is spelled using a uppercase s but JBoss datasource uses lowercase. Also the JBoss datasource appends the schema but the "" is around archu and student which doesn't want to work.
Is there a better way to specify the schema in the datasource and tell the datasource not to make everything lowercase?.