You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2013/08/13 01:17:48 UTC
[jira] [Created] (SANTUARIO-365) JAXB Context from
ObjectFactory....
Daniel Kulp created SANTUARIO-365:
-------------------------------------
Summary: JAXB Context from ObjectFactory....
Key: SANTUARIO-365
URL: https://issues.apache.org/jira/browse/SANTUARIO-365
Project: Santuario
Issue Type: Bug
Components: Java
Affects Versions: Java 2.0.0
Reporter: Daniel Kulp
Assignee: Colm O hEigeartaigh
In OSGi, the context classloader that is used for the JAXBContext.newInstance can be a bit unpredictable. It would be better to create the JAXB context from the ObjectFactories directly:
{code}
--- src/main/java/org/apache/xml/security/stax/ext/XMLSecurityConstants.java (revision 1513267)
+++ src/main/java/org/apache/xml/security/stax/ext/XMLSecurityConstants.java (working copy)
@@ -76,11 +76,11 @@
try {
setJaxbContext(
JAXBContext.newInstance(
- "org.apache.xml.security.binding.xmlenc:" +
- "org.apache.xml.security.binding.xmlenc11:" +
- "org.apache.xml.security.binding.xmldsig:" +
- "org.apache.xml.security.binding.xmldsig11:" +
- "org.apache.xml.security.binding.excc14n"
+ org.apache.xml.security.binding.xmlenc.ObjectFactory.class,
+ org.apache.xml.security.binding.xmlenc11.ObjectFactory.class,
+ org.apache.xml.security.binding.xmldsig.ObjectFactory.class,
+ org.apache.xml.security.binding.xmldsig11.ObjectFactory.class,
+ org.apache.xml.security.binding.excc14n.ObjectFactory.class
)
);
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira