Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1234 closed defect (fixed)

Thesaurus / Add keyword to newly created local thesaurus return exception

Reported by: fxp Owned by: geonetwork-devel@…
Priority: major Milestone: v2.10.0 RC2
Component: General Version: v2.9.0
Keywords: Cc:

Description

2013-03-10 05:11:38,727 INFO  [jeeves.request] - ==========================================================
2013-03-10 05:11:38,727 INFO  [jeeves.request] - HTML Request (from 127.0.0.1) : /geonetwork/srv/eng/thesaurus.addelement
2013-03-10 05:11:38,727 DEBUG [jeeves.request] - Method       : POST
2013-03-10 05:11:38,728 DEBUG [jeeves.request] - Content type : text/xml
2013-03-10 05:11:38,728 DEBUG [jeeves.request] - Accept       : */*
2013-03-10 05:11:38,728 DEBUG [jeeves.request] - Session id is 19bx85jxw1qmun25gtjz20vng
2013-03-10 05:11:38,729 INFO  [jeeves.service] - Dispatching : thesaurus.addelement
2013-03-10 05:11:38,731 ERROR [jeeves.service] - Exception when executing service
2013-03-10 05:11:38,731 ERROR [jeeves.service] -  (C) Exc : java.lang.IllegalArgumentException: namespace must not be null
2013-03-10 05:11:38,731 DEBUG [jeeves.service] - Raised exception while executing service
<error id="error">
  <message>namespace must not be null</message>
  <class>IllegalArgumentException</class>
  <stack>
    <at class="org.openrdf.model.impl.URIImpl" file="URIImpl.java" line="167" method="&lt;init&gt;" />
    <at class="org.openrdf.sesame.sailimpl.memory.RdfSource" file="RdfSource.java" line="758" method="createURI" />
    <at class="org.fao.geonet.kernel.Thesaurus" file="Thesaurus.java" line="303" method="addElement" />
    <at class="org.fao.geonet.services.thesaurus.AddElement" file="AddElement.java" line="92" method="exec" />

When catalog is restarted, the namespace is set (with "#") and the error is not triggered.

Proposal:

  • set default namespace for local thesaurus
  • or add namespace to local thesaurus creation parameters

Change History (3)

comment:1 by jesseeichar, 12 years ago

I like setting an explicit namespace in creation params although there may be backwards compatilbity issues so a default local NS is probably easier and less likely to be buggy.

comment:2 by fxp, 12 years ago

Resolution: fixed
Status: newclosed

master commit c12529660f90ad6f7a3aa4dcd94f254f98635bed

See #1251 to be able to set thesaurus title and namespace for local thesaurus.

comment:3 by ianwallen, 12 years ago

Milestone: Future releasev2.10.0 RC2
Note: See TracTickets for help on using tickets.