org.springframework.data.mapping.model.MappingInstantiationException: Could not instantiate bean class [com.mycompany.catalog.Transaction]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: argument type mismatch

Spring JIRA | Ludovic Praud | 4 years ago
  1. 0

    When trying to switch to spring-data-mongo-1.1.M2 from 1.0.3, I had the following stacktrace : {code} org.springframework.data.mapping.model.MappingInstantiationException: Could not instantiate bean class [com.mycompany.catalog.Transaction]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: argument type mismatch at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:77) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:230) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:210) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:174) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:170) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:73) at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1718) at org.springframework.data.mongodb.core.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:1441) at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1244) at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1233) at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:471) at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:466) at com.mycompany.catalog.repositories.AbstractRepositoryCustomMongo.findByQueryPageable(AbstractRepositoryCustomMongo.java:35) at com.mycompany.catalog.repositories.TransactionRepositoryCustomMongo.findByProduct(TransactionRepositoryCustomMongo.java:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:334) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy26.findByProduct(Unknown Source) at com.mycompany.catalog.repositories.TransactionRepositoryTest.testFindByProduct(TransactionRepositoryTest.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62) Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.mycompany.catalog.Transaction]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: argument type mismatch at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:158) at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:75) ... 50 more Caused by: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147) ... 51 more {code} After further investigation, I found that the problem come from the instanciation of my Transaction document which use @PersistenceConstructor on this constructor : {code} @PersistenceConstructor public Transaction( ObjectId id, Product product, List<Operation> operations ) {code} Spring try to instantiate it with an HashSet instead of a List for the third constructor argument. The HashSet is passed from the method {{org.springframework.data.mongodb.core.convert.MappingMongoConverter#readCollectionOrArray}} resulting in the a {{IllegalArgumentException: argument type mismatch}} The {{readCollectionOrArray}} method should return an empty collection which matches the type of the constructor param at line https://github.com/SpringSource/spring-data-mongodb/blob/master/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/MappingMongoConverter.java#L724 It may be related to : * issue DATAMONGO-458 * commit https://github.com/SpringSource/spring-data-mongodb/commit/b3a891c69b38f5b53b5f6041c9af6aa3f89afe24

    Spring JIRA | 4 years ago | Ludovic Praud
    org.springframework.data.mapping.model.MappingInstantiationException: Could not instantiate bean class [com.mycompany.catalog.Transaction]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: argument type mismatch
  2. 0

    When trying to switch to spring-data-mongo-1.1.M2 from 1.0.3, I had the following stacktrace : {code} org.springframework.data.mapping.model.MappingInstantiationException: Could not instantiate bean class [com.mycompany.catalog.Transaction]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: argument type mismatch at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:77) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:230) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:210) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:174) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:170) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:73) at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1718) at org.springframework.data.mongodb.core.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:1441) at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1244) at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1233) at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:471) at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:466) at com.mycompany.catalog.repositories.AbstractRepositoryCustomMongo.findByQueryPageable(AbstractRepositoryCustomMongo.java:35) at com.mycompany.catalog.repositories.TransactionRepositoryCustomMongo.findByProduct(TransactionRepositoryCustomMongo.java:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:334) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy26.findByProduct(Unknown Source) at com.mycompany.catalog.repositories.TransactionRepositoryTest.testFindByProduct(TransactionRepositoryTest.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62) Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.mycompany.catalog.Transaction]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: argument type mismatch at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:158) at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:75) ... 50 more Caused by: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147) ... 51 more {code} After further investigation, I found that the problem come from the instanciation of my Transaction document which use @PersistenceConstructor on this constructor : {code} @PersistenceConstructor public Transaction( ObjectId id, Product product, List<Operation> operations ) {code} Spring try to instantiate it with an HashSet instead of a List for the third constructor argument. The HashSet is passed from the method {{org.springframework.data.mongodb.core.convert.MappingMongoConverter#readCollectionOrArray}} resulting in the a {{IllegalArgumentException: argument type mismatch}} The {{readCollectionOrArray}} method should return an empty collection which matches the type of the constructor param at line https://github.com/SpringSource/spring-data-mongodb/blob/master/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/MappingMongoConverter.java#L724 It may be related to : * issue DATAMONGO-458 * commit https://github.com/SpringSource/spring-data-mongodb/commit/b3a891c69b38f5b53b5f6041c9af6aa3f89afe24

    Spring JIRA | 4 years ago | Ludovic Praud
    org.springframework.data.mapping.model.MappingInstantiationException: Could not instantiate bean class [com.mycompany.catalog.Transaction]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: argument type mismatch
  3. 0

    Persisting Objects containing Objects with spring-data-mongodb

    Stack Overflow | 4 years ago | Ben Baumgold
    org.springframework.data.mapping.model.MappingInstantiationException: Could not instantiate bean class [com.recorder.TestRecorder2$ObjectContainer]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: argument type mismatch
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Persisting objects containing primitive arrays with spring-data-mongodb

    Stack Overflow | 4 years ago | Ben Baumgold
    org.springframework.data.mapping.model.MappingInstantiationException: Could not instantiate bean class [com.recorder.SpringSourceTest$ArrayContainer]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: argument type mismatch
  6. 0

    I have the following sample model with enum values implementing an abstract method: {code:title=Entity.java} @Document public class Entity { private String id; private ImAnEnum testEnums = ImAnEnum.ONE; public String getId() { return id; } } {code} {code:title=ImAnEnum.java} @Document public enum ImAnEnum { ONE { @Override boolean somethingToDo() { return false; } }, TWO { @Override boolean somethingToDo() { return false; } }, THREE { @Override boolean somethingToDo() { return true; } }; abstract boolean somethingToDo(); } {code} When I save the entity the document looks like: {code:title=db document} { "_id" : ObjectId("4eb6bf6ef5981c320579e48b"), "_class" : "com.sejda.persistence.MongoTestEnum$Entity", "testEnums" : { "_class" : "com.sejda.persistence.MongoTestEnum$ImAnEnum$1", "name" : "ONE", "ordinal" : 0 } } {code} and when I run: {code} Entity foundEntity = mongoOps.findById(entity.getId(), Entity.class); {code} I get the following exception: {code} org.springframework.data.mapping.model.MappingInstantiationException: Could not instantiate bean class [com.sejda.persistence.MongoTestEnum$ImAnEnum$1]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: Cannot reflectively create enum objects at org.springframework.data.mapping.model.BeanWrapper.<init>(BeanWrapper.java:122) at org.springframework.data.mapping.model.BeanWrapper.create(BeanWrapper.java:73) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:255) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:203) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getValueInternal(MappingMongoConverter.java:762) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$2.doWithPersistentProperty(MappingMongoConverter.java:268) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$2.doWithPersistentProperty(MappingMongoConverter.java:258) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:173) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:258) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:203) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:171) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:77) at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1505) at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1237) at org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1081) at org.springframework.data.mongodb.core.MongoTemplate.findById(MongoTemplate.java:478) at org.springframework.data.mongodb.core.MongoTemplate.findById(MongoTemplate.java:471) at com.sejda.persistence.MongoTestEnum.testInsertAndRetrieve(MongoTestEnum.java:37) 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.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.sejda.persistence.MongoTestEnum$ImAnEnum$1]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: Cannot reflectively create enum objects at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:137) at org.springframework.data.mapping.model.BeanWrapper.<init>(BeanWrapper.java:120) ... 45 more Caused by: java.lang.IllegalArgumentException: Cannot reflectively create enum objects at java.lang.reflect.Constructor.newInstance(Constructor.java:511) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126) ... 46 more {code}

    Spring JIRA | 5 years ago | Andrea Vacondio
    org.springframework.data.mapping.model.MappingInstantiationException: Could not instantiate bean class [com.sejda.persistence.MongoTestEnum$ImAnEnum$1]: Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: Cannot reflectively create enum objects
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.NativeConstructorAccessorImpl.newInstance0()
  2. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    4 frames
  3. Spring Beans
    BeanUtils.instantiateClass
    1. org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
    2. org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:158)
    2 frames
  4. Spring Data Core
    ReflectionEntityInstantiator.createInstance
    1. org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:75)
    2. org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:77)
    2 frames
  5. Spring Data MongoDB - Core
    MongoTemplate.find
    1. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:230)
    2. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:210)
    3. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:174)
    4. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:170)
    5. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:73)
    6. org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1718)
    7. org.springframework.data.mongodb.core.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:1441)
    8. org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1244)
    9. org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:1233)
    10. org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:471)
    11. org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:466)
    11 frames
  6. com.mycompany.catalog
    TransactionRepositoryCustomMongo.findByProduct
    1. com.mycompany.catalog.repositories.AbstractRepositoryCustomMongo.findByQueryPageable(AbstractRepositoryCustomMongo.java:35)
    2. com.mycompany.catalog.repositories.TransactionRepositoryCustomMongo.findByProduct(TransactionRepositoryCustomMongo.java:64)
    2 frames
  7. Java RT
    DelegatingMethodAccessorImpl.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3 frames
  8. Spring Data Core
    RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
    1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:334)
    2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:309)
    2 frames
  9. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    2 frames
  10. Unknown
    $Proxy26.findByProduct
    1. $Proxy26.findByProduct(Unknown Source)
    1 frame
  11. com.mycompany.catalog
    TransactionRepositoryTest.testFindByProduct
    1. com.mycompany.catalog.repositories.TransactionRepositoryTest.testFindByProduct(TransactionRepositoryTest.java:49)
    1 frame
  12. Java RT
    DelegatingMethodAccessorImpl.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3 frames
  13. JUnit
    RunBefores.evaluate
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    5 frames
  14. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
    2. org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
    3. org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
    4. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
    4 frames
  15. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
    2. org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    3. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    4. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    5. org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    6. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    6 frames
  16. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
    2 frames
  17. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    1 frame
  18. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
    1 frame
  19. JUnit
    JUnitCore.run
    1. org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    1 frame
  20. IDEA
    JUnitStarter.main
    1. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
    1 frame