• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin

Commons logging not loading into Ant when using Beanshell

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
[Thumbnail for eclipse_ant_classpath.png]
eclipse ant classpath screenshot
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
All that thinking. Doesn't it hurt? What do you think about this tiny ad?
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic