[GeoNetwork-devel] [GeoNetwork opensource Developer website] #684: Thesaurus manager failed to load .xml files

#684: Thesaurus manager failed to load .xml files
---------------------+------------------------------------------------------
Reporter: fxp | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: minor | Milestone: v2.7.0
Component: General | Version:
Keywords: |
---------------------+------------------------------------------------------
Error is :

{{{
2011-11-30 10:12:43,216 ERROR [jeeves.service] - Exception when executing
service
2011-11-30 10:12:43,217 ERROR [jeeves.service] - (C) Exc :
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
2011-11-30 10:12:43,217 DEBUG [jeeves.service] - Raised exception while
executing service
<error id="error">
   <message>String index out of range: -1</message>
   <class>StringIndexOutOfBoundsException</class>
   <stack>
     <at class="java.lang.String" file="String.java" line="1937"
method="substring" />
     <at class="org.fao.geonet.kernel.Thesaurus" file="Thesaurus.java"
line="147" method="buildThesaurusKey" />
     <at class="org.fao.geonet.kernel.Thesaurus" file="Thesaurus.java"
line="109" method="getKey" />
     <at class="org.fao.geonet.kernel.ThesaurusManager"
file="ThesaurusManager.java" line="159" method="addThesaurus" />
     <at class="org.fao.geonet.services.thesaurus.Upload"
file="Upload.java" line="237" method="UploadThesaurus" />
     <at class="org.fao.geonet.services.thesaurus.Upload"
file="Upload.java" line="187" method="upload" />
     <at class="org.fao.geonet.services.thesaurus.Upload"
file="Upload.java" line="84" method="exec" />
     <at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="230" method="execService" />
     <at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="139" method="execServices" />
     <at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="408" method="dispatch" />
   </stack>
   <request>
     <language>en</language>
     <service>xml.thesaurus.upload</service>
   </request>
</error>

}}}

Workaround : rename thesaurus to .rdf

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/684&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#684: Thesaurus manager failed to load .xml files
---------------------+------------------------------------------------------
Reporter: fxp | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: minor | Milestone: v2.7.0
Component: General | Version:
Keywords: |
---------------------+------------------------------------------------------

Comment(by heikki):

I think it should be such that any file extension is supported, it should
not matter. If the contents are can't be processed correctly than some
exception will occur.

Maybe with one exception on startup, for example the extension ".do-not-
load-on-startup", so we could put example thesauri in their correct
location that we don't want to be loaded automatically on start up. These
could be still loaded manually by ad Administrator later.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/684#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#684: Thesaurus manager failed to load .xml files
---------------------+------------------------------------------------------
Reporter: fxp | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: minor | Milestone: v2.7.0
Component: General | Version:
Keywords: |
---------------------+------------------------------------------------------

Comment(by fxp):

At least support XML file (Committed revision 8474).

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/684#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#684: Thesaurus manager failed to load .xml files
---------------------+------------------------------------------------------
Reporter: fxp | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: minor | Milestone: Future release
Component: General | Version:
Keywords: |
---------------------+------------------------------------------------------
Changes (by fxp):

  * milestone: v2.7.0 => Future release

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/684#comment:3&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.