Bug #2835


Data Manager Library: Run-time errors involving Xalan classes

Added by Duane Costa almost 16 years ago. Updated almost 16 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


Two developers (myself and Chad Burt) are getting run-time errors when our applications try to use the Data Manager library. The errors are NoClassDefFoundError involving Xalan classes.

On 4/30/2007, Chad Burt wrote:

Hi guys,
I am trying to deploy my sbc app with the datamanager library on a different machine and am having some problems. It seems to be missing a dependancy that is not on this fedora linux machine. I get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xpath/axes/PredicatedNodeTest

I never ran into this problem on my mac, i just built the jar and it worked fine. Originally I thought it was because the jar needed to be recompiled because I was on a different machine. So I copied the whole eml tree over, hit "ant clean", then "ant dist-datamanager-lib", and uncompressed the zip to get my jar. No error messages. Ran my dataset import method based off the sample applications and I got the same error.

Is there some kind of apache library I need to have on this machine to get the datamanager library working?

Here is the full stack trace:
Exception in thread "main" java.lang.NoClassDefFoundError : org/apache/xpath/axes/PredicatedNodeTest
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(
at (
at Method)
at java.lang.ClassLoader.loadClass( :306)
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
at org.apache.xpath.XPath.<init>(
at org.apache.xpath.CachedXPathAPI.eval(
at org.apache.xpath.CachedXPathAPI.selectNodeIterator( :216)
at org.apache.xpath.CachedXPathAPI.selectSingleNode(
at org.apache.xpath.CachedXPathAPI.selectSingleNode(
at org.ecoinformatics.datamanager.parser.eml.Eml200Parser.parseDocument (
at org.ecoinformatics.datamanager.parser.eml.Eml200Parser.parse(
at org.ecoinformatics.datamanager.DataManager.parseMetadata(
at org.ecoinformatics.datamanager.sample.ImportDataset.testParseMetadata(
at org.ecoinformatics.datamanager.sample.ImportDataset.main(

-Chad Burt

On 4/30/2007, Duane Costa wrote:

Hi Chad,

I recently started experiencing a very similar run-time error on my Windows machine in an application I am developing that uses the datamanager library too. The only difference is that in my case the NoClassDefFoundError was for a different class:


After a little trial and error, I found that I could resolve the error by incorporating a newer version of xalan.jar, based on Xalan-Java Version 2.7.0, into my classpath. I am attaching the xalan.jar file that fixed the problem for me. It seems that the NodeTest class was missing from the older xalan.jar but present in the newer xalan.jar. I'm guessing that the same might be true for the PredicatedNodeTest class.

I don't really understand was caused the error to start occurring; it may have something to do with the Java version I am running (I upgraded from Java 1.4.2 to Java 1.5.0 fairly recently). Jing and I will need to investigate this further. Meanwhile, as a temporary fix, could you try including the new xalan.jar file in your sbc application's classpath and let us know if that resolves the error for you?


On 4/30/2007, Chad Burt wrote:

Thanks Duane,
I'm not too familiar with java and classpaths. I'm calling the datamanager.jar from the command line. I replaced eml/lib/apache/xalan.jar with the one you gave me. Is that correct? I'm getting the same error.

On 4/30/2007, Duane Costa wrote:

Hi Chad,

Interesting, I did exactly what you did, replaced eml/lib/apache/xalan.jar with the one I sent you, and rebuilt datamanager.jar using 'ant jar-datamanager-lib'. Now I'm getting the same error you've been getting! So the new xalan.jar obviously is not the solution, but at least we're getting the same error now. This is going to take more investigation. I'll try to get this figured out. Meanwhile, could you please send me the following?:

(1) The output from running 'java -version' in a command window on your system.
(2) The output from running 'echo $CLASSPATH' in a command window on your system.
(3) The exact command you use when you run the Data Manager library code.


On 4/30/2007, Char Burt wrote:

Here's my info:

java -version:
java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

$CLASSPATH doesn't seem to be set, nor $CLASS_PATH. It's not set on my mac either.

I am running a custom method based on the sample apps. I've attached the file. It's usually under /src/org/ecoinformatics/datamanager/sample/
I call it via :
java -cp "datamanager.jar" org.ecoinformatics.datamanager.sample.ImportDataset > /dev/null

Thanks for the help,


Also available in: Atom PDF