Uploaded image for project: 'Santuario'
  1. Santuario
  2. SANTUARIO-365

JAXB Context from ObjectFactory....

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java 2.0.0
    • Java 2.0.0
    • Java
    • None

    Description

      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:

      --- 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);
      

      Attachments

        Activity

          People

            coheigea Colm O hEigeartaigh
            dkulp Daniel Kulp
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: