NetBeans/StrutsTestCase - strange error message

T

Tim Slattery

I've used StrutsTestCase (an extension of JUnit version 3) to test a
Struts Action object in NetBeans 6.8. It works - from logging
statements in the code I can see that the test runs all the way
through, returns to my object that extends MockStrutsTestCase, and
successfully performs the verifyForward statement.

The "Test Results" page shows a red bar and "No test passed". But in
the "Output" pane, it says "Tests run: 1, Failures: 0, Errors: 0, Time
elapsed: 0.656 sec". What causes the "Test Results" pane to report
failure is this message in the Output pane:

WARNING: multiple versions of ant detected in path for junit

jar:file:/D:/Program%20Files/NetBeans%206.8/java3/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
and
jar:file:/D:/bea10/modules/org.apache.ant_1.6.5/lib/ant.jar!/org/apache/tools/ant/Project.class

Both these libraries exist on my machine. I have no clue why NB is
finding the bea10 library. Opening a console window and showing
CLASSPATH yields only:

CLASSPATH=C:\WINNT\Profiles\SLATTERY_T\.vmwebclient\Java\Lib\vmi660.jar

which doesn't seem to have anything to do with this. So WTF is going
on"?
 
J

John B. Matthews

Tim Slattery said:
... NetBeans 6.8 ...

WARNING: multiple versions of ant detected in path for junit
...
So WTF is going on"?

There's a lot of possibilities:

NetBeans' Options > Miscellaneous > Ant
Tools > Libraries
java.ext.dirs
nbproject/project.properties
~/.netbeans/6.8/var/cache

Not long ago, NetBeans began insisting that it couldn't show me the
javadoc for certain specific classes in java.*. It turns out that
something in cache was persuading NB to compile those classes instead of
using the library versions. I suspect operator error, but rm -rf ended
the dispute.
 
T

Tim Slattery

John B. Matthews said:
There's a lot of possibilities:

NetBeans' Options > Miscellaneous > Ant
Tools > Libraries
java.ext.dirs
nbproject/project.properties
~/.netbeans/6.8/var/cache

Thanks, but...

Options|Miscellaneous|Ant

No "Tools" or "Libraries". There's an "Ant Home:" box, large boxes for
"Classpath" (empty) and Properties (build.compiler.emacs=true). three
checkboxes and buttons to add/remove/rearrange things in the Classpath
box.

The "Ant Home" box points to the "ant" subdirectory within Netbeans.
 
L

Lew

Tim said:
Thanks, but...

Options|Miscellaneous|Ant

No "Tools" or "Libraries". There's an "Ant Home:" box, large boxes for

John listed five separate possibilities. In NB 6.8 the "Tools" menu pad is
not within the "Ant" menu. I assure you there is a "Tools" menu pad in NB.
Right there in plain sight, two positions to the left of the "Help" menu pad
on the far right. See it?
"Classpath" (empty) and Properties (build.compiler.emacs=true). three
checkboxes and buttons to add/remove/rearrange things in the Classpath
box.

The "Ant Home" box points to the "ant" subdirectory within Netbeans.

Try looking where John suggested.

For reference, "java.ext.dirs" is set externally with a "-D" command. The
"nbproject/project.properties" file is in your project subdirectory. The
"cache" subdirectory is literally at the location John mentioned.
 
J

John B. Matthews

Tim said:
Thanks, but...

Options|Miscellaneous|Ant

No "Tools" or "Libraries". There's an "Ant Home:" box, large boxes for

John listed five separate possibilities.[/QUOTE]

Lew: Thank you for clarifying that.
In NB 6.8 the "Tools" menu pad is not within the "Ant" menu. I
assure you there is a "Tools" menu pad in NB. Right there in plain
sight, two positions to the left of the "Help" menu pad on the far
right. See it?

Tim: You're looking for "bea10". The same information in the Tools >
Libraries menu is found in ~/.netbeans/6.8/build.properties (or the
Windows equivalent).

Tim: No "bea10"?
Try looking where John suggested.

For reference, "java.ext.dirs" is set externally with a "-D" command.

Lew: Good point. I usually search the directories found in the
corresponding system property, but those can change.

The "nbproject/project.properties" file is in your project
subdirectory. The "cache" subdirectory is literally at the location
John mentioned.

Tim: Deleting the entire cache seems harmless on my platform, but I
don't know about Windows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top