java.lang.IllegalArgumentException: object is not an instance of declaring class

Google Groups | Mehdi Ben Abdallah | 2 months ago
  1. 0

    v3 M5 : IllegalArgumentException when using Sagas in a spring app with in memory building blocks

    Google Groups | 2 months ago | Mehdi Ben Abdallah
    java.lang.IllegalArgumentException: object is not an instance of declaring class
  2. 0

    What is wrong with my Method.invoke call?

    Stack Overflow | 9 months ago | Steffen Heil
    java.lang.IllegalArgumentException: argument type mismatch
  3. 0

    Vararg method call on mock object fails when used org.mockito.AdditionalAnswers#delegatesTo

    GitHub | 7 months ago | andreyrmg
    java.lang.IllegalArgumentException: wrong number of arguments
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Background: - The RESTful application is multi-tenant, and I need a way to restrict the returned data in REST to the current customer only. - Since DATACMNS-293 is still in progress, I am looking for a nice work-around for adding additional query terms to most (if not all) REST operations. Idea behind attempted workaround: - Create a normal repository, backed by JPA, and also extend QueryDslPredicateExecutor. Disable exposing this as a REST repository. - Create a second repository, with same generics, that is exposed with Spring REST. - Create an implementation of the second, delegating requests, with Predicate objects as applicable. Code: The 'normal' repository: {code:title=AccountRepositoryInternal.java|borderStyle=solid} @RepositoryRestResource(exported = false) public interface AccountRepositoryInternal extends PagingAndSortingRepository<Account, String>, QueryDslPredicateExecutor<Account> { } {code} The REST exposed repository: {code:title=AccountRepository.java|borderStyle=solid} @RepositoryRestResource(exported = true) //@PreAuthorize("hasRole('ADMIN')") public interface AccountRepository extends PagingAndSortingRepository<Account, String> { } {code} The implementation: {code:title=AccountRepositoryImpl.java|borderStyle=solid} public class AccountRepositoryImpl implements AccountRepository { @Autowired private AccountRepositoryInternal accounts; @Override public Page<Account> findAll(Pageable pageable) { // Simple predicate to show problem: final BooleanExpression q1 = QAccount.account.username.startsWithIgnoreCase("te"); final Page<Account> page = accounts.findAll(q1, pageable); return page; } ... snip ... {code} Problem 1: - The above code works approx 50% of the time. It seems to depend upon which Repository bean is initialized last. In cases where it does not work, the RESTful 'rel' does not appear at all and all invocations returns 404. Problem 2: - If we enable (uncomment out above in file AccountRepository.java) the PreAuthorize annotation, whenever the initialization occurs in the right order (see problem 1), the 'findAll' always works as expected. Subsequent invocations to 'findOne(id)' always fails with: {code} 23:23:46.306 [http-nio-8111-exec-2] ERROR .[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: object is not an instance of declaring class; nested exception is java.lang.IllegalArgumentException: object is not an instance of declaring class] with root cause java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:483) ~[spring-data-commons-1.11.4.RELEASE.jar:?] at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:458) ~[spring-data-commons-1.11.4.RELEASE.jar:?] at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:440) ~[spring-data-commons-1.11.4.RELEASE.jar:?] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61) ~[spring-data-commons-1.11.4.RELEASE.jar:?] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) ~[spring-tx-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) ~[spring-tx-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:131) ~[spring-data-jpa-1.9.4.RELEASE.jar:?] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at com.sun.proxy.$Proxy179.findOne(Unknown Source) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:68) ~[spring-security-core-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) ~[spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE] at com.sun.proxy.$Proxy195.findOne(Unknown Source) ~[?:?] at org.springframework.data.repository.support.CrudRepositoryInvoker.invokeFindOne(CrudRepositoryInvoker.java:91) ~[spring-data-commons-1.11.4.RELEASE.jar:?] at org.springframework.data.rest.core.support.UnwrappingRepositoryInvokerFactory$UnwrappingRepositoryInvoker.invokeFindOne(UnwrappingRepositoryInvokerFactory.java:133) ~[spring-data-rest-core-2.4.4.RELEASE.jar:?] at org.springframework.data.rest.webmvc.RepositoryEntityController.getItemResource(RepositoryEntityController.java:553) ~[spring-data-rest-webmvc-2.4.4.RELEASE.jar:?] at org.springframework.data.rest.webmvc.RepositoryEntityController.getItemResource(RepositoryEntityController.java:339) ~[spring-data-rest-webmvc-2.4.4.RELEASE.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:817) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:731) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:859) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844) ~[spring-webmvc-4.2.5.RELEASE.jar:4.2.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.0.32.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:213) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176) ~[spring-security-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:87) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522) [tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095) [tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672) [tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) [tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) [tomcat-embed-core-8.0.32.jar:8.0.32] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_92] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_92] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.32.jar:8.0.32] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92] .... {code}

    Spring JIRA | 7 months ago | Terje Strand
    java.lang.IllegalArgumentException: object is not an instance of declaring class
  6. 0

    dubbxo开发中遇到的错误总结 - 呆萌的程序猿 - SegmentFault

    segmentfault.com | 4 months ago
    org.jboss.resteasy.spi.InternalServerErrorException: Bad arguments passed to org.jboss.resteasy.spi.metadata.ResourceMethod@6b9e0ff4 ( cn.company.goods.pojos.PullOffShelves cn.company.goods.pojos.PullOffShelves@2e1cb83d )
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

    object is not an instance of declaring class

    at sun.reflect.NativeMethodAccessorImpl.invoke0()
  2. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_77]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_77]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_77]
    4. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_77]
    4 frames
  3. org.axonframework.messaging
    AnnotatedMessageHandlingMember.handle
    1. org.axonframework.messaging.annotation.AnnotatedMessageHandlingMember.handle(AnnotatedMessageHandlingMember.java:91)[axon-core-3.0-M5.jar:3.0-M5]
    1 frame
  4. org.axonframework.eventhandling
    AnnotatedSaga.lambda$handle$4
    1. org.axonframework.eventhandling.saga.SagaMethodMessageHandlingMember.handle(SagaMethodMessageHandlingMember.java:73)[axon-core-3.0-M5.jar:3.0-M5]
    2. org.axonframework.eventhandling.saga.AnnotatedSaga.lambda$null$3(AnnotatedSaga.java:102)[axon-core-3.0-M5.jar:3.0-M5]
    3. org.axonframework.eventhandling.saga.SagaLifecycle.executeWithResult(SagaLifecycle.java:64)[axon-core-3.0-M5.jar:3.0-M5]
    4. org.axonframework.eventhandling.saga.AnnotatedSaga.lambda$handle$4(AnnotatedSaga.java:102)[axon-core-3.0-M5.jar:3.0-M5]
    4 frames
  5. Java RT
    Optional.map
    1. java.util.Optional.map(Optional.java:215)[na:1.8.0_77]
    1 frame
  6. org.axonframework.eventhandling
    AbstractSagaManager.handle
    1. org.axonframework.eventhandling.saga.AnnotatedSaga.handle(AnnotatedSaga.java:100)[axon-core-3.0-M5.jar:3.0-M5]
    2. org.axonframework.eventhandling.saga.AbstractSagaManager.doInvokeSaga(AbstractSagaManager.java:109)[axon-core-3.0-M5.jar:3.0-M5]
    3. org.axonframework.eventhandling.saga.AbstractSagaManager.handle(AbstractSagaManager.java:71)[axon-core-3.0-M5.jar:3.0-M5]
    4. org.axonframework.eventhandling.saga.AbstractSagaManager.handle(AbstractSagaManager.java:39)[axon-core-3.0-M5.jar:3.0-M5]
    4 frames
  7. org.axonframework.messaging
    DefaultInterceptorChain.proceed
    1. org.axonframework.messaging.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:57)[axon-core-3.0-M5.jar:3.0-M5]
    1 frame
  8. org.axonframework.eventhandling
    AbstractEventProcessor.lambda$process$5
    1. org.axonframework.eventhandling.AbstractEventProcessor.lambda$process$5(AbstractEventProcessor.java:124)[axon-core-3.0-M5.jar:3.0-M5]
    1 frame
  9. org.axonframework.messaging
    BatchingUnitOfWork.executeWithResult
    1. org.axonframework.messaging.unitofwork.BatchingUnitOfWork.executeWithResult(BatchingUnitOfWork.java:65)[axon-core-3.0-M5.jar:3.0-M5]
    1 frame
  10. org.axonframework.eventhandling
    AbstractEventBus.lambda$prepareCommit$10
    1. org.axonframework.eventhandling.AbstractEventProcessor.process(AbstractEventProcessor.java:112)[axon-core-3.0-M5.jar:3.0-M5]
    2. org.axonframework.eventhandling.DirectEventProcessingStrategy.handle(DirectEventProcessingStrategy.java:27)[axon-core-3.0-M5.jar:3.0-M5]
    3. org.axonframework.eventhandling.SubscribingEventProcessor.lambda$start$0(SubscribingEventProcessor.java:104)[axon-core-3.0-M5.jar:3.0-M5]
    4. org.axonframework.eventhandling.AbstractEventBus.lambda$prepareCommit$10(AbstractEventBus.java:191)[axon-core-3.0-M5.jar:3.0-M5]
    4 frames
  11. Java RT
    CopyOnWriteArraySet.forEach
    1. java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890)[na:1.8.0_77]
    2. java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:404)[na:1.8.0_77]
    2 frames
  12. org.axonframework.eventhandling
    AbstractEventBus.prepareCommit
    1. org.axonframework.eventhandling.AbstractEventBus.prepareCommit(AbstractEventBus.java:191)[axon-core-3.0-M5.jar:3.0-M5]
    1 frame
  13. org.axonframework.eventsourcing
    AbstractEventStore.prepareCommit
    1. org.axonframework.eventsourcing.eventstore.AbstractEventStore.prepareCommit(AbstractEventStore.java:64)[axon-core-3.0-M5.jar:3.0-M5]
    1 frame
  14. org.axonframework.eventhandling
    AbstractEventBus.lambda$null$3
    1. org.axonframework.eventhandling.AbstractEventBus.doWithEvents(AbstractEventBus.java:179)[axon-core-3.0-M5.jar:3.0-M5]
    2. org.axonframework.eventhandling.AbstractEventBus.lambda$null$3(AbstractEventBus.java:131)[axon-core-3.0-M5.jar:3.0-M5]
    2 frames
  15. org.axonframework.messaging
    DefaultUnitOfWork.executeWithResult
    1. org.axonframework.messaging.unitofwork.MessageProcessingContext.notifyHandlers(MessageProcessingContext.java:68)[axon-core-3.0-M5.jar:3.0-M5]
    2. org.axonframework.messaging.unitofwork.DefaultUnitOfWork.notifyHandlers(DefaultUnitOfWork.java:88)[axon-core-3.0-M5.jar:3.0-M5]
    3. org.axonframework.messaging.unitofwork.AbstractUnitOfWork.changePhase(AbstractUnitOfWork.java:214)[axon-core-3.0-M5.jar:3.0-M5]
    4. org.axonframework.messaging.unitofwork.AbstractUnitOfWork.commitAsRoot(AbstractUnitOfWork.java:83)[axon-core-3.0-M5.jar:3.0-M5]
    5. org.axonframework.messaging.unitofwork.AbstractUnitOfWork.commit(AbstractUnitOfWork.java:71)[axon-core-3.0-M5.jar:3.0-M5]
    6. org.axonframework.messaging.unitofwork.DefaultUnitOfWork.executeWithResult(DefaultUnitOfWork.java:77)[axon-core-3.0-M5.jar:3.0-M5]
    6 frames
  16. org.axonframework.commandhandling
    DefaultCommandGateway.sendAndWait
    1. org.axonframework.commandhandling.SimpleCommandBus.doDispatch(SimpleCommandBus.java:143)[axon-core-3.0-M5.jar:3.0-M5]
    2. org.axonframework.commandhandling.SimpleCommandBus.doDispatch(SimpleCommandBus.java:119)[axon-core-3.0-M5.jar:3.0-M5]
    3. org.axonframework.commandhandling.SimpleCommandBus.dispatch(SimpleCommandBus.java:89)[axon-core-3.0-M5.jar:3.0-M5]
    4. org.axonframework.commandhandling.gateway.AbstractCommandGateway.send(AbstractCommandGateway.java:79)[axon-core-3.0-M5.jar:3.0-M5]
    5. org.axonframework.commandhandling.gateway.DefaultCommandGateway.send(DefaultCommandGateway.java:90)[axon-core-3.0-M5.jar:3.0-M5]
    6. org.axonframework.commandhandling.gateway.DefaultCommandGateway.sendAndWait(DefaultCommandGateway.java:108)[axon-core-3.0-M5.jar:3.0-M5]
    6 frames
  17. com.mbenabda.tontine
    MockDataInitilizingAppLifecycleListener.onApplicationEvent
    1. com.mbenabda.tontine.interfaces.web.mini.app.configuration.mockData.MockDataInitilizingAppLifecycleListener.createTontine(MockDataInitilizingAppLifecycleListener.java:69)[classes/:na]
    2. com.mbenabda.tontine.interfaces.web.mini.app.configuration.mockData.MockDataInitilizingAppLifecycleListener.initializeFakeData(MockDataInitilizingAppLifecycleListener.java:50)[classes/:na]
    3. com.mbenabda.tontine.interfaces.web.mini.app.configuration.mockData.MockDataInitilizingAppLifecycleListener.onApplicationEvent(MockDataInitilizingAppLifecycleListener.java:40)[classes/:na]
    3 frames
  18. Spring Context
    AbstractApplicationContext.finishRefresh
    1. org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    2. org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    3. org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:382)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    4. org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:336)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    5. org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:877)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    5 frames
  19. Spring Boot
    EmbeddedWebApplicationContext.finishRefresh
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    1 frame
  20. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544)[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
    1 frame
  21. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    3. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:315)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
    6 frames