Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Bug in XOM - Static block in Verifier class (Followup)

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Oliver Geisser <oliver.geisser AT gmx.de>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] Bug in XOM - Static block in Verifier class (Followup)
  • Date: Wed, 12 May 2004 20:36:27 +0200

Hi,

in my last mail the patch fixed the wrong
error message if the characters.dat resource
is not found by the classloader.

But the real problem (Why does the classloader
do not find the resource?) remains.

I'm not sure why it works but I have found a fix.

I just changed the sequence of the classloaders.
First I try the classloader of the Verifier.class and
afterwards the current thread context classloader.

The patched version:

nu.xom.Verifier.class

...
static {
ClassLoader loader = Verifier.class.getClassLoader();
if (loader == null)loader =
Thread.currentThread().getContextClassLoader();
if (loader == null) throw new RuntimeException(
"Verifier couldn't find the right ClassLoader!");

...


This patch makes iot possible to use XOM inside a Eclipse
plugin. Without it I get a NullPointerException as described
in my previous mail


CU, Olli





  • [XOM-interest] Bug in XOM - Static block in Verifier class (Followup), Oliver Geisser, 05/12/2004

Archive powered by MHonArc 2.6.24.

Top of Page