castor
  1. castor
  2. CASTOR-1898

Unable to resolve reference to MapItem on unmarshalling

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: XML
    • Labels:
      None
    • Environment:
      x86 Linux
      Sun JVM
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      When attempting to unmarshall a HashMap whose value is a reference, the following stack trace is generated.
      I have tried many different permutations such as making the
      MapItem value field an entity, setting it's type to java.lang.Object and
      using xsi:type but all produce similar results.

      The test case in the zip demonstrates this.

      unable to resolve reference: besteffort

      {File: [not available]; line: 28; column: 30}

      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:740)
      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:596)
      at UnresolvedReferenceTest.testUnresolvedReference(UnresolvedReferenceTest.java:29)
      at UnresolvedReferenceTest.main(UnresolvedReferenceTest.java:34)
      Caused by: 1. ValidationException: unable to resolve reference: besteffort

      2. ValidationException: unable to resolve reference: org.exolab.castor.mapping.MapItem@1f934ad
      at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:899)
      at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1108)
      at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
      at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1436)
      at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1205)
      at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
      at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:726)
      ... 3 more
      Caused by: 1. ValidationException: unable to resolve reference: besteffort

      2. ValidationException: unable to resolve reference: org.exolab.castor.mapping.MapItem@1f934ad
      at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:899)
      at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1108)
      at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
      at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1436)
      at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1205)
      at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
      at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:726)
      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:596)
      at UnresolvedReferenceTest.testUnresolvedReference(UnresolvedReferenceTest.java:29)
      at UnresolvedReferenceTest.main(UnresolvedReferenceTest.java:34)
      Caused by: 1. ValidationException: unable to resolve reference: besteffort

      2. ValidationException: unable to resolve reference: org.exolab.castor.mapping.MapItem@1f934ad
      at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:899)
      at org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:1108)
      at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
      at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1436)
      at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1205)
      at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
      at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:726)
      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:596)
      at UnresolvedReferenceTest.testUnresolvedReference(UnresolvedReferenceTest.java:29)
      at UnresolvedReferenceTest.main(UnresolvedReferenceTest.java:34)

        Activity

        Hide
        Werner Guttmann added a comment -

        Sorry, but I'd appreciate if you attached a much simplified (read minimal) test case that does not contain several hundred files.

        Show
        Werner Guttmann added a comment - Sorry, but I'd appreciate if you attached a much simplified (read minimal) test case that does not contain several hundred files.
        Hide
        Werner Guttmann added a comment -

        Matthew ?

        Show
        Werner Guttmann added a comment - Matthew ?

          People

          • Assignee:
            Unassigned
            Reporter:
            Matthew Wilson
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: