Hello everybody,
I have a problem with integrating PostgreSQL as my standard db for a Cuba application. This application has some entities and works fine on hsqldb. The entities were created on the hsqldb.
I read in the documentation that I only have to change the cuba.dbmsType in the context.xml. I did that and afterwards I got a message in the console of the studio. It says that the context.xml differs from the build.gradle and that I should change the values manually.
So I opened the build.gradle and changed the values of task createDb and task updateDb.
task createDb(dependsOn: assembleDbScripts, description: 'Creates local database', type: CubaDbCreation) {
dbms = 'postgres'
dbmsVersion = 'null'
host = 'localhost'
dbName = 'fdmlgr'
dbUser = 'postgres'
dbPassword = 'postgres'
}
task updateDb(dependsOn: assembleDbScripts, description: 'Updates local database', type: CubaDbUpdate) {
dbms = 'postgres'
dbmsVersion = 'null'
host = 'localhost'
dbName = 'fdmlgr'
dbUser = 'postgres'
dbPassword = 'postgres'
}
}
But I still get the same errors:
“org.postgresql.util.PSQLException: FATAL: Database fffdfdmlgrfffd doesnt exist” when creating the db scripts
and
"java.lang.ClassNotFoundException: org.postgresql.Driver" when I try to create a the database.
Then I recognized in the build.gradle that there is a variable called hsql which is used later in the dependencies. So I changed it too. I put in the actual postgesql jdbc driver: 'postgresql:postgresql:9.1-901.jdbc4’
renamed it to posgres and also in the dependencies section.
Am I missing something?
Thank you in advance for your time and your help.
Greetings Clemens