Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8026874

During JAXWS build the newly built JAXP classes should be in the bootclasspath (not only in the classpath)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8
    • 8
    • xml
    • b113
    • generic
    • generic

    Description

      During the JAXWS build the newly built JAXP classes should be in the bootclasspath because the JAXWS build relies on internal JAXP implementation features which may be not fullfilled in the boot JDK. Currently the newly generated JAXP classes are only in the the classpath which leads to the following build error if building with a non-OpenJDK based boot JDK:

      /usr/work/d046063/OpenJDK/ppc-aix-port/stage_0014_0015/jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java:106: error: incompatible types: SOAPDocumentImpl cannot be converted to CoreDocumentImpl
              return new SOAPDocumentFragment(this);

      This is because in the OpenJDK JAXP implementation DocumentImpl extends CoreDocumentImpl - both in the package com.sun.org.apache.xerces.internal.dom. More detailed, the class defintions look as follows:

      package com.sun.org.apache.xerces.internal.dom;

      public class DocumentImpl
          extends CoreDocumentImpl
          implements DocumentTraversal, DocumentEvent, DocumentRange {

      public class CoreDocumentImpl
          extends ParentNode
          implements Document {

      Other Java7 compliant VMs (i.e. IBM J9) can implement these internal classes differently:

      package com.sun.org.apache.xerces.internal.dom;

      public class CoreDocumentImpl extends org.apache.xerces.dom.CoreDocumentImpl {

      class DocumentImpl extends org.apache.xerces.dom.DocumentImpl


      This leads to problems during the compilation of JAXWS if this is done with a non-OpenJDK boot JDK because some JAXWS class require that DocumentImpl is derived from CoreDocumentImpl. E.g.:

      package com.sun.xml.internal.messaging.saaj.soap;
      import com.sun.org.apache.xerces.internal.dom.DocumentImpl;

      public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument {
      ...
          public DocumentFragment createDocumentFragment() {
              return new SOAPDocumentFragment(this);
          }
      ...
      }


      package com.sun.xml.internal.messaging.saaj.soap;
      import com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl;
      import com.sun.org.apache.xerces.internal.dom.DocumentFragmentImpl;

      public class SOAPDocumentFragment extends DocumentFragmentImpl {

          public SOAPDocumentFragment(CoreDocumentImpl ownerDoc) {
              super(ownerDoc);
          }

          public SOAPDocumentFragment() {
              super();
          }

      }

      Therefore building with an arbitrary Java 7 compliant JDK can only work if we prepend the newly compiled JAXP classes to the boot classpath during the compilation of the JAXWS classes. Currently however they are only in the classpath which doesn't help because in the case described below the JAXP implementation of the boot JDK will be used which doesn't fullfill the requirements of the OpenJDKs JAXWS classes.

      Attachments

        Activity

          People

            simonis Volker Simonis
            simonis Volker Simonis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: