[
https://issues.apache.org/jira/browse/TUSCANY-3628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891168#action_12891168
]
Mike Edwards commented on TUSCANY-3628:
---------------------------------------
Initial fix, that only fixes the MAIN code path affected by this bug committed
in:
966650
This does not remove the offending line in BaseAssemblyProcessor, but instead
overrides the writePropertyValue method in the CompositeProcessor subclass.
The offending line is replaced by:
XMLStreamReader reader = staxHelper.createXMLStreamReader(node);
This avoids the offending code in and outside OSGi.
The problem fixing the BaseAssemblyProcessor class is that getting access to
the StAXHelper is a pain in the neck and BaseAssemblyProcessor is used from a
number of places which will require some substantial updates to make it work.
Why on earth do we make it so hard to get access to the ExtensionRegistry -
it's a great tool, but we limit the places that can access it by only passing
pieces from the registry to many parts of the code. This limits its usefulness
and inflicts pain whenever we need to access some feature that is in the
registry that we did not do before...
> Tuscany fails with InvalidURI exception when running OASIS testcases under
> OSGi
> -------------------------------------------------------------------------------
>
> Key: TUSCANY-3628
> URL: https://issues.apache.org/jira/browse/TUSCANY-3628
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Core Runtime
> Affects Versions: Java-SCA-2.0-M5
> Reporter: Mike Edwards
> Fix For: Java-SCA-2.0
>
>
> When running OASIS testcases under OSGi typical testcases cause an InvalidURI
> exception or an UnsupportedOperation exception, always associated with:
> at
> org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.writePropertyValue(BaseAssemblyProcessor.java:685)
> at
> org.apache.tuscany.sca.assembly.xml.CompositeProcessor.write(CompositeProcessor.java:868)
> On investigation, the line of code causing the problem is this one in
> BaseAssemblyProcessor.writePropertyValue:
> .... XMLStreamReader reader =
> XMLInputFactory.newInstance().createXMLStreamReader(new DOMSource(node));
> This is not a good technique for creating an XMLStreamReader from a DOM Node
> - the Java SDK JavaDoc warns about it, but the Tuscany code is using it - and
> it is failing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.