[GeoNetwork-devel] Compiling from scratch versión 3.6.0

Dear list,

Sorry for this question about “software archelogy”, but I found myself in a situation in which I need to compile from scratch version 3.6.0. I downloaded this tag from github but it seems one of the servers are down:

We downloaded sources from github tagged by 3.6.1. Compile it and deployed. But when accessing we get the following error:

We checked it is not due to the user’s permisissions (we are in Windows server).

Deploying code from last stable version in an environment with version 3.6.0 throws this error:

2022-12-23 12:08:19,009 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - HHH000388: Unsuccessful: alter table Sources add column isLocal char(1) not null

2022-12-23 12:08:19,009 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - ERROR: la columna «islocal» de la relación «sources» contiene valores null

2022-12-23 12:08:39,636 WARN [geonetwork.data.directory] - - Data directory properties is not set. Use geonetwork.dir or geonetwork.dir properties.

2022-12-23 12:08:39,637 WARN [geonetwork.data.directory] - - Data directory provided could not be used. Using default location: D:\apache-tomcat\webapps\geonetwork\WEB-INF\data

2022-12-23 12:08:41,672 WARN [geonetwork.schemamanager] - Cannot resolve http://www.w3.org/2001/03/xml.xsd: will append last component to current path (not sure it will help though!)

2022-12-23 12:08:41,877 WARN [geonetwork.schemamanager] - WARNING: gco:Record is a global element without a type - assuming a string

2022-12-23 12:08:42,103 WARN [geonetwork.schemamanager] - WARNING: gco:Record is a global element without a type - assuming a string

2022-12-23 12:08:42,107 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:VerticalDatum

2022-12-23 12:08:42,110 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:CoordinateSystemAxis

2022-12-23 12:08:42,112 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:VerticalCS

2022-12-23 12:08:42,114 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:CoordinateSystemAxis

It seems trying to update database model.

After doing some tests, I have a few questions to understand how updating Works:

· If I want to update my 3.6.0 to version 3.6.1, how should I proceed?

· If deployed last stable version and deployed it, does it try to update the data model? One of our tests in a diferente server was doen like that and it tried to update but failed. I am not sure if corrupted database because of that. Just please, confirm. If I deploy a newwer version does it will to apply changes to dabase?

· Transforming SNAPSHOT to RELEASE is necessary to deploy? I think it isn’t but just to confirm.

· Is there any other file, appart from jdbc.propperties that we need to configure?

Sorry if those are basic questions. Pointing to the right URL would be very useful as well.

I hope someone could help on clarifying those questins. Thank you in any case.

Regards,

firma_email

Hello Juan Manuel,

About compiling 3.6.0, the maven repositories have changed. You can compile GN updating the repositories part of the pom.xml to point to repo.osgeo.org. Replace the section with this content:

false

osgeo

OSGeo Release repository

https://repo.osgeo.org/repository/release/

false

true

osgeo-snapshot

OSGeo Snapshot repository

https://repo.osgeo.org/repository/snapshot/

About the bootstrap.less error. Did you updated the git submodules after switching to the 3.6.x branch?

git checkout 3.6.1

git submodule update --init --recursive

About the database migration, version 3.6.1 was never released, so I suppose you are trying to use 3.6.x branch. There isn’t any important changes in the data in the database contents, just the version number. You can manually execute the migration if you want: https://github.com/geonetwork/core-geonetwork/blob/3.6.x/web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v361/migrate-default.sql

About the database structure I see these changes in the domain JPA classes:

It’s a bit strange that GN tries to update the table Sources when updating from a 3.6.0 to a 3.6.x database. Are you sure the original database belongs to a 3.6.0 GN?

Transforming SNAPSHOT to RELEASE is necessary to deploy? I think it isn’t but just to confirm.

No, it isn’t needed.

Is there any other file, apart from jdbc.propperties that we need to configure?

You need to pass -Dgeonetwork.db.type=$DB_TYPE to maven if you want to use a database different than H2. $DB_TYPE can be h2, oracle, postgres, sqlserver… Or you can edit https://github.com/geonetwork/core-geonetwork/blob/9504f940bcea08abe6aff36eecda907ae99c57cf/web/src/main/webResources/WEB-INF/config-node/srv.xml#L37 and enable the right database type manually.

Best regards,

Juan Luis.

Juan Luis Rodriguez Ponce

E-mail: juanluisrp@anonymised.com

https://www.geocat.net

Veenderweg 13

6721 WD Bennekom

The Netherlands

Tel: +31318416664

---- On Fri, 23 Dec 2022 15:26:27 +0100 JUAN MANUEL MORENO RIVERA via GeoNetwork-devel geonetwork-devel@lists.sourceforge.net wrote —

Dear list,

Sorry for this question about “software archelogy”, but I found myself in a situation in which I need to compile from scratch version 3.6.0. I downloaded this tag from github but it seems one of the servers are down:

We downloaded sources from github tagged by 3.6.1. Compile it and deployed. But when accessing we get the following error:

We checked it is not due to the user’s permisissions (we are in Windows server).

Deploying code from last stable version in an environment with version 3.6.0 throws this error:

2022-12-23 12:08:19,009 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - HHH000388: Unsuccessful: alter table Sources add column isLocal char(1) not null

2022-12-23 12:08:19,009 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - ERROR: la columna «islocal» de la relación «sources» contiene valores null

2022-12-23 12:08:39,636 WARN [geonetwork.data.directory] - - Data directory properties is not set. Use geonetwork.dir or geonetwork.dir properties.

2022-12-23 12:08:39,637 WARN [geonetwork.data.directory] - - Data directory provided could not be used. Using default location: D:\apache-tomcat\webapps\geonetwork\WEB-INF\data

2022-12-23 12:08:41,672 WARN [geonetwork.schemamanager] - Cannot resolve http://www.w3.org/2001/03/xml.xsd: will append last component to current path (not sure it will help though!)

2022-12-23 12:08:41,877 WARN [geonetwork.schemamanager] - WARNING: gco:Record is a global element without a type - assuming a string

2022-12-23 12:08:42,103 WARN [geonetwork.schemamanager] - WARNING: gco:Record is a global element without a type - assuming a string

2022-12-23 12:08:42,107 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:VerticalDatum

2022-12-23 12:08:42,110 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:CoordinateSystemAxis

2022-12-23 12:08:42,112 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:VerticalCS

2022-12-23 12:08:42,114 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:CoordinateSystemAxis

It seems trying to update database model.

After doing some tests, I have a few questions to understand how updating Works:

· If I want to update my 3.6.0 to version 3.6.1, how should I proceed?

· If deployed last stable version and deployed it, does it try to update the data model? One of our tests in a diferente server was doen like that and it tried to update but failed. I am not sure if corrupted database because of that. Just please, confirm. If I deploy a newwer version does it will to apply changes to dabase?

· Transforming SNAPSHOT to RELEASE is necessary to deploy? I think it isn’t but just to confirm.

· Is there any other file, appart from jdbc.propperties that we need to configure?

Sorry if those are basic questions. Pointing to the right URL would be very useful as well.

I hope someone could help on clarifying those questins. Thank you in any case.

Regards,


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Dear Juan Luis,

Thank you so much for your answer. It is clarifying all our questions.

Changing the database is also controled and we are using postgresql. We will test your sugestions and let you know the conclusions.

Regards,

(attachments)

image001.png
image003.png

···

firma_email

De: Juan Luis Rodriguez Ponce <juanluisrp@…437…>
Enviado el: viernes, 30 de diciembre de 2022 13:20
Para: JUAN MANUEL MORENO RIVERA <juan.morenorivera@…1353…>
CC: geonetwork-devel geonetwork-devel@lists.sourceforge.net
Asunto: Re: [GeoNetwork-devel]_Compiling from scratch versió n 3.6.0

Hello Juan Manuel,

About compiling 3.6.0, the maven repositories have changed. You can compile GN updating the repositories part of the pom.xml to point to repo.osgeo.org. Replace the section with this content:

false

osgeo

OSGeo Release repository

https://repo.osgeo.org/repository/release/

false

true

osgeo-snapshot

OSGeo Snapshot repository

https://repo.osgeo.org/repository/snapshot/

About the bootstrap.less error. Did you updated the git submodules after switching to the 3.6.x branch?

git checkout 3.6.1

git submodule update --init --recursive

About the database migration, version 3.6.1 was never released, so I suppose you are trying to use 3.6.x branch. There isn’t any important changes in the data in the database contents, just the version number. You can manually execute the migration if you want: https://github.com/geonetwork/core-geonetwork/blob/3.6.x/web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v361/migrate-default.sql

About the database structure I see these changes in the domain JPA classes:

It’s a bit strange that GN tries to update the table Sources when updating from a 3.6.0 to a 3.6.x database. Are you sure the original database belongs to a 3.6.0 GN?

Transforming SNAPSHOT to RELEASE is necessary to deploy? I think it isn’t but just to confirm.

No, it isn’t needed.

Is there any other file, apart from jdbc.propperties that we need to configure?

You need to pass -Dgeonetwork.db.type=$DB_TYPE to maven if you want to use a database different than H2. $DB_TYPE can be h2, oracle, postgres, sqlserver… Or you can edit https://github.com/geonetwork/core-geonetwork/blob/9504f940bcea08abe6aff36eecda907ae99c57cf/web/src/main/webResources/WEB-INF/config-node/srv.xml#L37 and enable the right database type manually.

Best regards,

Juan Luis.

Juan Luis Rodriguez Ponce

E-mail: juanluisrp@…437…

https://www.geocat.net

Veenderweg 13

6721 WD Bennekom

The Netherlands

Tel: +31318416664

---- On Fri, 23 Dec 2022 15:26:27 +0100 JUAN MANUEL MORENO RIVERA via GeoNetwork-devel <geonetwork-devel@lists.sourceforge.net> wrote —

Dear list,

Sorry for this question about “software archelogy”, but I found myself in a situation in which I need to compile from scratch version 3.6.0. I downloaded this tag from github but it seems one of the servers are down:

We downloaded sources from github tagged by 3.6.1. Compile it and deployed. But when accessing we get the following error:

We checked it is not due to the user’s permisissions (we are in Windows server).

Deploying code from last stable version in an environment with version 3.6.0 throws this error:

2022-12-23 12:08:19,009 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - HHH000388: Unsuccessful: alter table Sources add column isLocal char(1) not null

2022-12-23 12:08:19,009 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] - ERROR: la columna «islocal» de la relación «sources» contiene valores null

2022-12-23 12:08:39,636 WARN [geonetwork.data.directory] - - Data directory properties is not set. Use geonetwork.dir or geonetwork.dir properties.

2022-12-23 12:08:39,637 WARN [geonetwork.data.directory] - - Data directory provided could not be used. Using default location: D:\apache-tomcat\webapps\geonetwork\WEB-INF\data

2022-12-23 12:08:41,672 WARN [geonetwork.schemamanager] - Cannot resolve http://www.w3.org/2001/03/xml.xsd: will append last component to current path (not sure it will help though!)

2022-12-23 12:08:41,877 WARN [geonetwork.schemamanager] - WARNING: gco:Record is a global element without a type - assuming a string

2022-12-23 12:08:42,103 WARN [geonetwork.schemamanager] - WARNING: gco:Record is a global element without a type - assuming a string

2022-12-23 12:08:42,107 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:VerticalDatum

2022-12-23 12:08:42,110 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:CoordinateSystemAxis

2022-12-23 12:08:42,112 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:VerticalCS

2022-12-23 12:08:42,114 WARN [geonetwork.schemamanager] - WARNING: schema-substitutions.xml has wiped out XSD substitution list for gml:CoordinateSystemAxis

It seems trying to update database model.

After doing some tests, I have a few questions to understand how updating Works:

· If I want to update my 3.6.0 to version 3.6.1, how should I proceed?

· If deployed last stable version and deployed it, does it try to update the data model? One of our tests in a diferente server was doen like that and it tried to update but failed. I am not sure if corrupted database because of that. Just please, confirm. If I deploy a newwer version does it will to apply changes to dabase?

· Transforming SNAPSHOT to RELEASE is necessary to deploy? I think it isn’t but just to confirm.

· Is there any other file, appart from jdbc.propperties that we need to configure?

Sorry if those are basic questions. Pointing to the right URL would be very useful as well.

I hope someone could help on clarifying those questins. Thank you in any case.

Regards,


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Much of that content moved to repo.osgeo.org; you can set up mirrors in settings.xml or make a PR to the 3.6.x branch to match the 3.12.x repository references.

One advantage of listing less repositories is reduced build time.

(attachments)

image001.png


···


Jody Garnett