Well, the answer seems to be my own ignorance of ant. <filepath ... /> within
<classpath> did the trick (vs. pathelement path="...\*.jar" />)
Joel Klein wrote:
>
> cmose wrote:
>
>>classpath.project is defined thusly:
>><path id="classpath.project">
>> <pathelement path="${target.dir}" /> --->this is the bin directory for
>>class files
>> <pathelement path="D:\Lirbaries\*.jar" /> ---> a temporary location for
>>jar libraries
>></path>
>>
>>
> Where in this classpath is the missing class supposed to be found? If
> it's supposed to be in the second pathelement above, there's a couple
> things to check.
>
> The "Lirbaries" is a typo of "Libraries" (check what the actual
> directory is called). Also, I don't know if the wildcard (*.jar) is
> allowed in a path attribute value. If not, then that pathelement might
> not be doing anything.
>
>>Now the obnoxious thing is this, Ant runs the junit tests and manages to
get
>>through 65 out of the 72 testcases before throwing the classnotfound
>>exception. Furthermore,
>>The class it's saying it can't find, it found in a testcase it ran
previous
>>to the failed testcase (e.g., ClassNotFoundException: MyClass, MyClass was
>>already exercised in a previous testcase that the ant junit task ran
without
>>hiccup).
>>
>>
> Was MyClass "exercised" the same way that the failed test uses it? I
> wonder if it's possible that MyClass appears to be exercised in the
> passing test but isn't. A simple statement like
> System.out.println(MyClass.class.getName()) should force it to be loaded
> so you can confirm whether it can be found or not.
>
> Are there by any chance any classloaders involved in this whole mess
> that could be finding MyClass a different way than the classpath in the
> test that uses it but doesn't fail?
>
> --
> Joel Klein [Online at http://jfkbits.blogspot.com]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/classsnotfound-exception-with-junit-ant-task-tf2117062.html#a5841417
Sent from the Ant - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]