I started to use Sun's ClassDep as a solution to fight the inclusion of unnecessary JARs in my resulting WAR application. It seems to rock. However, this beast is hard to tame!
I'm getting several errors of classes not found even if they are explicitly included in the classpath I pass to it. Example:
couldn't find: org.apache.log4j.Logger: No file for: Logger couldn't find: org.hibernate.Session: No file for: Session couldn't find: org.joda.time.LocalDate: No file for: LocalDate
HOWEVER... Check out a piece of the classpath I'm giving it:
...;"C:\Documents and Settings\Andre\Desktop\workspace\icaro\WebContent\WEB-INF\lib\hibernate3.jar";...;"C:\Documents and Settings\Andre\Desktop\workspace\icaro\WebContent\WEB-INF\lib\joda-time-1.5.2.jar";"C:\Documents and Settings\Andre\Desktop\workspace\icaro\WebContent\WEB-INF\lib\log4j-1.2.11.jar";...
I went through those and saw that the "missing" classes are actually in those files.
Anyone got any idea what gives?
I see you are running on windows. Could you be running into the infamous "Input line it too long" exception?
It's possible your Classpath is too long if you're including a large number of jar files.
This post by Hung Huynh (Terracotta) has a better explanation of the issue and a couple of options for how you can handle it if this is the problem you're having.