Women in Technology

Hear us Roar



Article:
  Running Java Applications on Mac OS X
Subject:   "failed to invoke" error message
Date:   2001-07-19 14:11:20
From:   wt
Hi...


After following the instructions, the application shows the following error message:


Failed to invoke suite():java.lang.NoClassDefFoundError: junit/tests/ExceptionTestCaseTest$ThrowRuntimeExceptionTestCase


Any help would be appreciated.
Thanks.

Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • "failed to invoke" error message
    2001-11-01 16:02:52  thebluemarlin [View]

    The cause of this problem is the way that some of the .class files for inner classes in the junit/Tests directory have been chopped short somehow. The simple solution is to recompile these classes.

    Navigate to junit/tests and recompile the following java files.
    1) RepeatedTestTest.java
    2) TestImplementorTest.java
    3) ExceptionTestCaseTest.java
    4) ActiveTestTest.java

    All 90 tests should now run.

    TBM
  • "failed to invoke" error message
    2001-07-19 17:42:10  fikiri [View]

    I also got the same message when following the instructions

    Failed to invoke suite():java.lang.NoClassDefFoundError: junit/tests/ExceptionTestCaseTest$ThrowRuntimeExceptionTestCase

    My best guess is this is a classpath problem but I also would like help is someone can be more specific. Could it be related to the fact I have junit on a separate volume from my home directory?

    Fikiri
    • Daniel H. Steinberg photo "failed to invoke" error message
      2001-07-21 11:42:05  Daniel H. Steinberg | O'Reilly AuthorO'Reilly Blogger [View]

      The problem comes from the last line before the return in the JUnit included sample code. Comment it out, recompile, live happily ever after.

      More specifically, I am talking about the file "AllTests.java". Comment out the line,
      suite.addTest(junit.tests.AllTests.suite());

      Best,

      Daniel