Menu

Trouble with swingui

2002-08-05
2002-08-12
  • Rainer Bischof

    Rainer Bischof - 2002-08-05

    Cool tool, works fine. But only with the textui of JUnit...

    Whenever I switch to the swingui of JUnit I get the following error in the JUnit error pane:
    java.lang.LinkageError: loader constraints violated when linking  org/w3c/dom/Document.class

    This seems to be a known bug in Junit. The workaround is to start the swingui using the "-noloading" flag to disable the reloading of test classes.

    Took me a full day to find that out as I started with the swingui and had no clue why it did not work.
    I have seen a similar question on the help-forum. You should consider adding a comment on this issue to the readme / website!

    Cheers
    Rainer

     
    • Jeff Martin

      Jeff Martin - 2002-08-06

      Cool, thanks for the tip. That might explain some of the problems I've trying to run gui tests in IntelliJ which use XML.

      I'll check in an ISSUES file and mention it in there.

       
    • Rainer Bischof

      Rainer Bischof - 2002-08-12

      Well, I just figured out that the same error may be caused by old parsers lying around in your classpath.
      This also affects unit test controlled by ANT.
      If you start JUnit using fork="true" than the JVM will always use only the classpath you define within the build script.
      If you use fork="false" the unit test will be executed within the current JVM and the classpath defined within the buildscript is just appended to the one that ANT itself uses. This may cause old parsers to appear in the classpath and  ... tattaa ... the same error.

      probably you can catch that error, show a hint to double-check the classpath including the current classpath and then re-throw it?

      Cheers
      Rainer

       

Log in to post a comment.

MongoDB Logo MongoDB