Opened 12 years ago

Last modified 12 years ago

#684 new defect

Thesaurus manager failed to load .xml files

Reported by: fxp Owned by: geonetwork-devel@…
Priority: minor Milestone: Future release
Component: General Version:
Keywords: Cc:

Description

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

Change History (3)

comment:1 by heikki, 12 years ago

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.

comment:2 by fxp, 12 years ago

At least support XML file (Committed revision 8474).

comment:3 by fxp, 12 years ago

Milestone: v2.7.0Future release
Note: See TracTickets for help on using tickets.