Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Re: JAXP & Classloading

Remko Tronçon

2010-03-07

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

> When I run the foo task, I get the following error:
>   javax.xml.parsers.FactoryConfigurationError: Provider FooTask not found

I looked a bit further into this problem, and found out that it's
probably related to the classpath with which the task is run.

During the task's execution, a class is dynamically loaded using
Class.forName(). This class is in the classpath specified when doing
the <taskdef/>, but it's not in Ant's classpath. I assume that this
means that, when Ant executes the task, it is using its own classpath,
and that's why my script fails.

It sounds like a common problem. How can I make my task reference
classes dynamically that are not on Ant's classpath?

thanks,
Remko

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.