Assert.notNull() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
Javadoc
Thrown to indicate that a method has been passed an illegal or inappropriate argument. @author unascribed @since JDK1.0
at org.springframework.util.Assert.notNull
(source)

Typical Exception Messages

  1. A ServletContext is required to configure default servlet handling
  2. [Assertion failed] - this argument is required; it must not be null
  3. Cannot load an ApplicationContext with a NULL 'contextLoader'. Consider annotating your test class with @ContextConfiguration or @ContextHierarchy.
  4. Class must not be null
  5. WebApplicationContext is required
  6. @EnableAsync annotation metadata was not injected
  7. PersistentEntity must not be null!
  8. ResourceLoader must not be null
  9. Target object must not be null
  10. Resource must not be null

Specific cases

External results for this pattern (554)

  1. michavia Stack Overflow11 hours ago
    [Assertion failed] - this argument is required; it must not be null
    Show stack trace
  2. Unknown authorvia spring.io14 hours ago
    Connection must not be null
    Show stack trace
  3. Johnvia Stack Overflow1 day ago
    [Assertion failed] - this argument is required; it must not be null
    Show stack trace
  4. Failed to register servlet with name 'dispatcher'.Check if there is another servlet registered under the same name.
    Show stack trace
  5. Unable to load dataset from "personTestData.xml" using class com.github.springtestdbunit.dataset.FlatXmlDataSetLoader
    Show stack trace
  6. Target object must not be null
    Show stack trace
  7. Klausvia Stack Overflow1 day ago
    [Assertion failed] - this argument is required; it must not be null
    Show stack trace
  8. Cannot load an ApplicationContext with a NULL 'contextLoader'. Consider annotating your test class with @ContextConfiguration or @ContextHierarchy.
    Show stack trace
  9. WebApplicationContext is required
    Show stack trace
  10. [Assertion failed] - this argument is required; it must not be null
    Show stack trace