My application is using Spring/Hibernate with Postgres on WildFly.
I have configured a datasource which is pointing to a test (testdb) database in Postgres.
Verified that the configuration is good by performing a "Test Connection"
from Datasource details under the "Configuration" tab.
I have also created a few tables and populated them. Granted all privileges to the postgres user.
When I ran up the application, I am getting the error
My understanding was that the "org.h2...." package is used when using the WildFly's in memory database.
In my mind, it seems I have not correctly configured WildFly to use my local instance of Postgres and
hence not finding "MyTable".
So looking for advice as to configuration that I may have missed and/or other suggestions that will help me overcome
the table not found error.
Please post the relevant code where you are looking up the datasource, getting a connection and then firing that query. Also post the relevant persistence.xml or the hibernate configuration that you are using (guessing by the stacktrace).
Below is an example of my codebase which I hope will give you an idea of my implementation and more hopefully you
maybe able to provide a suggestion/explantion as to why the "My_TABLE" database table is not visible.
I am pretty sure dao,domain, spring beans are all good.
My concerns are :-
Around steps to create the database and its table.
MY_TABLE is created is under testdb -> Schemas -> public -> tables... is this correct ?
There is some WildFly configuration file which is needed that I am not aware of and not setting.
Do you think I have missed to set/configure something ?
In the stacktrace shown in my original post, it shows "org.h2...." package which would be WildFly's in memory database.
Is my understanding correct and if so, why would this be the case, as I am using postgres.
Will very much appreciate any help you can provide me.