[
https://issues.apache.org/jira/browse/FELIX-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038180#comment-13038180
]
Andrew Pimlott commented on FELIX-2962:
---------------------------------------
I can immediately offer (each line a complete example of a malformed XML file
accepted by Felix SCR):
<a>
</a>
<a><b></a></b>
The XML 1.1 spec says that XML processors "must report violations of this
specification's well-formedness constraints". I would expect that if any of
these were used as a Service-Component, I would get an exception about
malformed XML from Bundle.start.
Beyond the correctness issue, quality of diagnostics is a key differentiator
between implementations of OSGi, since they all follow the same spec. I filed
this issue because I got a totally misleading error message when I tried to
start my bundle, where the root cause was malformed XML. Worse, I want to
write a program on top of Felix that accepts bundles. If I can't provide
accurate diagnostics to users about errors in their bundles, it hurts the
quality of my program.
> SCR doesn't detect invalid XML
> ------------------------------
>
> Key: FELIX-2962
> URL: https://issues.apache.org/jira/browse/FELIX-2962
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.6.0
> Reporter: Andrew Pimlott
> Labels: xml
>
> The XML parser (kxml2) used by SCR doesn't detect many forms of incorrect
> XML, even basic errors like mismatched start and end tags. This makes
> diagnosing component load errors very frustrating. Please use a real XML
> parser. It will save developers a lot of pain.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira