RFR(XS): 8026874 : During JAXWS build the newly built JAXP classes should be in the bootclasspath (not only in the classpath)
Volker Simonis
volker.simonis at gmail.com
Fri Oct 18 14:41:23 UTC 2013
Hi,
could somebody please review and sponsor (i.e. push) the following small fix:
http://cr.openjdk.java.net/~simonis/webrevs/8026874/
https://bugs.openjdk.java.net/browse/JDK-8026874
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 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.
More information about the build-dev
mailing list