java.lang.IllegalArgumentException: argument type mismatch

Oracle Community | 421578 | 1 decade ago
  1. 0

    For the same configuration and classes as SPR-1681: http://opensource2.atlassian.com/projects/spring/browse/SPR-1681 When the debug option on javac is disabled I get the exception below. The logAuthenticationAttempt(int) method is invoked with a String argument. Exception trace: =============== org.springframework.aop.framework.AopConfigException: Mismatch on arguments to advice method [public void com.apress.beginning_spring.chapter4.security.AuthenticationLogger.logAuthenticationAttempt(int)]; pointcut expression = [org.aspectj.weaver.internal.tools.PointcutExpressionImpl@1313906]; nested exception is java.lang.IllegalArgumentException: argument type mismatch java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:503) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:485) at org.springframework.aop.aspectj.AspectJMethodBeforeAdvice.before(AspectJMethodBeforeAdvice.java:41) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:159) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:159) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643) at com.apress.beginning_spring.chapter4.security.SecurityManager$$EnhancerByCGLIB$$5b295183.authenticate(<generated>) at com.apress.beginning_spring.chapter4.security.SecurityManagerIntegrationTests.testShowLogStatements(SecurityManagerIntegrationTests.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:86)

    Spring JIRA | 1 decade ago | Steven Devijver
    java.lang.IllegalArgumentException: argument type mismatch
  2. 0

    For the same configuration and classes as SPR-1681: http://opensource2.atlassian.com/projects/spring/browse/SPR-1681 When the debug option on javac is disabled I get the exception below. The logAuthenticationAttempt(int) method is invoked with a String argument. Exception trace: =============== org.springframework.aop.framework.AopConfigException: Mismatch on arguments to advice method [public void com.apress.beginning_spring.chapter4.security.AuthenticationLogger.logAuthenticationAttempt(int)]; pointcut expression = [org.aspectj.weaver.internal.tools.PointcutExpressionImpl@1313906]; nested exception is java.lang.IllegalArgumentException: argument type mismatch java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:503) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:485) at org.springframework.aop.aspectj.AspectJMethodBeforeAdvice.before(AspectJMethodBeforeAdvice.java:41) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:159) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:159) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643) at com.apress.beginning_spring.chapter4.security.SecurityManager$$EnhancerByCGLIB$$5b295183.authenticate(<generated>) at com.apress.beginning_spring.chapter4.security.SecurityManagerIntegrationTests.testShowLogStatements(SecurityManagerIntegrationTests.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:86)

    Spring JIRA | 1 decade ago | Steven Devijver
    java.lang.IllegalArgumentException: argument type mismatch
  3. 0

    Invalid Page Request when trying to upload file

    Oracle Community | 1 decade ago | 421578
    java.lang.IllegalArgumentException: argument type mismatch
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    To pass multiple aruments to consume a webservice from mule

    Stack Overflow | 3 years ago | madhu
    java.lang.IllegalArgumentException: argument type mismatch
  6. 0

    powermock +mockito mock private method with more than on param

    Stack Overflow | 2 years ago
    java.lang.IllegalArgumentException: argument type mismatch

    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

      argument type mismatch

      at sun.reflect.NativeMethodAccessorImpl.invoke0()
    2. Java RT
      DelegatingMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3 frames