java.lang.Exception: Method XZY should have no parameters

Did you ever stumbled across the following error during developing test-cases with JUnit and JMockit?

java.lang.Exception: Method XZY should have no parameters

Here is the quick and easy fix for it: Fix the ordering of the dependencies in your pom.xml. The dependency for JMockit has to come first!

Funded by the Europian Union

This article was published in the course of a resarch-project, that is funded by the European Union and the federal state Northrhine-Wetphalia.

Europäische Union: Investitionen in unsere Zukunft - Europäischer Fonds für regionale Entwicklung EFRE.NRW 2014-2020: Invesitionen in Wachstum und Beschäftigung

Comments / Questions

  1. dz says:

    It works! Thank you!

  2. Jifar Mekonnen says:

    I fixed my pom as you said and it worked!

    Thank you!

Leave a Reply to dz Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>