Felix
  1. Felix
  2. FELIX-3108

SCR doesn't cope when the DS xml is not encoded using the default platform encoding.

    Details

      Description

      I've been trying to use felix SCR on z/OS (insane I know). The default platform encoding for z/OS is EBCDIC. When parsing my DS component xml I get the following exception in the log:

      !STACK 0
      org.xmlpull.v1.XmlPullParserException: unterminated entity ref (position:TEXT ÃŒ_%€ÎÁÊËÃ'?>Â'...@1:239 in java.io.BufferedReader@71fedaf)
      at org.kxml2.io.KXmlParser.exception(Unknown Source)
      at org.kxml2.io.KXmlParser.error(Unknown Source)
      at org.kxml2.io.KXmlParser.pushEntity(Unknown Source)
      at org.kxml2.io.KXmlParser.pushText(Unknown Source)
      at org.kxml2.io.KXmlParser.nextImpl(Unknown Source)
      at org.kxml2.io.KXmlParser.next(Unknown Source)
      at org.apache.felix.scr.impl.parser.KXml2SAXParser.parseXML(KXml2SAXParser.java:62)
      at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:227)

      The component.xml is UTF-8 encoded not EBCDIC. The DS spec 112.4.2 (page 310) says that the file is UTF-8 encoded so it should be able to parse it. I suspect the BundleComponentActivator creates an InputStreamReader and doesn't provide an encoding which is why I see this problem.

        Activity

        Felix Meschberger made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Felix Meschberger added a comment -

        Close after release

        Show
        Felix Meschberger added a comment - Close after release
        Felix Meschberger made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s scr-1.6.2 [ 12315248 ]
        Resolution Fixed [ 1 ]
        Hide
        Felix Meschberger added a comment -

        Fixed in Rev. 1166104

        Show
        Felix Meschberger added a comment - Fixed in Rev. 1166104
        Felix Meschberger committed 1166104 (1 file)
        Reviews: none

        FELIX-3108 Fix a beginners bug by fixing the reader character stream to be UTF-8 instead of the platform encoding ...

        Hide
        Felix Meschberger added a comment -

        Autsch, you are right. What a young-boy's bug

        Thanks for reporting

        Show
        Felix Meschberger added a comment - Autsch, you are right. What a young-boy's bug Thanks for reporting
        Felix Meschberger made changes -
        Field Original Value New Value
        Assignee Felix Meschberger [ fmeschbe ]
        Alasdair Nottingham created issue -

          People

          • Assignee:
            Felix Meschberger
            Reporter:
            Alasdair Nottingham
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development