Ticket #690 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

[M][WG] namespace problems

Reported by: lawrence Owned by: selatham
Priority: critical Milestone: Replace Metadata Gateway
Component: discovery Version:
Keywords: MDIP Cc:

Description

Still getting java.lang.NullPointerExceptions?.

Try doing a search on MDIP ...

One of these records must be the problem:

[u'grid.bodc.nerc.ac.uk__DIF__EDMED1048060.xml', u'dasshbgs.ac.uk__MDIP__BGSSEA209.xml', u'dasshbgs.ac.uk__MDIP__BGSSEA412.xml', u'grid.bodc.nerc.ac.uk__DIF__EDMED1048084.xml', u'ukho.ac.uk__MDIP__RSDRA2006000377335.xml', u'grid.bodc.nerc.ac.uk__DIF__EDMED1048049.xml', u'dassh.ac.uk__MDIP__MRMLN00400000044.xml', u'grid.bodc.nerc.ac.uk__DIF__EDMED1048091.xml', u'grid.bodc.nerc.ac.uk__DIF__EDMED1048097.xml', u'grid.bodc.nerc.ac.uk__DIF__EDMED1048002.xml']

I think we agreed that Matt's code should only cope with correct namespaces and missing namespaces. However, it shouldn't crash either! Suggest Matt modifies so returns a sensible error, then Sue fixes the content ...

Change History

comment:1 Changed 12 years ago by mpritcha

Correct, ...I just haven't done it yet for formats other than DIF. Watch this space.

comment:2 Changed 12 years ago by mpritcha

  • Owner changed from mpritcha to ko23

Looking into this, my code is actually returning verbatim an error generated within exist, rather than within my code.

java.lang.IllegalArgumentException:

Xquery works when transforming

grid.bodc.nerc.ac.uk:DIF:EDMED1048023

but not

grid.bodc.nerc.ac.uk:DIF:EDMED1048060

aka "bunker" ...did we edit this yesterday or something? Any ideas, Kev?

comment:3 Changed 12 years ago by ko23

  • Owner changed from ko23 to selatham

Hmmm... xquery just worked on both of these in my XML IDE. Last time though, wasn't the problem empty elements? There seem to be a couple in the DIF that didn't work...

Could you try updating grid.bodc.nerc.ac.uk:DIF:EDMED1048060 so it doesn't have any empty elements, convert to mini-MOLES and retry to see if this eliminates the problem?

comment:4 Changed 12 years ago by mpritcha

More usefully, here's a breakdown of ones that fail vs. ones that work:

Ones that fail:

grid.bodc.nerc.ac.uk__DIF__EDMED1048060.xml
grid.bodc.nerc.ac.uk__DIF__EDMED1048049.xml

Ones that convert OK:

grid.bodc.nerc.ac.uk__DIF__EDMED1048084.xml
grid.bodc.nerc.ac.uk__DIF__EDMED1048091.xml
grid.bodc.nerc.ac.uk__DIF__EDMED1048097.xml
grid.bodc.nerc.ac.uk__DIF__EDMED1048002.xml
dasshbgs.ac.uk__MDIP__BGSSEA209.xml
dasshbgs.ac.uk__MDIP__BGSSEA412.xml
ukho.ac.uk__MDIP__RSDRA2006000377335.xml
dassh.ac.uk__MDIP__MRMLN00400000044.xml

...What's the difference in content? (I can't see it from a quick scan of the DIFs, but I guess we need to look at the mini-Moles)

comment:5 Changed 12 years ago by selatham

  • Status changed from new to closed
  • Resolution set to fixed

Until validation and reporting back to DataProviders? has been set-up the problem has been fixed by removing namespaces at ingest and coping with absent namespaces in the queries.

Note: See TracTickets for help on using tickets.