Opened 12 years ago

Closed 12 years ago

#1007 closed defect (invalid)

Schema Plugins - mcp 1.4 schema sample records don't get added

Reported by: awalsh Owned by: geonetwork-devel@…
Priority: major Milestone: v2.8.0
Component: General Version: v2.8.0RC0
Keywords: schema plugins, sample metadata Cc: simon.pigot@…, craig.jones@…

Description

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.

Attachments (2)

iso19139.mcp_sample.xml (30.6 KB ) - added by awalsh 12 years ago.
mcp xml sample
mcp-1.4.png (45.5 KB ) - added by simonp 12 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by ianwallen, 12 years ago

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.

by awalsh, 12 years ago

Attachment: iso19139.mcp_sample.xml added

mcp xml sample

comment:2 by awalsh, 12 years ago

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

by simonp, 12 years ago

Attachment: mcp-1.4.png added

comment:3 by simonp, 12 years ago

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

comment:4 by simonp, 12 years ago

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.

comment:5 by simonp, 12 years ago

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

comment:6 by simonp, 12 years ago

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.

comment:7 by awalsh, 12 years ago

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 -:) Fact that for templates you can load XML misled me.

This ticket can be closed.

Cheers,

Andrew

comment:8 by simonp, 12 years ago

Resolution: fixed
Status: newclosed

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

comment:9 by ianwallen, 12 years ago

Resolution: fixed
Status: closedreopened

comment:10 by ianwallen, 12 years ago

Resolution: invalid
Status: reopenedclosed

Changed resolution to invalid. - No fix was applied.

Note: See TracTickets for help on using tickets.