Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 1.10
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:

      ubuntu tomcat eclipse jdk1.7_25

      Description

      When the data includes invalid char in xml, it will throw exception and no data info provided:

      javax.ws.rs.WebApplicationException: javax.xml.bind.UnmarshalException

      • with linked exception:
        [org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 9818; An invalid XML character (Unicode: 0x1f) was found in the element content of the document.]

        Activity

        Hide
        Libor Kramolis added a comment -

        What framework do you use to marshall DB data to POJO? I still don't see where the problem is. Is the problem to read data from do to POJO? Or formating POJO to XML result? Thanks for answer.

        Show
        Libor Kramolis added a comment - What framework do you use to marshall DB data to POJO? I still don't see where the problem is. Is the problem to read data from do to POJO? Or formating POJO to XML result? Thanks for answer.
        Hide
        feuyeux added a comment -

        What framework do you use to marshall DB data to POJO?
        JPA2

        I still don't see where the problem is. Is the problem to read data from do to POJO?
        db rows to POJO

        Or formating POJO to XML result? Thanks for answer.
        We support POJO to XML and JSON, it's due to JAXB.

        Thanks for your support and our workaround is to valid the row data manually before read them.

        Show
        feuyeux added a comment - What framework do you use to marshall DB data to POJO? JPA2 I still don't see where the problem is. Is the problem to read data from do to POJO? db rows to POJO Or formating POJO to XML result? Thanks for answer. We support POJO to XML and JSON, it's due to JAXB. Thanks for your support and our workaround is to valid the row data manually before read them.
        Hide
        Libor Kramolis added a comment -

        It means you use same set of classes to read DB data and also as REST API model classes? Same classes has JPA and JAXB annotations?

        Could you provide a test application. Stacktrace could also help.

        I still have problem to understand you can get

        [org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 9818; An invalid XML character (Unicode: 0x1f) was found in the element content of the document.]
        

        during marshalling POJO to XML. I would expect SAXParseException during reading XML not while write XML.

        Show
        Libor Kramolis added a comment - It means you use same set of classes to read DB data and also as REST API model classes? Same classes has JPA and JAXB annotations? Could you provide a test application. Stacktrace could also help. I still have problem to understand you can get [org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 9818; An invalid XML character (Unicode: 0x1f) was found in the element content of the document.] during marshalling POJO to XML. I would expect SAXParseException during reading XML not while write XML.
        Hide
        Libor Kramolis added a comment -

        Requesting more info, reopen then.

        Show
        Libor Kramolis added a comment - Requesting more info, reopen then.
        Hide
        feuyeux added a comment -

        Hello Libor Kramolis,
        Thanks for your support!
        Not same thing. The JPA POJO is named with *Model and JAXB POJO is named with *DTO, so it's transformed in inner-biz-coding.
        Actually, it's not a testing app, it's real product of my company, so, sorry to say it's hard to provide the code.

        Unicode: 0x1f is an illegal char from the row data in the database.
        So, maybe you're right, it occurs at reading. For me, I just take care of the way for handling the invalid char.

        Show
        feuyeux added a comment - Hello Libor Kramolis, Thanks for your support! Not same thing. The JPA POJO is named with *Model and JAXB POJO is named with *DTO, so it's transformed in inner-biz-coding. Actually, it's not a testing app, it's real product of my company, so, sorry to say it's hard to provide the code. Unicode: 0x1f is an illegal char from the row data in the database. So, maybe you're right, it occurs at reading. For me, I just take care of the way for handling the invalid char.

          People

          • Assignee:
            Unassigned
            Reporter:
            feuyeux
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: