NetBeans/StrutsTestCase - strange error message

Discussion in 'Java' started by Tim Slattery, Jun 8, 2010.

  1. Tim Slattery

    Tim Slattery Guest

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

    --
    Tim Slattery

    http://members.cox.net/slatteryt
    Tim Slattery, Jun 8, 2010
    #1
    1. Advertising

  2. 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>
    John B. Matthews, Jun 8, 2010
    #2
    1. Advertising

  3. Tim Slattery

    Tim Slattery Guest

    "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
    Tim Slattery, Jun 9, 2010
    #3
  4. Tim Slattery

    Lew Guest

    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
    Lew, Jun 9, 2010
    #4
  5. 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>
    John B. Matthews, Jun 10, 2010
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pimousse
    Replies:
    2
    Views:
    3,620
    Roedy Green
    Apr 21, 2004
  2. Ilias Lazaridis
    Replies:
    0
    Views:
    897
    Ilias Lazaridis
    Dec 12, 2004
  3. Replies:
    0
    Views:
    397
  4. Replies:
    0
    Views:
    420
  5. Tim Slattery

    StrutsTestCase and Netbeans

    Tim Slattery, May 25, 2010, in forum: Java
    Replies:
    1
    Views:
    376
    Tim Slattery
    May 25, 2010
Loading...

Share This Page