[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1007: Schema Plugins - mcp 1.4 schema sample records don't get added

#1007: Schema Plugins - mcp 1.4 schema sample records don't get added
---------------------------------------------+------------------------------
Reporter: awalsh | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC0
Keywords: schema plugins, sample metadata |
---------------------------------------------+------------------------------
Testing master-core GN from GIT commit 0a31ef.. (27/7/12, J. Garcia) +
ANZMEST plugin SVN 9272. Environment Windows XP, Jetty with
postgres/postgis GN db.

I make and add some XML sample metadata to the folder:
C:\ANZMEST_SVN9272\web\geonetwork\WEB-
INF\data\config\schema_plugins\iso19139.mcp-1.4\sample-data

I then attempt to load these sample records thru admin->add sample
metadata for the iso19139.mcp-1.4 schema. A windows pops up
and says 'Sample metadata Added OK' but no new records come into
the db or search results. The GN log doesn't indicate anything wrong:

2012-08-06 15:30:02,312 INFO [jeeves.request] - HTML Request (from
127.0.0.1) : /geonetwork/srv/eng/metadata.samples.add
2012-08-06 15:30:02,312 DEBUG [jeeves.request] - Method : GET
2012-08-06 15:30:02,312 DEBUG [jeeves.request] - Content type : null
2012-08-06 15:30:02,312 DEBUG [jeeves.request] - Accept :
text/javascript, text/html, application/xml, text/xml, */*
2012-08-06 15:30:02,312 DEBUG [jeeves.request] - Session id is
xu2paukhi0hjk37tfgvefqhb
2012-08-06 15:30:02,312 INFO [jeeves.service] - Dispatching :
metadata.samples.add
2012-08-06 15:30:02,312 INFO [jeeves.service] - -> dispatching to
output for : metadata.samples.add
2012-08-06 15:30:02,312 INFO [jeeves.service] - -> writing xml for :
metadata.samples.add
2012-08-06 15:30:02,312 DEBUG [jeeves.service] - Service xml is :
<response status="true" error="" />

Adding template records works OK though.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1007&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.

#1007: Schema Plugins - mcp 1.4 schema sample records don't get added
---------------------------------------------+------------------------------
Reporter: awalsh | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC0
Keywords: schema plugins, sample metadata |
---------------------------------------------+------------------------------

Comment(by ianwallen):

Andrew,

Worked for me with latest 2.8 installation and latest mcp schemaplugin

What format was the sample data? I just did a test where I added a MEF
file to the schema_plugins\iso19139.mcp-1.4\sample-data and then used the
admin->add sample metadata and it worked for me.

I created the MEF file using the following steps.

  * add/edit an MCP 1.4 record to the system

  * Search for the record - check the checkbox(to select the record) and
then select "action on selection->export(Zip)"

  * optional - modified the content from the zip file - i.e remove
"localid" and "uuid" info. If not removed then it will simply overwrite
the existing record. i.e. meaning that if you add the sample data multiple
times, you will only end up with one record but if you remove it, it will
create a new record each time sample data is added.

  * Then I renamed the *.zip file to *.mef and copied it to the "sample-
data" folder.

This may have been related to Ticket #1027 which is now fixed.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1007#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.

#1007: Schema Plugins - mcp 1.4 schema sample records don't get added
---------------------------------------------+------------------------------
Reporter: awalsh | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC0
Keywords: schema plugins, sample metadata |
---------------------------------------------+------------------------------

Comment(by awalsh):

Ian

The format of the data was a regular iso19139.mcp XML file.
I just tried it again with the newest version with schema-ident
changes and its still not working. I have attached the same file
I tried to load, perhaps you could try it too. Put into the
WEB-INF\data\config\schema_plugins\iso19139.mcp-1.4\sample-data.

It should in theory load up as the default mcp-1.4 because
the metadata version is "MCP:BlueNet V1.4"

Looking at the GN log it doesn't indicate anything wrong when
the load runs:

2012-09-05 09:12:50,576 INFO [jeeves.request] - HTML Request (from
127.0.0.1) : /geonetwork/srv/eng/metadata.samples.add
2012-09-05 09:12:50,576 DEBUG [jeeves.request] - Method : GET
2012-09-05 09:12:50,576 DEBUG [jeeves.request] - Content type : null
2012-09-05 09:12:50,576 DEBUG [jeeves.request] - Accept :
text/javascript, text/html, application/xml, text/xml, */*
2012-09-05 09:12:50,576 DEBUG [jeeves.request] - Session id is
1k8xxqzv4dft8aglqo3wic6ug
2012-09-05 09:12:50,576 INFO [jeeves.service] - Dispatching :
metadata.samples.add
2012-09-05 09:12:50,576 INFO [jeeves.service] - -> dispatching to
output for : metadata.samples.add
2012-09-05 09:12:50,576 INFO [jeeves.service] - -> writing xml for :
metadata.samples.add
2012-09-05 09:12:50,576 DEBUG [jeeves.service] - Service xml is :
<response status="true" error="" />
2012-09-05 09:12:50,576 INFO [jeeves.service] - -> output ended for :
metadata.samples.add
2012-09-05 09:12:50,576 INFO [jeeves.service] - -> dispatch ended for :
metadata.samples.add

Let us know how it goes....

Andrew

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1007#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.

#1007: Schema Plugins - mcp 1.4 schema sample records don't get added
---------------------------------------------+------------------------------
Reporter: awalsh | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC0
Keywords: schema plugins, sample metadata |
---------------------------------------------+------------------------------

Comment(by simonp):

Andrew - just loaded your attached metadata file into GN2.8RC0 with latest
schema plugins and it does import as mcp-1.4. If you want to see debug
output for the schema choice process:

* edit WEB-INF/log4j.cfg
* change log4j.logger.geonetwork.schemamanager = WARN to
log4j.logger.geonetwork.schemamanager = DEBUG
* restart geonetwork

Cheers, Simon

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1007#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.

#1007: Schema Plugins - mcp 1.4 schema sample records don't get added
---------------------------------------------+------------------------------
Reporter: awalsh | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC0
Keywords: schema plugins, sample metadata |
---------------------------------------------+------------------------------

Comment(by simonp):

Checking with MEF file now - could be that you have schema set to
iso19139.mcp in the info.xml file and that means the schema choice process
is not done - I'll check.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1007#comment:4&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.

#1007: Schema Plugins - mcp 1.4 schema sample records don't get added
---------------------------------------------+------------------------------
Reporter: awalsh | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC0
Keywords: schema plugins, sample metadata |
---------------------------------------------+------------------------------

Comment(by simonp):

Both batch import of MEF and Metadata Insert with MEF take your record
through the schema ident process and correctly assign it to
iso19139.mcp-1.4 - next test will be the sample data load

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1007#comment:5&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.

#1007: Schema Plugins - mcp 1.4 schema sample records don't get added
---------------------------------------------+------------------------------
Reporter: awalsh | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC0
Keywords: schema plugins, sample metadata |
---------------------------------------------+------------------------------

Comment(by simonp):

Placing the MEF in either iso19139.mcp/sample-data or iso19139.mcp-1.4
/sample-data takes the record through the schema ident process and
correctly assigns it to iso19139.mcp-1.4.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1007#comment:6&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.

#1007: Schema Plugins - mcp 1.4 schema sample records don't get added
---------------------------------------------+------------------------------
Reporter: awalsh | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC0
Keywords: schema plugins, sample metadata |
---------------------------------------------+------------------------------

Comment(by awalsh):

Simon and Ian,

Sorry, just realised DOH! that you can only load up MEF sample metadata.
Didn't work as I was trying to load an XML file not MEF. Working fine now,
was a good test of theschema detection anyway -:slight_smile: Fact that for templates
you can load XML misled me.

This ticket can be closed.

Cheers,

Andrew

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1007#comment:7&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.

#1007: Schema Plugins - mcp 1.4 schema sample records don't get added
----------------------+-----------------------------------------------------
  Reporter: awalsh | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC0
Resolution: fixed | Keywords: schema plugins, sample metadata
----------------------+-----------------------------------------------------
Changes (by simonp):

  * status: new => closed
  * resolution: => fixed

Comment:

Thanks Andrew, yes a good test of schema detect! Cheers, Simon.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1007#comment:8&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.

#1007: Schema Plugins - mcp 1.4 schema sample records don't get added
----------------------+-----------------------------------------------------
  Reporter: awalsh | Owner: geonetwork-devel@…
      Type: defect | Status: reopened
  Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC0
Resolution: | Keywords: schema plugins, sample metadata
----------------------+-----------------------------------------------------
Changes (by ianwallen):

  * status: closed => reopened
  * resolution: fixed =>

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1007#comment:9&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.

#1007: Schema Plugins - mcp 1.4 schema sample records don't get added
----------------------+-----------------------------------------------------
  Reporter: awalsh | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC0
Resolution: invalid | Keywords: schema plugins, sample metadata
----------------------+-----------------------------------------------------
Changes (by ianwallen):

  * status: reopened => closed
  * resolution: => invalid

Comment:

Changed resolution to invalid. - No fix was applied.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1007#comment:10&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.