Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Spring JIRA by Andrea Vacondio, 1 year ago
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
via Spring JIRA by Andrea Vacondio, 1 year ago
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
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)	at org.springframework.data.mapping.model.BeanWrapper.(BeanWrapper.java:120)	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)