Upgrade 3.0.5 to 3.7 - file issue

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgrade 3.0.5 to 3.7 - file issue

hoddih
Long-time no see

I have upgrade GN from 3.0.5 to 3.7 (supposed be 3.8) and have a problem
with file url.
for example it was:
http://server/geonetwork/srv/eng//resources.get?uuid=d5f9a3a2-13f7-40e0-9a9c-d02b71db8d84&fname=Figure_4.6.jpg
but became:
http://server/geonetwork/srv/api/records/d5f9a3a2-13f7-40e0-9a9c-d02b71db8d84/attachments/Figure_4.6.jpg?approved=true

there are a few changes that need to be fixed! "/eng//resources.get?uuid="
have to be "/api/records/" and "&fname=" have to be "/attachments/"

How can I change it for all my 650 datasets?

Hóddi

--
Hólmgrímur Helgason (Hóddi)
CAFF - Data Manager
[hidden email]
+354 462 3357

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Upgrade 3.0.5 to 3.7 - file issue

Jose Garcia
Hi

There's a Java class defined for this MetadataResourceDatabaseMigrationTask
<https://github.com/geonetwork/core-geonetwork/blob/3.8.x/core/src/main/java/org/fao/geonet/MetadataResourceDatabaseMigration.java>,
I would expect would be automatically executed when upgrading the database
in the startup process of 3.8, but maybe not.

You can execute it manually from the Swagger API page:

1) Login as Admistrator

2) Go to Swagger page (change SERVER with your server name), to the
migration API service

http://SERVER/geonetwork/doc/api/index.html#/tools/callStep


Click *Try it out *button and in *stepName* provide the value
*org.fao.geonet.MetadataResourceDatabaseMigration*

3) When finishes the metadata should be updated with the new link format.

If you have a dev instance I would suggest to try it first in the dev
instance.

Regards,
Jose García

On Thu, Sep 19, 2019 at 11:50 AM Hólmgrímur Helgason <[hidden email]> wrote:

> Long-time no see
>
> I have upgrade GN from 3.0.5 to 3.7 (supposed be 3.8) and have a problem
> with file url.
> for example it was:
>
> http://server/geonetwork/srv/eng//resources.get?uuid=d5f9a3a2-13f7-40e0-9a9c-d02b71db8d84&fname=Figure_4.6.jpg
> but became:
>
> http://server/geonetwork/srv/api/records/d5f9a3a2-13f7-40e0-9a9c-d02b71db8d84/attachments/Figure_4.6.jpg?approved=true
>
> there are a few changes that need to be fixed! "/eng//resources.get?uuid="
> have to be "/api/records/" and "&fname=" have to be "/attachments/"
>
> How can I change it for all my 650 datasets?
>
> Hóddi
>
> --
> Hólmgrímur Helgason (Hóddi)
> CAFF - Data Manager
> [hidden email]
> +354 462 3357
>
> _______________________________________________
> GeoNetwork-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>


--











*Vriendelijke groeten / Kind regards,Jose García
<http://www.geocat.net/>Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664>Please consider the environment before printing
this email.*

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Geonetwork 3.8 - trouble harvesting new source

Ndeville
In reply to this post by hoddih
Hello everyone,

I'm testing the new release of geonetwork 3.8. Overall it's nice and
easy to use.

However I'm running into a bug: there is no possibility to harvest from
a new source.

After adding the new source and saving, I read the message "Harvester
updated" but the new source is not visible in the harvester list.

I tested the same operation with the same configuration with geonetwork
3.6 and it works fine.

Any idea what could cause that?

Thanks for your help,

Nicolas de Ville


_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Geonetwork 3.8 - trouble harvesting new source

Francois Prunayre
Hi, did you started from a new database or migrating from an old one ?
Any error in the log file ?
What type of harvester ?

Cheers

Francois



Le mar. 8 oct. 2019 à 18:03, Nicolas De Ville de Goyet <
[hidden email]> a écrit :

> Hello everyone,
>
> I'm testing the new release of geonetwork 3.8. Overall it's nice and
> easy to use.
>
> However I'm running into a bug: there is no possibility to harvest from
> a new source.
>
> After adding the new source and saving, I read the message "Harvester
> updated" but the new source is not visible in the harvester list.
>
> I tested the same operation with the same configuration with geonetwork
> 3.6 and it works fine.
>
> Any idea what could cause that?
>
> Thanks for your help,
>
> Nicolas de Ville
>
>
> _______________________________________________
> GeoNetwork-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Geonetwork 3.8 - trouble harvesting new source

Ndeville
Hello Francois,

I migrate a old one (from geonetwork 3.0). I can see all my files, users, .... I also migrate the data directory.

Actually I just tried again and it works... I downloaded the last version yesterday, maybe some issues were fixed in the meantime (first download of geonetwork 3.8 was two weeks ago).

Very sorry for the false alarm, and thanks for the reply.

Nicolas


On 8/10/19 18:31, Francois Prunayre wrote:
Hi, did you started from a new database or migrating from an old one ?
Any error in the log file ?
What type of harvester ?

Cheers

Francois



Le mar. 8 oct. 2019 à 18:03, Nicolas De Ville de Goyet <[hidden email]<mailto:[hidden email]>> a écrit :
Hello everyone,

I'm testing the new release of geonetwork 3.8. Overall it's nice and
easy to use.

However I'm running into a bug: there is no possibility to harvest from
a new source.

After adding the new source and saving, I read the message "Harvester
updated" but the new source is not visible in the harvester list.

I tested the same operation with the same configuration with geonetwork
3.6 and it works fine.

Any idea what could cause that?

Thanks for your help,

Nicolas de Ville


_______________________________________________
GeoNetwork-users mailing list
[hidden email]<mailto:[hidden email]>
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

--
Nicolas de Ville
Belgian Marine Data Centre (BMDC)
OD-Nature, Royal Belgian Institute of Natural Sciences
02/627.42.79
www.bmdc.be<http://www.bmdc.be>
geonetwork.bmdc.be

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Geonetwork 3.8 - trouble harvesting new source

Francois Prunayre
Good. That SQL update
https://github.com/geonetwork/core-geonetwork/pull/4077/files which was
missing may also be related but I'm not 100% sure (it would require your
log file output). Anyway this will go in the next 3.8.2.

Francois



Le mer. 9 oct. 2019 à 09:31, Nicolas De Ville de Goyet <
[hidden email]> a écrit :

> Hello Francois,
>
> I migrate a old one (from geonetwork 3.0). I can see all my files, users,
> .... I also migrate the data directory.
>
> Actually I just tried again and it works... I downloaded the last version
> yesterday, maybe some issues were fixed in the meantime (first download of
> geonetwork 3.8 was two weeks ago).
>
> Very sorry for the false alarm, and thanks for the reply.
>
> Nicolas
>
>
> On 8/10/19 18:31, Francois Prunayre wrote:
>
> Hi, did you started from a new database or migrating from an old one ?
> Any error in the log file ?
> What type of harvester ?
>
> Cheers
>
> Francois
>
>
>
> Le mar. 8 oct. 2019 à 18:03, Nicolas De Ville de Goyet <
> [hidden email]> a écrit :
>
>> Hello everyone,
>>
>> I'm testing the new release of geonetwork 3.8. Overall it's nice and
>> easy to use.
>>
>> However I'm running into a bug: there is no possibility to harvest from
>> a new source.
>>
>> After adding the new source and saving, I read the message "Harvester
>> updated" but the new source is not visible in the harvester list.
>>
>> I tested the same operation with the same configuration with geonetwork
>> 3.6 and it works fine.
>>
>> Any idea what could cause that?
>>
>> Thanks for your help,
>>
>> Nicolas de Ville
>>
>>
>> _______________________________________________
>> GeoNetwork-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
>> GeoNetwork OpenSource is maintained at
>> http://sourceforge.net/projects/geonetwork
>>
> --
> Nicolas de Ville
> Belgian Marine Data Centre (BMDC)
> OD-Nature, Royal Belgian Institute of Natural Sciences
> 02/627.42.79www.bmdc.begeonetwork.bmdc.be
>
>

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

- TopicCategory keywords deleted

Ndeville
In reply to this post by hoddih
Hello everyone,

We have been running into a problem since last year regarding the
mandatory ISO topicCategory keywords in our metadata.

As describe in this link, there is somewhere in geonetwork a function
that delete the topicCategory elements each time we try to edit a
metadata file.

http://osgeo-org.1560.x6.nabble.com/GeoNetwork-keywords-and-topicCategory-problem-td5394221.html

TopicCategory keywords are encoded like this:

          <gmd:topicCategory>
<gmd:MD_TopicCategoryCode>biota</gmd:MD_TopicCategoryCode>
          </gmd:topicCategory>

We tried to edit the file
/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/metadata-edit.xsl
to solve the problem but we were unsuccessful so far.

Anyone already encountered that problem or has an idea how to solve it?

Thanks a lot,

Nicolas

--
Nicolas de Ville
Belgian Marine Data Centre (BMDC)
OD-Nature, Royal Belgian Institute of Natural Sciences
02/627.42.79
www.bmdc.be
geonetwork.bmdc.be


_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: - TopicCategory keywords deleted

Juan Luis Rodríguez Ponce
On Tue, Oct 15, 2019 at 3:13 PM Nicolas De Ville de Goyet <
[hidden email]> wrote:

> Hello everyone,
>
> We have been running into a problem since last year regarding the
> mandatory ISO topicCategory keywords in our metadata.
>
> As describe in this link, there is somewhere in geonetwork a function
> that delete the topicCategory elements each time we try to edit a
> metadata file.
>
>
> http://osgeo-org.1560.x6.nabble.com/GeoNetwork-keywords-and-topicCategory-problem-td5394221.html
>
> TopicCategory keywords are encoded like this:
>
>           <gmd:topicCategory>
> <gmd:MD_TopicCategoryCode>biota</gmd:MD_TopicCategoryCode>
>           </gmd:topicCategory>
>
> We tried to edit the file
> /geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/metadata-edit.xsl
>
> to solve the problem but we were unsuccessful so far.
>

You can check the file update-fixed-info.xsl [1] or the metadata schema to
check if there is something removing those elements. This XSLT
transformation is applied before saving the metadata in the database and
index.

[1]
https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl

--










*Vriendelijke groeten / Kind regards,Juan Luis Rodríguez.
<http://www.geocat.net/>Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664>Please consider the environment before printing
this email.*

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: - TopicCategory keywords deleted

Juan Luis Rodríguez Ponce
On Tue, Oct 15, 2019 at 3:50 PM Juan Luis Rodríguez Ponce <
[hidden email]> wrote:

>
>
> On Tue, Oct 15, 2019 at 3:13 PM Nicolas De Ville de Goyet <
> [hidden email]> wrote:
>
>> Hello everyone,
>>
>> We have been running into a problem since last year regarding the
>> mandatory ISO topicCategory keywords in our metadata.
>>
>> As describe in this link, there is somewhere in geonetwork a function
>> that delete the topicCategory elements each time we try to edit a
>> metadata file.
>>
>>
>> http://osgeo-org.1560.x6.nabble.com/GeoNetwork-keywords-and-topicCategory-problem-td5394221.html
>>
>> TopicCategory keywords are encoded like this:
>>
>>           <gmd:topicCategory>
>> <gmd:MD_TopicCategoryCode>biota</gmd:MD_TopicCategoryCode>
>>           </gmd:topicCategory>
>>
>> We tried to edit the file
>> /geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/metadata-edit.xsl
>>
>> to solve the problem but we were unsuccessful so far.
>>
>
> You can check the file update-fixed-info.xsl [1] or the metadata schema to
> check if there is something removing those elements. This XSLT
> transformation is applied before saving the metadata in the database and
> index.
>
> [1]
> https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl
>

 This template removes any empty gmd:topicCategory element [1] but this
doesn't seem to be your case.
<xsl:template
match="gmd:topicCategory[not(gmd:MD_TopicCategoryCode)]"
priority="10" />

[1]
https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl#L249-L251

--










*Vriendelijke groeten / Kind regards,Juan Luis Rodríguez.
<http://www.geocat.net/>Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664>Please consider the environment before printing
this email.*

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: - TopicCategory keywords deleted

Ndeville
Hello Juan,

Thanks for your answer.

After many trial I think I finally found the problem.
It seems that when you try to edit a metadata file, the 'simple' view is created dynamically gathering information from several sources (I would guess the database and the data directory).

If you change the view to 'xml' too quickly, the geonetwork only has gathered a fraction of the information and part of it is loss (such as the topicCategory keywords).

Therefore the solution to avoid the loss of information is to work slowly...

Maybe in the future versions of geonetwork this problem could be addressed?! It's a bit dangerous as you can loose metadata information quite easily.

Best,

Nicolas


On 15/10/19 15:54, Juan Luis Rodríguez Ponce wrote:


On Tue, Oct 15, 2019 at 3:50 PM Juan Luis Rodríguez Ponce <[hidden email]<mailto:[hidden email]>> wrote:


On Tue, Oct 15, 2019 at 3:13 PM Nicolas De Ville de Goyet <[hidden email]<mailto:[hidden email]>> wrote:
Hello everyone,

We have been running into a problem since last year regarding the
mandatory ISO topicCategory keywords in our metadata.

As describe in this link, there is somewhere in geonetwork a function
that delete the topicCategory elements each time we try to edit a
metadata file.

http://osgeo-org.1560.x6.nabble.com/GeoNetwork-keywords-and-topicCategory-problem-td5394221.html

TopicCategory keywords are encoded like this:

          <gmd:topicCategory>
<gmd:MD_TopicCategoryCode>biota</gmd:MD_TopicCategoryCode>
          </gmd:topicCategory>

We tried to edit the file
/geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/metadata-edit.xsl
to solve the problem but we were unsuccessful so far.

You can check the file update-fixed-info.xsl [1] or the metadata schema to check if there is something removing those elements. This XSLT transformation is applied before saving the metadata in the database and index.

[1]  https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl

 This template removes any empty gmd:topicCategory element [1] but this doesn't seem to be your case.
<xsl:template

match="gmd:topicCategory[not(gmd:MD_TopicCategoryCode)]"

priority="10" />

[1] https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl#L249-L251

--
Vriendelijke groeten / Kind regards,

Juan Luis Rodríguez.

[https://www.geocat.net/wp-content/uploads/2015/07/GeoCat_small1.png]<http://www.geocat.net/>
Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664<tel:+31318416664>

Please consider the environment before printing this email.

--
Nicolas de Ville
Belgian Marine Data Centre (BMDC)
OD-Nature, Royal Belgian Institute of Natural Sciences
02/627.42.79
www.bmdc.be<http://www.bmdc.be>
geonetwork.bmdc.be

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: - TopicCategory keywords deleted

Jose Garcia
Hi Nicolas

I got similar stuff and suspected was also due to execute any action before
the complete loading of the metadata editor, but didn't confirmed. Thanks
for confirming it.

Please if you can open an issue in GitHub to track this would be greatly
appreciated. Probably a solution can be disable all actions until all the
information required in the editor is loaded, but as loading all this stuff
using Ajax requests from different pieces of code, not really sure how
feasible it is. In the long term probably the best would be also to
optimise / reduce the number of Ajax requests to retrieve the information
required for the metadata editor.

Regards,
Jose García

On Tue, Oct 15, 2019 at 5:51 PM Nicolas De Ville de Goyet <
[hidden email]> wrote:

> Hello Juan,
>
> Thanks for your answer.
>
> After many trial I think I finally found the problem.
> It seems that when you try to edit a metadata file, the 'simple' view is
> created dynamically gathering information from several sources (I would
> guess the database and the data directory).
>
> If you change the view to 'xml' too quickly, the geonetwork only has
> gathered a fraction of the information and part of it is loss (such as the
> topicCategory keywords).
>
> Therefore the solution to avoid the loss of information is to work
> slowly...
>
> Maybe in the future versions of geonetwork this problem could be
> addressed?! It's a bit dangerous as you can loose metadata information
> quite easily.
>
> Best,
>
> Nicolas
>
>
> On 15/10/19 15:54, Juan Luis Rodríguez Ponce wrote:
>
>
> On Tue, Oct 15, 2019 at 3:50 PM Juan Luis Rodríguez Ponce <
> [hidden email]<mailto:[hidden email]>> wrote:
>
>
> On Tue, Oct 15, 2019 at 3:13 PM Nicolas De Ville de Goyet <
> [hidden email]<mailto:[hidden email]>> wrote:
> Hello everyone,
>
> We have been running into a problem since last year regarding the
> mandatory ISO topicCategory keywords in our metadata.
>
> As describe in this link, there is somewhere in geonetwork a function
> that delete the topicCategory elements each time we try to edit a
> metadata file.
>
>
> http://osgeo-org.1560.x6.nabble.com/GeoNetwork-keywords-and-topicCategory-problem-td5394221.html
>
> TopicCategory keywords are encoded like this:
>
>           <gmd:topicCategory>
> <gmd:MD_TopicCategoryCode>biota</gmd:MD_TopicCategoryCode>
>           </gmd:topicCategory>
>
> We tried to edit the file
>
> /geonetwork/WEB-INF/data/config/schema_plugins/iso19139/present/metadata-edit.xsl
> to solve the problem but we were unsuccessful so far.
>
> You can check the file update-fixed-info.xsl [1] or the metadata schema to
> check if there is something removing those elements. This XSLT
> transformation is applied before saving the metadata in the database and
> index.
>
> [1]
> https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl
>
>  This template removes any empty gmd:topicCategory element [1] but this
> doesn't seem to be your case.
> <xsl:template
>
> match="gmd:topicCategory[not(gmd:MD_TopicCategoryCode)]"
>
> priority="10" />
>
> [1]
> https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/update-fixed-info.xsl#L249-L251
>
> --
> Vriendelijke groeten / Kind regards,
>
> Juan Luis Rodríguez.
>
> [https://www.geocat.net/wp-content/uploads/2015/07/GeoCat_small1.png]<
> http://www.geocat.net/>
> Veenderweg 13
> 6721 WD Bennekom
> The Netherlands
> T: +31 (0)318 416664<tel:+31318416664>
>
> Please consider the environment before printing this email.
>
> --
> Nicolas de Ville
> Belgian Marine Data Centre (BMDC)
> OD-Nature, Royal Belgian Institute of Natural Sciences
> 02/627.42.79
> www.bmdc.be<http://www.bmdc.be>
> geonetwork.bmdc.be
>
> _______________________________________________
> GeoNetwork-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>


--











*Vriendelijke groeten / Kind regards,Jose García
<http://www.geocat.net/>Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664>Please consider the environment before printing
this email.*

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork