Java Load Order, Dom 3 and Retrotranslator

I’ve successfully converted some Java 1.5 classes to a 1.4 Jar using RetroTranslator. I initially added them directly to the agent, but I was getting a ‘ClassCastException’ for ‘retrotranslator.runtime.java.util.EnumSet’. I tried moving the 1.4 jar to the ‘jvm\lib\ext’ folder and it started working, and also works if I had the file to the JavaUserClasses variable in the INI file.

However, it now throws a ‘no such method’ error for ‘NormalizeDocument’, which is a DOM3 method the 1.4 jar uses. The solution to this is to use the latest Xerces parser (2.9.1), and I have the following line both in the agent code, and in the 1.4 jar:

System.setProperty(

“javax.xml.parsers.DocumentBuilderFactory”,

“org.apache.xerces.jaxp.DocumentBuilderFactoryImpl”);

However, the error is still there, so I can only assume that the 1.4 jar, loaded via either JavaUserClasses or the EXT folder isn’t seeing the xerces stuff. I’ve tried putting the xerces files on JavaUserClasses before the 1.4, but it still errors out.

The frustration is that the code works fine in Eclipse, so it’s got to be something crazy about the way Domino loads classes.

Can anyone help?

Thanks,

Karl

Subject: Endorsed folder under JVM?

I found a solution, but I’m not sure how dangerous it is: I created a directory called ‘endorsed’ under my client’s jvm\lib folder, and put the Xerces jars in there. This apparently forces the JVM to use those files before any on the classpath:

http://xml.apache.org/xalan-j/faq.html#jdk14

Will that cause damage elsewhere, especially when I start running the agent on the server?

Thanks,

Karl

Subject: RE: Endorsed folder under JVM?

Karl,

I just started using this approach… seems to work fine so far. Have you found any problems, or learned anything that would lead you to believe that this is unsafe?

Kevin