• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError with no class name

 
ryan pampush
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to run a build on a redhat box using ant and java sdk 1.6. I can build the source fine, but when I try to run the junit tests in ant it craps out when I have fork="true". If I set it to false all is good in the world. Ideally, I would like to have fork="true". I looked at the classpath and it seemed like everything was ok. One thing of note is that the ant script runs fine within eclipse regardless if fork="true" or false. It's only when it goes on the linux box it blows up. I am getting a cryptic error that says it can't find the class definition, but it doesn't tell me what class it's look for. Has anyone seen this before? First the stack trace, then the relevant pieces of the ant script.





Any ideas? Thanks!
 
ryan pampush
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another weird thing. If I take the output from the verbose where it tells me the command it runs and the arguments, if I throw that into the command prompt it executes just fine with the arguments it says it executes with, no exceptions thrown.
 
ryan pampush
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After a ridiculous amount of googling/combing the apache bugzilla page, I finally found the problem. Apparently when running a fork in ANT 1.7x if you pass a JVM arg that is empty it causes that cryptic error message. I put in dummy values for the args when they aren't used and it works fine. Ugh.

For anyone else who has a similar problem, here is a link to the bug report - may keep you a little more sane.

https://issues.apache.org/bugzilla/show_bug.cgi?id=43586
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ryan, welcome to Java Ranch, and thank you for posting that information.! I'm sure it will help others.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic