Thank you María and Gravin! Finally, I figured it out. Just wanna share the
solution in case someone else may have the same problem.
First, in order to connect with Postgres, we need to modify two files:
1. C:\Program
Files\geonetwork\web\geonetwork\WEB-INF\config-db\jdbc.properties
2. C:\Program Files\geonetwork\web\geonetwork\WEB-INF\config-node\srv.xml
Then, you should be able to connect with Postgres successfully
Second, when you have large dataset, you may want to use PostGIS spatial
index instead of built-in data directory. In order to do this, you have to
modify postgres.xml file under C:\Program
Files\geonetwork\web\geonetwork\WEB-INF\config-db\. Below is my snippet,
<import resource="defaultJdbcDataSource.xml" />
<import resource="postgis-alternate-datasource.xml" />
<bean id="jpaVendorAdapterDatabaseParam" class="java.lang.String">
<constructor-arg value="POSTGRESQL"/>
</bean>
<bean id="jdbcDriverClassName" class="java.lang.String">
<constructor-arg value="org.postgis.DriverWrapper"/>
</bean>
<bean id="jdbcURL" class="java.lang.String">
<constructor-arg
value="jdbc:postgresql_postGIS://${jdbc.host}:5432/${jdbc.database}"/>
Lastly, for some reason, jdbc.properties missed "port" attribute which is
needed by postgis-alternate-datasource.xml. So you have to add it by
yourself.
Yongyao Jiang
Ph.D. Student in Earth Systems and GeoInformation Sciences
NSF Spatiotemporal Innovation Center http://stcenter.net
Department of Geography and GeoInformation Science
George Mason University
4400 University Drive, Fairfax, VA 22030
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-use-PostGIS-spatial-index-in-3-0-0-Urgent-tp5208696p5208977.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.