ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Jack" <aj...@TrySybase.com>
Subject Conclusion of .... RE: NoClassDefFoundError but class shown as loaded...
Date Tue, 10 Jun 2003 16:44:37 GMT
I ripped the class to pieces, bit-by-bit, and eventually found it:

	public final static String VERSION =
		ResourceBundle.getBundle(
			"org.krysalis.ant.taskdefs.centipede").getString(
			"version");

I'd not copied the resource bundle over, and it wasn't finding that! So, it
wasn't a great error message from the ClassLoader/ResourceBundle code (being
polite). Since this code was setting a static String, the class load was
hitting the problem.

Thanks for the help/pointers.

regards

Adam
-----Original Message-----
From: Adam Jack [mailto:ajack@trysybase.com]
Sent: Tuesday, June 10, 2003 9:32 AM
To: 'Ant Users List'
Subject: RE: NoClassDefFoundError but class shown as loaded...


	Unfortunately the current code does not give you the require infromation
about
	which class is missing (You need to print the message from the NCDFE). I'm
	fixing that now.

Yeah, I see. Thanks for committing the fix. Unfortunately I am stuck w/ this
release of ant for debugging (or I introduce a whole new set of aspects I
can't cope w/).

The classes I see in the sub-class (that won't load) that aren't in the
super-class (that will) are these:

	import java.io.File;
	import java.io.IOException;
	import java.util.Enumeration;
	import java.util.Hashtable;
	import java.util.ResourceBundle;
	import java.util.Stack;
	import java.util.Vector;

	import org.apache.tools.ant.BuildException;
	import org.apache.tools.ant.Project;
	import org.apache.tools.ant.taskdefs.Ant;
	import org.krysalis.centipede.ant.antlib.ImportAntLibTask;
	import org.w3c.dom.Document;
	import org.w3c.dom.Node;
	import org.w3c.dom.NodeList;

There is one circular dependency [which I've removed/replaced w/ no impact]
but other than that I can't see what it is.

I've tried this code, with no failures:


      <available 	classname="org.apache.tools.ant.taskdefs.Ant"
      				property="ant.task.available"
      				classpathref="lib.classpath"/>
      <fail message="Ant Task Unavailable"
      		unless="ant.task.available"/>

      <available 	classname="org.w3c.dom.Document"
      				property="dom.available"
      				classpathref="lib.classpath"/>
      <fail message="DOM Task Unavailable"
      		unless="dom.available"/>


Any pointers would be appreciated.

BTW: So the debug (posted previously) that shows the class as loaded, how is
that occuring? Is it loading the class or not? What dependency resolving
could be going on?

Thanks in advance.

regards

Adam


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message