java.lang.IllegalArgumentException: null source

Spring JIRA | Johannes Hiemer | 2 years ago
  1. 0

    When trying to access resources from Spring MVC (named custom DELETEs/PUTs above) like this: DELETE http://172.16.56.1:8080/service/entity/removeBySubInstanceId?subInstanceId=ec81d9fc48f328052fc59e1c6a34ea2f A NPE in AbstractRepositoryRestController is thrown. {code:bash} OGBACK:12:02:59.986 [tomcat-http--5] ERROR o.s.d.r.w.AbstractRepositoryRestController - null source java.lang.IllegalArgumentException: null source at java.util.EventObject.<init>(EventObject.java:56) ~[na:1.7.0_45] at org.springframework.context.ApplicationEvent.<init>(ApplicationEvent.java:42) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.data.rest.core.event.RepositoryEvent.<init>(RepositoryEvent.java:15) ~[spring-data-rest-core-2.2.0.BUILD-SNAPSHOT.jar:na] at org.springframework.data.rest.core.event.BeforeDeleteEvent.<init>(BeforeDeleteEvent.java:13) ~[spring-data-rest-core-2.2.0.BUILD-SNAPSHOT.jar:na] at org.springframework.data.rest.webmvc.RepositoryEntityController.deleteItemResource(RepositoryEntityController.java:356) ~[spring-data-rest-webmvc-2.2.0.BUILD-SNAPSHOT.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_45] at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:690) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) [spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:885) [spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:653) [servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) [spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [catalina.jar:7.0.42.A] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42.A] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] {code} Same behaviour applies for custom PUT operations afaik.

    Spring JIRA | 2 years ago | Johannes Hiemer
    java.lang.IllegalArgumentException: null source
  2. 0

    When trying to access resources from Spring MVC (named custom DELETEs/PUTs above) like this: DELETE http://172.16.56.1:8080/service/entity/removeBySubInstanceId?subInstanceId=ec81d9fc48f328052fc59e1c6a34ea2f A NPE in AbstractRepositoryRestController is thrown. {code:bash} OGBACK:12:02:59.986 [tomcat-http--5] ERROR o.s.d.r.w.AbstractRepositoryRestController - null source java.lang.IllegalArgumentException: null source at java.util.EventObject.<init>(EventObject.java:56) ~[na:1.7.0_45] at org.springframework.context.ApplicationEvent.<init>(ApplicationEvent.java:42) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.data.rest.core.event.RepositoryEvent.<init>(RepositoryEvent.java:15) ~[spring-data-rest-core-2.2.0.BUILD-SNAPSHOT.jar:na] at org.springframework.data.rest.core.event.BeforeDeleteEvent.<init>(BeforeDeleteEvent.java:13) ~[spring-data-rest-core-2.2.0.BUILD-SNAPSHOT.jar:na] at org.springframework.data.rest.webmvc.RepositoryEntityController.deleteItemResource(RepositoryEntityController.java:356) ~[spring-data-rest-webmvc-2.2.0.BUILD-SNAPSHOT.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_45] at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:690) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) [spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:885) [spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:653) [servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) [spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [catalina.jar:7.0.42.A] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.42.A] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) [spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE] {code} Same behaviour applies for custom PUT operations afaik.

    Spring JIRA | 2 years ago | Johannes Hiemer
    java.lang.IllegalArgumentException: null source
  3. 0

    filter handling on WildFly

    GitHub | 2 years ago | wkrix
    java.lang.IllegalArgumentException: null source
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 26#43706198

    GitHub | 3 years ago | jnngrm
    java.lang.IllegalArgumentException: null source

    2 unregistered visitors
    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

      null source

      at java.util.EventObject.<init>()
    2. Java RT
      EventObject.<init>
      1. java.util.EventObject.<init>(EventObject.java:56)[na:1.7.0_45]
      1 frame
    3. Spring Context
      ApplicationEvent.<init>
      1. org.springframework.context.ApplicationEvent.<init>(ApplicationEvent.java:42)[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      1 frame
    4. Spring Data REST - Core
      BeforeDeleteEvent.<init>
      1. org.springframework.data.rest.core.event.RepositoryEvent.<init>(RepositoryEvent.java:15)[spring-data-rest-core-2.2.0.BUILD-SNAPSHOT.jar:na]
      2. org.springframework.data.rest.core.event.BeforeDeleteEvent.<init>(BeforeDeleteEvent.java:13)[spring-data-rest-core-2.2.0.BUILD-SNAPSHOT.jar:na]
      2 frames
    5. Spring Data REST - WebMVC
      RepositoryEntityController.deleteItemResource
      1. org.springframework.data.rest.webmvc.RepositoryEntityController.deleteItemResource(RepositoryEntityController.java:356)[spring-data-rest-webmvc-2.2.0.BUILD-SNAPSHOT.jar:na]
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.7.0_45]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[na:1.7.0_45]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_45]
      4. java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_45]
      4 frames
    7. Spring
      InvocableHandlerMethod.invokeForRequest
      1. org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      2 frames
    8. Spring MVC
      FrameworkServlet.doDelete
      1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:690)[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      8. org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:885)[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      8 frames
    9. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:653)[servlet-api.jar:na]
      1 frame
    10. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE]
      1 frame
    11. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:728)[servlet-api.jar:na]
      1 frame
    12. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)[catalina.jar:7.0.42.A]
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)[catalina.jar:7.0.42.A]
      2 frames
    13. Spring Security
      SecurityContextHolderAwareRequestFilter.doFilter
      1. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      2. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      3. org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      4. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      5. org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      6. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      7. org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      8. org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      9. org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      9 frames