Error after switching DB node - "...Invalid boolean value [${jdbc.basic.defaultReadOnly}]"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error after switching DB node - "...Invalid boolean value [${jdbc.basic.defaultReadOnly}]"

zer0mode
Hi girls and guys, I'm kind of stuck here.

I wanted to switch to a non-empty postgresql database, containing already some entries. The contents were inserted by using gn version 3.2.1.

Then I freshly deployed the same gn version, configured first the internal db (h2) to check if eveything works ok. When I try to connect to postgresql, this is the output in geonetwork.log :
 FATAL [jeeves.engine] - Raised exception during init
 FATAL [jeeves.engine] -    Exception : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [jar:file:/var/lib/tomcat8/webapps/geonetwork/WEB-INF/lib/domain-3.2.1-0.jar!/config-spring-geonetwork.xml]: Cannot resolve reference to bean 'jdbcDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdbcDataSource' defined in URL [file:/var/lib/tomcat8/webapps/geonetwork/WEB-INF/config-db/defaultJdbcDataSource.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [boolean] for property 'defaultReadOnly'; nested exception is java.lang.IllegalArgumentException: Invalid boolean value [${jdbc.basic.defaultReadOnly}]
 FATAL [jeeves.engine] -    Message   : Error creating bean with name 'entityManagerFactory' defined in URL [jar:file:/var/lib/tomcat8/webapps/geonetwork/WEB-INF/lib/domain-3.2.1-0.jar!/config-spring-geonetwork.xml]: Cannot resolve reference to bean 'jdbcDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdbcDataSource' defined in URL [file:/var/lib/tomcat8/webapps/geonetwork/WEB-INF/config-db/defaultJdbcDataSource.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [boolean] for property 'defaultReadOnly'; nested exception is java.lang.IllegalArgumentException: Invalid boolean value [${jdbc.basic.defaultReadOnly}]
 FATAL [jeeves.engine] -    Stack     : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [jar:file:/var/lib/tomcat8/webapps/geonetwork/WEB-INF/lib/domain-3.2.1-0.jar!/config-spring-geonetwork.xml]: Cannot resolve reference to bean 'jdbcDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdbcDataSource' defined in URL [file:/var/lib/tomcat8/webapps/geonetwork/WEB-INF/config-db/defaultJdbcDataSource.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [boolean] for property 'defaultReadOnly'; nested exception is java.lang.IllegalArgumentException: Invalid boolean value [${jdbc.basic.defaultReadOnly}]
If I want to switch back do h2.db, the error is still there.


I use externalised datadir. Any sugestions ? Thanks in advance for your output.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error after switching DB node - "...Invalid boolean value [${jdbc.basic.defaultReadOnly}]"

zer0mode
This is now resolved, but I am not certain about what exactly was the cause. Below is a conclusion - if any of the developers can confirm that this was provoking the problem, you're welcome.

In the second configuration the gn_data_dir was, as in the 1st config, externalised. Besides that schemas were left in their default location, so CATALINA_OPTS had also the parameter :
-Dgeonetwork.schema.dir=/app/tomcat/webapps/geonetwork/WEB-INF/data/config/schema_plugins

This is maybe why the connection back to default H2 node wasn't working neither. So, I just had to remove the geonetwork.schema.dir part and the geonetwork page loaded normaly with all the contents from the DB.

This was a test, so no data was lost.


I wrote down some general steps about GN deployment and configuration. I'll publish it soon, I think it would be useful to have an online reserve plan for the cases when things don't work as wanted. If anyone will like to contribute or modify it later on, that would be great too.
Loading...