• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any ideas why my class isn't getting found?

 
Dave Alvarado
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wrote a custom task for Ant (using Ant 1.7, Java 1.6). The custom task references the log4j framework, and even though I include it in my classpath, I'm getting a "class cannot be found" error. Here is the relevant part of my Ant task ...



and here is the output I'm getting ...



Notice that log4j is included. I have verified the path exists. Any ideas what else I should check for? - Dave
 
Greg Charles
Sheriff
Posts: 2993
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, that's a puzzle. Still, it must be something. You're picking up log4j from Tomcat, right? (/Library/Tomcat/Home/common/log4j-1.2.4.jar) I'd suggest to keep picking at the obvious things. Is the jar really there with exactly the same name? (I know you verified it already, and Ant must be picking it up somehow. Still a quick "file /Library/Tomcat/Home/common/log4j-1.2.4.jar" would double-check) Is the file readable by whatever user is running Ant? If you look in the jar, is the Logger class there and in the right package?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic