jvmti and endorsed mechanism
Dr Andrew John Hughes
ahughes at redhat.com
Tue Mar 15 15:21:13 PDT 2011
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 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?
* What version of Xerces?
* What version of Xalan?
A full build and config.log would be good.
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and IcedTea
PGP Key: F5862A37 (https://keys.indymedia.org/)
Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37
More information about the distro-pkg-dev