java.lang.IllegalArgumentException: method: org.qi4j.api.entity.association.ManyAssociation.add delegate: class org.qi4j.runtime.injection.UsesGenericClassTest delegateType: java.lang.Class arguments: java.lang.Integer $Proxy84

JIRA | Niclas Hedhman | 7 years ago
  1. 0

    It happens intermittently that the AssociationDecoratorTest fails with the exception below. This is very worrying to me, as it could be indeterministic code somewhere causing it. java.lang.IllegalArgumentException: method: org.qi4j.api.entity.association.ManyAssociation.add delegate: class org.qi4j.runtime.injection.UsesGenericClassTest delegateType: java.lang.Class arguments: java.lang.Integer $Proxy84 at org.qi4j.runtime.entity.associations.DecoratorMixin.invoke(DecoratorMixin.java:67) at org.qi4j.runtime.composite.GenericFragmentInvocationHandler.invoke(GenericFragmentInvocationHandler.java:38) at $Proxy85.add(Unknown Source) at org.qi4j.runtime.entity.associations.AssociationDecoratorTest$EmployeesAuditConcern.add(AssociationDecoratorTest.java:119) at org.qi4j.runtime.entity.associations.AssociationDecoratorTest$EmployeesAuditConcern.add(AssociationDecoratorTest.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.qi4j.runtime.composite.TypedModifierInvocationHandler.invoke(TypedModifierInvocationHandler.java:39) at org.qi4j.runtime.composite.MethodConcernsInstance.invoke(MethodConcernsInstance.java:48) at org.qi4j.runtime.composite.CompositeMethodInstance.invoke(CompositeMethodInstance.java:59) at org.qi4j.runtime.composite.TransientInstance.invoke(TransientInstance.java:128) at org.qi4j.runtime.composite.CompositeMethodModel.invoke(CompositeMethodModel.java:148) at org.qi4j.runtime.composite.CompositeMethodsModel.invoke(CompositeMethodsModel.java:113) at org.qi4j.runtime.composite.AbstractCompositeModel.invoke(AbstractCompositeModel.java:115) at org.qi4j.runtime.composite.TransientInstance.invoke(TransientInstance.java:57) at $Proxy81.add(Unknown Source) at org.qi4j.runtime.entity.associations.AssociationDecoratorTest.testAssociationDecorator(AssociationDecoratorTest.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42) at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.qi4j.runtime.entity.associations.DecoratorMixin.invoke(DecoratorMixin.java:57) ... 44 more

    JIRA | 7 years ago | Niclas Hedhman
    java.lang.IllegalArgumentException: method: org.qi4j.api.entity.association.ManyAssociation.add delegate: class org.qi4j.runtime.injection.UsesGenericClassTest delegateType: java.lang.Class arguments: java.lang.Integer $Proxy84
  2. 0

    WebappMetricsFilter : IllegalArgumentException: object is not an instance of declaring class

    GitHub | 4 years ago | udgupta
    java.lang.IllegalArgumentException: object is not an instance of declaring class
  3. 0

    Spring+JPA+DAO+Tomcat

    Stack Overflow | 5 years ago | Ivan
    java.lang.IllegalArgumentException: object is not an instance of declaring class
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    What Jersey doesn't like in my Stateless Session Bean?

    Stack Overflow | 6 years ago | yegor256
    java.lang.IllegalArgumentException: object is not an instance of declaring class
  6. 0

    java.lang.illegalArgumentException when calling pumpEvents using reflection

    Stack Overflow | 5 years ago | GPAshka
    java.lang.RuntimeException: java.lang.IllegalArgumentException: object is not an instance of declaring class

  1. Aria Pahlavan 16 times, last 3 weeks ago
  2. kjhdofjosvs 2 times, last 1 month ago
  3. tyson925 2 times, last 1 month ago
  4. kuldeep 2 times, last 2 months ago
  5. aldrinleal 1 times, last 5 months ago
6 more registered users
72 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

    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)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  3. org.qi4j.runtime
    GenericFragmentInvocationHandler.invoke
    1. org.qi4j.runtime.entity.associations.DecoratorMixin.invoke(DecoratorMixin.java:57)
    2. org.qi4j.runtime.composite.GenericFragmentInvocationHandler.invoke(GenericFragmentInvocationHandler.java:38)
    2 frames
  4. Unknown
    $Proxy85.add
    1. $Proxy85.add(Unknown Source)
    1 frame
  5. org.qi4j.runtime
    AssociationDecoratorTest$EmployeesAuditConcern.add
    1. org.qi4j.runtime.entity.associations.AssociationDecoratorTest$EmployeesAuditConcern.add(AssociationDecoratorTest.java:119)
    2. org.qi4j.runtime.entity.associations.AssociationDecoratorTest$EmployeesAuditConcern.add(AssociationDecoratorTest.java:112)
    2 frames
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  7. org.qi4j.runtime
    TransientInstance.invoke
    1. org.qi4j.runtime.composite.TypedModifierInvocationHandler.invoke(TypedModifierInvocationHandler.java:39)
    2. org.qi4j.runtime.composite.MethodConcernsInstance.invoke(MethodConcernsInstance.java:48)
    3. org.qi4j.runtime.composite.CompositeMethodInstance.invoke(CompositeMethodInstance.java:59)
    4. org.qi4j.runtime.composite.TransientInstance.invoke(TransientInstance.java:128)
    5. org.qi4j.runtime.composite.CompositeMethodModel.invoke(CompositeMethodModel.java:148)
    6. org.qi4j.runtime.composite.CompositeMethodsModel.invoke(CompositeMethodsModel.java:113)
    7. org.qi4j.runtime.composite.AbstractCompositeModel.invoke(AbstractCompositeModel.java:115)
    8. org.qi4j.runtime.composite.TransientInstance.invoke(TransientInstance.java:57)
    8 frames
  8. Unknown
    $Proxy81.add
    1. $Proxy81.add(Unknown Source)
    1 frame
  9. org.qi4j.runtime
    AssociationDecoratorTest.testAssociationDecorator
    1. org.qi4j.runtime.entity.associations.AssociationDecoratorTest.testAssociationDecorator(AssociationDecoratorTest.java:71)
    1 frame
  10. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  11. JUnit
    JUnit4ClassRunner.run
    1. org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
    2. org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
    3. org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
    4. org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
    5. org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
    6. org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
    7. org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
    8. org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
    9. org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
    10. org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
    11. org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
    12. org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
    12 frames
  12. JUnit4 Provider
    JUnit4TestSet.execute
    1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
    1 frame
  13. SureFire
    Surefire.run
    1. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
    2. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
    3. org.apache.maven.surefire.Surefire.run(Surefire.java:177)
    3 frames
  14. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  15. SureFire
    SurefireBooter.main
    1. org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
    2. org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
    2 frames