CE HIPPO has being good to me so far and now I am connecting my HIPPO JCR Container to a PostgreSQL database.
I have done all the necessary that is.
- I have installed PostgreSQL 9.5
created a repository.xml @ HIPPO/conf/repository.xml
Update the HIPPO/conf/context.xml with a resource tag for postgres
Then I run a :
mvn clean verify
mvn -Pcargo.run -Drepo.config=conf/repository.xml
Got a new HIPPO storage, all seems OK but I got this error :
java.sql.SQLException: Cannot load JDBC driver class ‘org.postgresql.Driver’
and no changes in in the postgresql database.
4. Of course I need to add in the postgres JDBC Driver.
So I downloaded it from https://jdbc.postgresql.org/download/postgresql-42.2.5.jar
Then i found out I don’t know where to put it. The instruction was to place it in %Catalina%/lib but that folder keep getting removed and refresh every time I run HIPPO
So I realize this is maven so I need to download it via dependency.
I am following the values of : https://mvnrepository.com/artifact/org.postgresql/postgresql/42.2.5
There are many pom.xml in HIPPO, which one do I place it in?
Something out of HIPPO .
Is there a possibility after adding the dependency in pom.xml then I running mvn verify the postgresql driver is not downloaded into my maven repository?
Check here https://www.onehippo.org/library/development/use-mysql-in-a-development-environment.html but do it for postgresql. You need to place it in cargo config for local dev
Please note that we do not support Postgres for the community edition. This doesn’t mean it won’t work, but only that we don’t guarantee it.
Thank you bcanvurat.
Perfect… that JDBC for Postgresql problem solved.
The issue was as bcanvurat stated.
Key thing for me to remember:
Update the ROOT pom.xml
Place the postgresql dependencies tags OUT the dependencyManagement tag NOT inside it.
indent preformatted text by 4 spaces
Do the same inside the build/plugins/plugin/groupid for org.codehaus.cargo
Replace the version tag with classpath tag with the value set as “extra”.
Once done you will notice the postgresql-42.2.5.jar is place in ALL your target lib folder