[GeoNetwork-users] GeoNetwork XSD validation errors with schemaLocation

Hi

I have a metadata with this schemaLocation:

xsi:schemaLocation="*http://www.isotc211.org/2005/srv
<http://www.isotc211.org/2005/srv&gt;
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
<http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&gt;\*&quot;&gt;

that reports some validation issues like:

cvc-elt.1: Cannot find the declaration of element 'gmd:MD_Metadata'.
(Element: gmd:MD_Metadata with parent element: Unknown)

Removing the schemaLocation or changing it to:

xsi:schemaLocation="*http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd&gt; http://www.isotc211.org/2005/gmd/gmd\.xsd
<http://www.isotc211.org/2005/gmd/gmd.xsd&gt; *http://www.isotc211.org/2005/srv
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&quot;

validates fine. I guess that this is related to the xsd resolution, but can
someone explain how does this work?

In oasis-catalog.xml it's defined this mapping:

<system systemId="http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
" uri="schema/srv/srv.xsd"/>

I would expect that if GeoNetwork finds the following declaration in the
metadata, uses the local srv.xsd, but seem for some reason is not able to
resolve the gmd.xsd and that causes the error related to Cannot find the
declaration of element 'gmd:MD_Metadata':

xsi:schemaLocation="*http://www.isotc211.org/2005/srv
<http://www.isotc211.org/2005/srv&gt;
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
<http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&gt;\*&quot;&gt;

Any feedback would be appreciated.

Thanks and regards,
Jose García

--

* GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 13 6721 WD BennekomThe
Netherlandshttp://GeoCat.net/> *

I am trying to use "Harvesting Management" in GN 2.10.3 (also tried GN 2.10.2). I always got a msg prompt saying "Unable to add a new entry. Message: string index out of range: -1. Class StringIndexOutOfBoundsException". I looked into the output.log, and caught the following errors msg at the end of this email. I doubt it is because it does have an icon associated the CSW services. The icon dropdown menu in the "Site" section is empty. is there supposed to have a default icon? Should I add icons manually somewhere before I add a harvester?

Thanks.

Chopin

On Monday, July 7, 2014 10:59 AM, Jose Garcia <jose.garcia@anonymised.com> wrote:

Hi

I have a metadata with this schemaLocation:

xsi:schemaLocation="*http://www.isotc211.org/2005/srv
<http://www.isotc211.org/2005/srv&gt;
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
<http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&gt;\*&quot;&gt;

that reports some validation issues like:

cvc-elt.1: Cannot find the declaration of element 'gmd:MD_Metadata'.
(Element: gmd:MD_Metadata with parent element: Unknown)

Removing the schemaLocation or changing it to:

xsi:schemaLocation="*http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd&gt; http://www.isotc211.org/2005/gmd/gmd\.xsd
<http://www.isotc211.org/2005/gmd/gmd.xsd&gt; *http://www.isotc211.org/2005/srv
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&quot;

validates fine. I guess that this is related to the xsd resolution, but can
someone explain how does this work?

In oasis-catalog.xml it's defined this mapping:

<system systemId="http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
" uri="schema/srv/srv.xsd"/>

I would expect that if GeoNetwork finds the following declaration in the
metadata, uses the local srv.xsd, but seem for some reason is not able to
resolve the gmd.xsd and that causes the error related to Cannot find the
declaration of element 'gmd:MD_Metadata':

xsi:schemaLocation="*http://www.isotc211.org/2005/srv
<http://www.isotc211.org/2005/srv&gt;
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
<http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&gt;\*&quot;&gt;

Any feedback would be appreciated.

Thanks and regards,
Jose García

--

* GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 13 6721 WD BennekomThe
Netherlandshttp://GeoCat.net/> *
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
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

I am trying to use "Harvesting Management" in GN 2.10.3 (also tried GN 2.10.2). I always got a msg prompt saying "Unable to add a new entry. Message: string index out of range: -1. Class StringIndexOutOfBoundsException". I looked into the output.log, and caught the following errors msg at the end of this email. I doubt it is because it does have an icon associated the CSW services. The icon dropdown menu in the "Site" section is empty. is there supposed to have a default icon? Should I add icons manually somewhere before I add a harvester?

Thanks.

Chopin

################### Error Msg Below ################

2014-07-08 12:47:40.669:WARN:oejs.ServletHandler:/geonetwork/images/harvesting/null
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1911)
at org.fao.geonet.resources.Resources.locateResource(Resources.java:313)
at org.fao.geonet.resources.Resources.loadResource(Resources.java:243)
at org.fao.geonet.resources.ResourceFilter.doFilter(ResourceFilter.java:78)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
at org.fao.geonet.monitor.webapp.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:96)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
at
org.fao.geonet.monitor.webapp.MetricsRegistryInitializerFilter.doFilter(MetricsRegistryInitializerFilter.java:31)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:178)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:155)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:532)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:363)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)
2014-07-08 12:51:59,305 INFO [jeeves.request] - ==========================================================
2014-07-08 12:51:59,305 INFO [jeeves.request] - HTML Request (from 127.0.0.1) : /geonetwork/srv/eng/xml.harvesting.add
2014-07-08 12:51:59,309 INFO [jeeves.service] - Dispatching : xml.harvesting.add
2014-07-08 12:51:59,326 ERROR [jeeves.service] - Exception when executing service
2014-07-08 12:51:59,326 ERROR [jeeves.service] - (C) Exc :
java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Sorry. forgot to change the topic in my previous email. it is supposed to be a separate thread.
Chopin

On Tuesday, July 8, 2014 2:43 PM, Chopin hu <huchopin@anonymised.com> wrote:

I am trying to use "Harvesting Management" in GN 2.10.3 (also tried GN 2.10.2). I always got a msg prompt saying "Unable to add a new entry. Message: string index out of range: -1. Class StringIndexOutOfBoundsException". I looked into the output.log, and caught the following errors msg at the end of this email. I doubt it is because it does have an icon associated the CSW services. The icon dropdown menu in the "Site" section is empty. is there supposed to have a default icon? Should I add icons manually somewhere before I add a harvester?

Thanks.

Chopin

On Monday, July 7, 2014 10:59 AM, Jose Garcia <jose.garcia@anonymised.com> wrote:

Hi

I have a metadata with this schemaLocation:

xsi:schemaLocation="*http://www.isotc211.org/2005/srv
<http://www.isotc211.org/2005/srv&gt;
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
<http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&gt;\*&quot;&gt;

that reports some validation issues like:

cvc-elt.1: Cannot find the declaration of element 'gmd:MD_Metadata'.
(Element: gmd:MD_Metadata with parent element: Unknown)

Removing the schemaLocation or changing it to:

xsi:schemaLocation="*http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd&gt; http://www.isotc211.org/2005/gmd/gmd\.xsd
<http://www.isotc211.org/2005/gmd/gmd.xsd&gt; *http://www.isotc211.org/2005/srv
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&quot;

validates fine. I guess that this is related to the xsd resolution, but can
someone explain how does this work?

In oasis-catalog.xml it's defined this mapping:

<system systemId="http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
" uri="schema/srv/srv.xsd"/>

I would expect that if GeoNetwork finds the following declaration in the
metadata, uses the local srv.xsd, but seem for some reason is not able to
resolve the gmd.xsd and that causes the error related to
Cannot find the
declaration of element 'gmd:MD_Metadata':

xsi:schemaLocation="*http://www.isotc211.org/2005/srv
<http://www.isotc211.org/2005/srv&gt;
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
<http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&gt;\*&quot;&gt;

Any feedback would be appreciated.

Thanks and regards,
Jose García

--

* GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 13 6721 WD BennekomThe
Netherlandshttp://GeoCat.net/> *
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
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

Hi Chopin

I had the same problem last week, you are correct you need a logo

Just go to administration > Logo configuration and upload some logos,
dont forget on selecting the logo and clicking on 'Use for Catalog'

Jorge

On 07/08/2014 08:43 PM, Chopin hu wrote:

I am trying to use "Harvesting Management" in GN 2.10.3 (also tried GN 2.10.2). I always got a msg prompt saying "Unable to add a new entry. Message: string index out of range: -1. Class StringIndexOutOfBoundsException". I looked into the output.log, and caught the following errors msg at the end of this email. I doubt it is because it does have an icon associated the CSW services. The icon dropdown menu in the "Site" section is empty. is there supposed to have a default icon? Should I add icons manually somewhere before I add a harvester?

Thanks.

Chopin

On Monday, July 7, 2014 10:59 AM, Jose Garcia <jose.garcia@anonymised.com> wrote:

Hi

I have a metadata with this schemaLocation:

xsi:schemaLocation="*http://www.isotc211.org/2005/srv
<http://www.isotc211.org/2005/srv&gt;
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
<http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&gt;\*&quot;&gt;

that reports some validation issues like:

cvc-elt.1: Cannot find the declaration of element 'gmd:MD_Metadata'.
(Element: gmd:MD_Metadata with parent element: Unknown)

Removing the schemaLocation or changing it to:

xsi:schemaLocation="*http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd&gt; http://www.isotc211.org/2005/gmd/gmd\.xsd
<http://www.isotc211.org/2005/gmd/gmd.xsd&gt; *http://www.isotc211.org/2005/srv
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&quot;

validates fine. I guess that this is related to the xsd resolution, but can
someone explain how does this work?

In oasis-catalog.xml it's defined this mapping:

<system systemId="http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
" uri="schema/srv/srv.xsd"/>

I would expect that if GeoNetwork finds the following declaration in the
metadata, uses the local srv.xsd, but seem for some reason is not able to
resolve the gmd.xsd and that causes the error related to Cannot find the
declaration of element 'gmd:MD_Metadata':

xsi:schemaLocation="*http://www.isotc211.org/2005/srv
<http://www.isotc211.org/2005/srv&gt;
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
<http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&gt;\*&quot;&gt;

Any feedback would be appreciated.

Thanks and regards,
Jose García

--
ISRIC - World Soil Information Post: PO box 353, 6700 AJ, Wageningen,
The Netherlands Visiting Address: Droevendaalsesteeg 3, 6708 PB
Wageningen (Bdg. 101), Office: C.013 Office Phone: +31 (0) 317 4 83715
Mobile Phone: +31 (0) 613 9 06950 OpenPGPKey: 0xA3D0065A

Thank you very much, Jorge. Now I see how it works. A step further down to harvesting my metadata.
Chopin

On Wednesday, July 9, 2014 3:59 AM, Jorge de Jesus <jorge.mendesdejesus@anonymised.com737...> wrote:

Hi Chopin

I had the same problem last week, you are correct you need a logo

Just go to administration > Logo configuration and upload some logos,
dont forget on selecting the logo and clicking on 'Use for Catalog'

Jorge

On 07/08/2014 08:43 PM, Chopin hu wrote:

I am trying to use "Harvesting Management" in GN 2.10.3 (also tried GN 2.10.2). I always got a msg prompt saying "Unable to add a new entry. Message: string index out of range: -1. Class StringIndexOutOfBoundsException". I looked into the output.log, and caught the following errors msg at the end of this email. I doubt it is because it does have an icon associated the CSW services. The icon dropdown menu in the "Site" section is empty. is there supposed to have a default icon? Should I add icons manually somewhere before I add a harvester?

Thanks.

Chopin

On Monday, July 7, 2014 10:59 AM, Jose Garcia <jose.garcia@anonymised.com> wrote:

Hi

I have a metadata with this schemaLocation:

xsi:schemaLocation="*http://www.isotc211.org/2005/srv
<http://www.isotc211.org/2005/srv&gt;
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
<http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&gt;\*&quot;&gt;

that reports some validation issues like:

cvc-elt.1: Cannot find the declaration of element 'gmd:MD_Metadata'.
(Element: gmd:MD_Metadata with parent element: Unknown)

Removing the schemaLocation or changing it to:

xsi:schemaLocation="*http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd&gt; http://www.isotc211.org/2005/gmd/gmd\.xsd
<http://www.isotc211.org/2005/gmd/gmd.xsd&gt; *http://www.isotc211.org/2005/srv
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&quot;

validates fine. I guess that this is related to the xsd resolution, but can
someone explain how does this work?

In oasis-catalog.xml it's defined this mapping:

<system systemId="http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
" uri="schema/srv/srv.xsd"/>

I would expect that if GeoNetwork finds the following declaration in the
metadata, uses the local srv.xsd, but seem for some reason is not able to
resolve the gmd.xsd and that causes the error related to Cannot find the
declaration of element 'gmd:MD_Metadata':

xsi:schemaLocation="*http://www.isotc211.org/2005/srv
<http://www.isotc211.org/2005/srv&gt;
http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd
<http://schemas.opengis.net/iso/19139/20060504/srv/srv.xsd&gt;\*&quot;&gt;

Any feedback would be appreciated.

Thanks and regards,
Jose García

--
ISRIC - World Soil Information Post: PO box 353, 6700 AJ, Wageningen,
The Netherlands Visiting Address: Droevendaalsesteeg 3, 6708 PB
Wageningen (Bdg. 101), Office: C.013 Office Phone: +31 (0) 317 4 83715
Mobile Phone: +31 (0) 613 9 06950 OpenPGPKey: 0xA3D0065A