If you're unit testing, you should instantiate only the service and mock the dependencies. If you're testing integration, you should add all the mocking to the configurations file.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • JMS message listener error
    via Stack Overflow by user3649231
  • Spring Tomcat mvc api error
    via Stack Overflow by Froodle Stirling
  • @WebMvcTest mapperscan conflict
    via Stack Overflow by wei Xiong
    • java.lang.IllegalArgumentException: Owning type must not be null! at org.springframework.util.Assert.notNull( at<init>( at

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    18 times, last one,
    16 times, last one,
    1 times, last one,
    189 more bugmates