java.lang.IllegalArgumentException: Class must not be null

Spring JIRA | Christopher Smith | 2 years ago
  1. 0

    Interface methods are eligible for annotation with Spring's {{@Async}}. When a {{GatewayProxyFactoryBean}} is used to provide an implementation for such an interface and the {{@EnableAsync}} advice is applied in proxy mode, invocations of the service method throw a {{NullPointerException}}. The exception is not thrown if {{@EnableAsync}} is not applied, and hand-writing a wrapper implementation that autowires the message channel and sends a {{GenericMessage}} with the argument as the payload works correctly. In this stack trace, {{handlePostback(PostbackObject postback)}} is declared on the {{PostbackHandler}} interface, and I used {{<int:gateway>}} to wire the method onto a message chain. {code:title=stack trace} java.lang.IllegalArgumentException: Class must not be null at org.springframework.util.Assert.notNull(Assert.java:112) at org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:279) at org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:266) at org.springframework.aop.support.annotation.AnnotationClassFilter.matches(AnnotationClassFilter.java:65) at org.springframework.aop.support.ClassFilters$UnionClassFilter.matches(ClassFilters.java:101) at org.springframework.aop.framework.DefaultAdvisorChainFactory.getInterceptorsAndDynamicInterceptionAdvice(DefaultAdvisorChainFactory.java:62) at org.springframework.aop.framework.AdvisedSupport.getInterceptorsAndDynamicInterceptionAdvice(AdvisedSupport.java:489) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:193) at com.sun.proxy.$Proxy101.handlePostback(Unknown Source) {code}

    Spring JIRA | 2 years ago | Christopher Smith
    java.lang.IllegalArgumentException: Class must not be null
  2. 0

    Interface methods are eligible for annotation with Spring's {{@Async}}. When a {{GatewayProxyFactoryBean}} is used to provide an implementation for such an interface and the {{@EnableAsync}} advice is applied in proxy mode, invocations of the service method throw a {{NullPointerException}}. The exception is not thrown if {{@EnableAsync}} is not applied, and hand-writing a wrapper implementation that autowires the message channel and sends a {{GenericMessage}} with the argument as the payload works correctly. In this stack trace, {{handlePostback(PostbackObject postback)}} is declared on the {{PostbackHandler}} interface, and I used {{<int:gateway>}} to wire the method onto a message chain. {code:title=stack trace} java.lang.IllegalArgumentException: Class must not be null at org.springframework.util.Assert.notNull(Assert.java:112) at org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:279) at org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:266) at org.springframework.aop.support.annotation.AnnotationClassFilter.matches(AnnotationClassFilter.java:65) at org.springframework.aop.support.ClassFilters$UnionClassFilter.matches(ClassFilters.java:101) at org.springframework.aop.framework.DefaultAdvisorChainFactory.getInterceptorsAndDynamicInterceptionAdvice(DefaultAdvisorChainFactory.java:62) at org.springframework.aop.framework.AdvisedSupport.getInterceptorsAndDynamicInterceptionAdvice(AdvisedSupport.java:489) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:193) at com.sun.proxy.$Proxy101.handlePostback(Unknown Source) {code}

    Spring JIRA | 2 years ago | Christopher Smith
    java.lang.IllegalArgumentException: Class must not be null
  3. 0

    @Async annotation not working

    Stack Overflow | 4 years ago | manurajhada
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationService' defined in URL [jar:file:/D:/Software/Softwares/apache-tomcat-6.0.33/temp/0-scd-web/WEB-INF/lib/security-integration-spring-1.0.1.jar!/META-INF/spring/security-impl-services-bundle-context.xml]: Unsatisfied dependency expressed through bean property 'internalAuthenticationService': : Error creating bean with name 'internalAuthenticationService': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: Class must not be null; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'internalAuthenticationService': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: Class must not be null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    BeanCreationException;nested exception is java.lang.IllegalArgument:Class must not be null

    Stack Overflow | 1 year ago | jate sun
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'subjectCcyDao' defined in file [D:\apache-tomcat-6.0.37\wtpwebapps\iEBP4JLSI-SETTLE\WEB-INF\classes\config\applicationContext-sys.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Class must not be null
  6. 0

    [INT-239] App context BeanCreationException raised when mixing annotation-driven integration components with XML integration tags - Spring JIRA

    spring.io | 11 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.test.test-gateway: Injection of resource fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchGateway': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: Class must not be null

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Class must not be null

      at org.springframework.util.Assert.notNull()
    2. Spring Core
      AnnotationUtils.findAnnotation
      1. org.springframework.util.Assert.notNull(Assert.java:112)
      2. org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:279)
      3. org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:266)
      3 frames
    3. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.support.annotation.AnnotationClassFilter.matches(AnnotationClassFilter.java:65)
      2. org.springframework.aop.support.ClassFilters$UnionClassFilter.matches(ClassFilters.java:101)
      3. org.springframework.aop.framework.DefaultAdvisorChainFactory.getInterceptorsAndDynamicInterceptionAdvice(DefaultAdvisorChainFactory.java:62)
      4. org.springframework.aop.framework.AdvisedSupport.getInterceptorsAndDynamicInterceptionAdvice(AdvisedSupport.java:489)
      5. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:193)
      5 frames
    4. com.sun.proxy
      $Proxy101.handlePostback
      1. com.sun.proxy.$Proxy101.handlePostback(Unknown Source)
      1 frame