jvmti and endorsed mechanism

Jiri Vanek jvanek at redhat.com
Wed Mar 16 00:52:47 PDT 2011


On 03/15/2011 11:21 PM, Dr Andrew John Hughes wrote:
> On 13:29 Tue 15 Mar     , Jiri Vanek wrote:
>> Does anybody know why endorsed mechanism is used during build of jvmti?
>>    - exepct the one I found: that -classapth seems to me as being ignored
>> by xslt transformation done by jvmtiGen (or???)
>>
>> Current (part of) jvmti build looks like this:
>> in configure (configure.ac? - I'm not used for auto-tools) is defined
>> XALAN2_JAR nad XERCES2_JAR. Those  two files are then linked from
>> icedtea6-1.10/bootstrap/ecj/lib/endorsed.
>> icedtea6-1.10/bootstrap/ecj/lib/endorsed is set (somewhere) into
>> ENDORSED variable, which is added by jvmtiEnv.patch into jvmti.make.
>> result in jvmti.make:
>> XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) $(ENDORSED) -classpath
>> $(JvmtiOutDir) jvmtiGen
>> ...
>> $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl
>> -OUT $(JvmtiOutDir)/jvmtiEnter.cpp -PARAM interface jvmti
>>
>> where the build was failing with  Exception in thread "main"
>> java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal.
>>
>> This was caused by new version of xalan, which left xml-commons-apis
>> from its "inner" classpath.
>>
>> linking xml-commons-* from endorsed(^^) dir solved this problem
>>
>> This is exactly the state endorsed dir mechanism  should protect from -
>> there should be clases which should be used prior all other classes. In
>> our case there shoud be drop of xalan/xerces which are working instead
>> of links to /usr/share/java/... .
>>
>> Most easy fix to make icedea 1.10 build run on F15 is to link ^^
>> mentioned files from endorsed dir in makefile (if anybody can handle
>> ./configure part I will be more then happy).
>>
>> Better fixes are two - use endorsed dir properly and use working drop of
>> xalan and xerces (I'm afraid with all of those xml-commons-* beause
>> commons used by by "our-working" xalan willnot be avaiable in f15) or
>> get rid of it and use normal -classpath (which can be difficult if
>> endorsed dir was used with reason)
>>
>> Hope that I have written this clearly:)
>>
>> Regards J.
>>
>>
>>
>
> You don't provide any background here:
>
> * What JDK are you building with?

Openjdk upon Released 1.10  on f15

> * What version of Xerces?
> * What version of Xalan?

The last ones avaiable for f15:
xalan-j2-2.7.1-3.fc15
xerces-j2-2.11.0-3.fc15

>
> A full build and config.log would be good.

The background is longer stuff:

1.10 build for f15 was failing with Exception in thread "main" 
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal during 
jvmti staff building.

After some digging i have found it is xalan/xercess problem (my last 
week status and java-team irc log 9.3.2011)


Also reply of mbooth on fedora channel attached.

Regards J.


-------------- next part --------------
An embedded message was scrubbed...
From: Mat Booth <mbooth at fedoraproject.org>
Subject: Re: Changed xalan/xerces package in f15
Date: Wed, 9 Mar 2011 21:24:24 +0000
Size: 7928
Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110316/012c07f7/Changedxalan_xercespackageinf15.eml 


More information about the distro-pkg-dev mailing list