Database configuration via JNDI

The Enterprise edition of GeoNetwork requires JNDI to set up your database connections. JNDI is the optimal choice in production situations, because it doesn't require configuration script updates at (re)deployment. JNDI is set up at the container level.

3 examples for setting up JNDI in various containers with various databases. Pick the jndi configuration for the database you want to use. Rename the file to geonetwork.xml (or to appName.xml if you use another name). Put the file at the proper location (for tomcat: tomcat/conf/Catalina/localhost). And place the jar for the driver you want to use is in server/lib.

For Oracle 11
For Postgres 

<Environment name="gnDatabaseDialect" value="H2" type="java.lang.String" override="false"/>
<Resource name="jdbc/geonetwork" auth="Container"
type="javax.sql.DataSource" driverClassName="org.h2.Driver"
username="www-data" password="www-data" maxActive="20" maxIdle="10" defaultAutoCommit="false"

<Environment name="gnDatabaseDialect" value="POSTGRESQL" type="java.lang.String" override="false"/>
<Resource name="jdbc/geonetwork" auth="Container"
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
username="postgres" password="postgres" maxActive="20" maxIdle="10" defaultAutoCommit="false"


<Environment name="gnDatabaseDialect" value="ORACLE" type="java.lang.String" override="false"/>
<Resource name="jdbc/geonetwork" auth="Container"
type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
username="system" password="oracle" maxActive="20" maxIdle="10" defaultAutoCommit="false"

By default GeoNetwork uses the "public" schema in a PostGres database. If you want to set a custom schema, there are 2 things to manage. in config-spring-geonetwork.xml you have to uncomment the line, and set its value to the desired schema-name:
<entry key="hibernate.default_schema" value="geonetwork"/>
Also in the database properties set the database parameter to "database?currentSchema=geonetwork"
  • 2 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Articles Relacionats


Many schema-plugins are available to extend GeoNetwork to support various metadata schema's. A...

What is GeoNetwork?

GeoNetwork is a catalog application to register resources, with a focus on geospatial datasets...

Skins and personalisation

In GeoNetwork Enterprise a skin called 'minimal' is available to replace the default GeoNetwork...