• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Commons logging not loading into Ant when using Beanshell

 
Mike Mootin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a tag in my ant build (1.7.1), and am executing it from within Eclipse. I have it set to "use same JRE as workspace". When Ant goes to execute the beanshell script, I am getting the error "java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory". However I can clearly see that Ant is on the classpath (see attachment).

I have also tried moving the jar into ANT_HOME/lib and get the same results. Using give "C:\ganymede2\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar" - not at all useful of course.

What's strange is that when I execute Ant using a separate JRE (instead of the workspace one), Ant is able to load the commons logging class, but then I run into other problems related to eclipse compiler-related stuff not being on the classpath.

I recently upgraded to using Java 1.6, so thought it might be related. However, switching back to 1.5 doesn't make any difference.
eclipse_ant_classpath.png
[Thumbnail for eclipse_ant_classpath.png]
eclipse ant classpath screenshot
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IIRC you need to set the classpath inside Ant, either in the build file, or in the Ant Eclipse setup (I could be way off base on this though).

Having Ant on the classpath, as you state you have, isn't relevant; that's not the error you're getting.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic