ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prashant Reddy <prash...@pramati.com>
Subject Re: No class Def Error
Date Wed, 05 Sep 2007 09:31:59 GMT
On Wed, 2007-09-05 at 14:56 +0530, Ramu Sethu wrote:
> hi
> 
> We are working in EJB and we use jboss-all-clent.jar. We have custom
> task which makes use jboss-all-cleint.jar
> 
> When we run our custom task with the taskdef which has
> jboss-all-client.jar in classpath, what we get is No class found error
> . We avoided this by adding the jar in environment variable class
> path. But i don't know why ant doesn't take the class even though we
> added the jar in class path
> Also our junit task test cases uses the same jar. We don't get no
> class def when we run the junit task alone.
> 
> Why custom task doesn't take  that from the classpath. Am i missing some thing ?

May be ANT is dropping the jar you have arranged in classpath because it
points to non-existent file location. Run ant in verbose mode (ant
-verbose) and check if the required jars are infact set in classpath.


> 
> 
> I have added the trace below
> 
> [MyTask] javax.naming.NoInitialContextException: Cannot instantiate
> class: org.jnp.interfaces.NamingContextFactory [
> Root exception is java.lang.ClassNotFoundException:
> org.jnp.interfaces.NamingContextFactory]

Looks like org.jnp.interfaces.NamingContextFactory is not in the classpath. Is the jar that
has this class in the classpath ?

HTH
-Prashant


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


Mime
View raw message