0

I would like to connect a PostGIS-PostgreSQL database created in pgAdmin to GeoNetwork.

Which files in the webInf under the geonetwork folder I am supposed to modify and how?

1 Answer 1

0

You need to change the srv.xml file at ...WEB-INF\config-node:

Comment out the H2.xml config and uncomment the config that best suites your database.

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       default-lazy-init="true"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
  <import resource="classpath*:/config-spring-geonetwork.xml"/>
  <import resource="../config-db/database_migration.xml"/>
  <!-- Uncomment the database configuration you need to use -->
  <!-- Default using the db.config.file if it exists and if not then derive the db file based on the db_type -->
  <!--<import resource="../config-db/${geonetwork.db.type:h2}.xml"/> -->
  <!--<import resource="../config-db/h2.xml"/> -->
  <!--<import resource="../config-db/jndi-postgres-postgis.xml"/> -->
  <!--<import resource="../config-db/oracle.xml"/>-->
  <!--<import resource="../config-db/mysql.xml"/> -->
  <!--<import resource="../config-db/db2.xml"/> -->
  <import resource="../config-db/postgres.xml"/>
  <!--<import resource="../config-db/sqlserver.xml"/> -->
  <!--<import resource="../config-db/postgres-postgis.xml"/>-->
</beans>

And in the jdbc.properties file at WEB-INF\config-db You need to change the following parameter values:

jdbc.username=
jdbc.password=
jdbc.database=
jdbc.host=
jdbc.port=

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.