ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Redhead" <andy.redh...@openinternetsolutions.com>
Subject Classpath issues when calling ejb services
Date Tue, 13 Jan 2004 17:24:56 GMT
Hi,

 

I'm trying to build an ant task for ant 1.6 that uses a service provided by
an ejb.

 

The problem is that when I run the task, I get an error message saying that
the class I specified for "java.naming.factory.initial" cannot be found.  

 

I am trying to specify the classpath using a classpath ref, I am quite
certain that the referenced classpath accurately finds the class because the
"available" target can find it and if I print the value of my classpath
variable from within my task class, it includes the jar file.

 

If I move the jar containing the class into the ant lib directory, this
problem goes away but the next error is that the task can't find another
class that is in the classpath - I don't want to move all my classes into
the lib directory (which would rather defeat the use of a classpath at all).


 

I suspect that the problem is really my lack of understanding around how ant
loads classes for tasks, is there something I need to do within my task
class to make whatever classloader ant is using take some notice of the
classpath in my task?

 

Thanks for any suggestions

 

Andy 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message