Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > NetBeans/StrutsTestCase - strange error message

Reply
Thread Tools

NetBeans/StrutsTestCase - strange error message

 
 
Tim Slattery
Guest
Posts: n/a
 
      06-08-2010
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\.vmwebclien t\Java\Lib\vmi660.jar

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

--
Tim Slattery

http://members.cox.net/slatteryt
 
Reply With Quote
 
 
 
 
John B. Matthews
Guest
Posts: n/a
 
      06-08-2010
In article <>,
Tim Slattery <> wrote:

> ... 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.

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
 
Reply With Quote
 
 
 
 
Tim Slattery
Guest
Posts: n/a
 
      06-09-2010
"John B. Matthews" <> wrote:

>In article <>,
> Tim Slattery <> wrote:
>
>> ... 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


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.

--
Tim Slattery

http://members.cox.net/slatteryt
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      06-09-2010
John B. Matthews wrote:
>> There's a lot of possibilities:
>>
>> NetBeans' Options> Miscellaneous> Ant
>> Tools> Libraries
>> java.ext.dirs
>> nbproject/project.properties
>> ~/.netbeans/6.8/var/cache


Tim Slattery wrote:
> 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.

--
Lew
 
Reply With Quote
 
John B. Matthews
Guest
Posts: n/a
 
      06-10-2010
In article <hup3ub$d3l$>, Lew <>
wrote:

> John B. Matthews wrote:
> >> There's a lot of possibilities:
> >>
> >> NetBeans' Options > Miscellaneous > Ant
> >> Tools > Libraries
> >> java.ext.dirs
> >> nbproject/project.properties
> >> ~/.netbeans/6.8/var/cache

>
> Tim Slattery wrote:
> > Thanks, but...
> >
> > Options|Miscellaneous|Ant
> >
> > No "Tools" or "Libraries". There's an "Ant Home:" box, large boxes for

>
> John listed five separate possibilities.


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).

> > "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.


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.

<http://java.sun.com/javase/6/docs/api/java/lang/System.html#getProperties()>

> 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.

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange effects using the email.message.Message class Rogério Brito Python 1 09-09-2009 04:19 AM
Strange error message aver24@hotmail.com Java 3 11-26-2005 04:46 PM
Strange news.individual error message? Rifleman Computer Support 12 02-06-2004 12:42 AM
Apache soap package GetStock sample get strange error message jack Java 0 01-22-2004 04:31 PM
Strange error message at client Robert Wehofer ASP .Net 1 11-17-2003 06:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57