[GeoNetwork-users] Problems with GetCapabilities in GN 2.8

Hi,

In the 'CSW server configuration' I entered the 'title' and 'abstract'
fields for several languages. However, when I make the GetCapabilitites call
for diferent languages, that's it:

http://<server>/geonetwork/srv/*spa*/csw?REQUEST=GetCapabilities&SERVICE=CSW
http://<server>/geonetwork/srv/*cat*/csw?REQUEST=GetCapabilities&SERVICE=CSW

I get the capabilitites file, but the title and the abstract show in
english.

In addition, I get also that error in the geonetwork.log file, I don't know
if this is related to that problem:

/2013-04-04 13:54:54,121 INFO [jeeves.request] -

2013-04-04 13:54:54,121 INFO [jeeves.request] - HTML Request (from
195.76.106.158) : /geonetwork/srv/spa/csw
2013-04-04 13:54:54,121 DEBUG [jeeves.request] - Method : GET
2013-04-04 13:54:54,121 DEBUG [jeeves.request] - Content type : null
2013-04-04 13:54:54,121 DEBUG [jeeves.request] - Accept :
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
2013-04-04 13:54:54,121 DEBUG [jeeves.request] - Session id is
7358BF86825F73741E7E9BDA0DAF2EA8
2013-04-04 13:54:54,121 INFO [jeeves.service] - Dispatching : csw
2013-04-04 13:54:54,121 INFO [jeeves.webapp.csw] - Received:
<request>
  <version>2.0.2</version>
  <REQUEST>GetCapabilities</REQUEST>
  <SERVICE>CSW</SERVICE>
</request>
2013-04-04 13:54:54,137 DEBUG [jeeves.webapp.csw] - Adapted GET request is:
<csw:GetCapabilities xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
service="CSW" />
2013-04-04 13:54:54,137 INFO [jeeves.webapp.csw] - Dispatching operation :
GetCapabilities
2013-04-04 13:54:54,200 *ERROR* [geonetwork.csw] - *Error getting domain
value for specified PropertyName : java.lang.UnsupportedOperationException:
call getFieldInfos() on each sub reader, or use
ReaderUtil.getMergedFieldInfos, instead*
2013-04-04 13:54:54,215 INFO [jeeves.service] - -> dispatching to output
for : csw/

How can I solve that?

Thanks and best regards,
Montse

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Problems-with-GetCapabilities-in-GN-2-8-tp5044550.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

More info about this problem: only happens if INSPIRE checkbox is enabled in
the administrator menu.

I think the problem is in Getcapabilities.java (line 116 to 139). The code
is:

/if (inspireEnabled){
  String isoLangParamValue = request.getAttributeValue("language");

        List<String> langs = Lib.local.getLanguagesInspire(dbms);

        if (isoLangParamValue != null) {
          // Retrieve GN language id from Iso language id
          if (langs.contains(isoLangParamValue)) {
              currentLanguage = isoLangParamValue;
              }
        }
        String defaultLanguage = Lib.local.getDefaultLanguage(dbms);
        if (StringUtils.isEmpty(currentLanguage)) {
            *currentLanguage = defaultLanguage;*
        }
        setInspireLanguages(capabilities, langs, currentLanguage,
defaultLanguage);
} /

The sentence '/String isoLangParamValue =
request.getAttributeValue("language");/' always fills isoLangParamValue with
a null value, therefore, 'currentLanguage' variable always takes the default
language (eng).

Can anyone give a solution to try to change the code in order to arrange
that?

Thanks and best regards,
Montse

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Problems-with-GetCapabilities-in-GN-2-8-tp5044550p5044989.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi Montse, this is how it's expected to work [1]. When INSPIRE option is
enable, the LANGUAGE parameter (defined in the INSPIRE discovery service
technical guidance) of CSW requests is then used (instead of the internal
language info provided in GeoNetwork URLs).

Cheers.

Francois

[1]
http://geonetwork-opensource.org/manuals/trunk/eng/users/admin/configuration/index.html#inspire

2013/4/6 mmarco <mmarcosabate@anonymised.com>

More info about this problem: only happens if INSPIRE checkbox is enabled
in
the administrator menu.

I think the problem is in Getcapabilities.java (line 116 to 139). The code
is:

/if (inspireEnabled){
        String isoLangParamValue = request.getAttributeValue("language");

        List<String> langs = Lib.local.getLanguagesInspire(dbms);

        if (isoLangParamValue != null) {
          // Retrieve GN language id from Iso language id
          if (langs.contains(isoLangParamValue)) {
              currentLanguage = isoLangParamValue;
              }
        }
        String defaultLanguage = Lib.local.getDefaultLanguage(dbms);
        if (StringUtils.isEmpty(currentLanguage)) {
            *currentLanguage = defaultLanguage;*
        }
        setInspireLanguages(capabilities, langs, currentLanguage,
defaultLanguage);
} /

The sentence '/String isoLangParamValue =
request.getAttributeValue("language");/' always fills isoLangParamValue
with
a null value, therefore, 'currentLanguage' variable always takes the
default
language (eng).

Can anyone give a solution to try to change the code in order to arrange
that?

Thanks and best regards,
Montse

--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/Problems-with-GetCapabilities-in-GN-2-8-tp5044550p5044989.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

Thanks a lot Francois,

I didn't know about it. Unfortunately, I was reading the 2.8 manual and this
is not explained on it.

Cheers,
Montse

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Problems-with-GetCapabilities-in-GN-2-8-tp5044550p5045162.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.