At 02:12  6/3/01 -0800, William Lee wrote:
>At first I thought it's a classpath error.  

I think it still is ;)

>I tried to write a custom
>script that includes ONLY classpath with xalan.jar, xerces.jar, ant.jar,
>and optional.jar when I invoke Ant.  This doesn't work, however.  I
>still get the aboved error on the line:
>
>                DOMSource domSource = new DOMSource(doc);
>
>The strange thing is, when I copy over the DOM2DOM.java sample, compile,
>and run it inside Ant I actually get it to work using the same
>classpath.  

this works as a completely new classloader is created.

>Can somebody tell me what's going wrong?

Odd classpath behaviour. If you need to load a task then any dependent
classes have to be in classloader or parent classloaders. So make sure that
the task is NOT in normal CLASSPATH if its dependent jars are in supplied
classpath.

Also double check the ext dirs, ant/lib dir and any other similar dir for
stray jars.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

Reply via email to