org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type org.bson.types.ObjectId for value 'de-DE'; nested exception is java.lang.IllegalArgumentException: invalid ObjectId [de-DE]

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 Christian Laakmann, 1 year ago
Failed to convert from type java.lang.String to type org.bson.types.ObjectId for value 'de-DE'; nested exception is java.lang.IllegalArgumentException: invalid ObjectId [de-DE]
via Spring JIRA by Christian Laakmann, 1 year ago
Failed to convert from type java.lang.String to type org.bson.types.ObjectId for value 'de-DE'; nested exception is java.lang.IllegalArgumentException: invalid ObjectId [de-DE]
via GitHub by mike00151
, 2 years ago
Failed to convert from type com.sequenceiq.cloudbreak.controller.json.CredentialJson to type com.sequenceiq.cloudbreak.domain.OpenStackCredential for value 'com.sequenceiq.cloudbreak.controller.json.CredentialJson@4df90256'; nested exception is
via GitHub by mike00151
, 2 years ago
Failed to convert from type com.sequenceiq.cloudbreak.controller.json.CredentialJson to type com.sequenceiq.cloudbreak.domain.OpenStackCredential for value 'com.sequenceiq.cloudbreak.controller.json.CredentialJson@6dfa7248'; nested exception is
via Spring JIRA by drypot, 1 year ago
Failed to convert from type java.lang.String to type java.math.BigInteger for value 'KKaK'; nested exception is java.lang.NumberFormatException: For input string: "KKaK"
via Spring JIRA by drypot, 1 year ago
Failed to convert from type java.lang.String to type java.math.BigInteger for value 'KKaK'; nested exception is java.lang.NumberFormatException: For input string: "KKaK"
java.lang.IllegalArgumentException: invalid ObjectId [de-DE]
at org.bson.types.ObjectId.(ObjectId.java:200)
at org.bson.types.ObjectId.(ObjectId.java:186)
at com.example.LoadLocaleWithCustomConverter$StringToObjectIdConverter.convert(LoadLocaleWithCustomConverter.java:85)
at com.example.LoadLocaleWithCustomConverter$StringToObjectIdConverter.convert(LoadLocaleWithCustomConverter.java:81)
at org.springframework.core.convert.support.GenericConversionService$ConverterAdapter.convert(GenericConversionService.java:375)
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:35)
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getPotentiallyConvertedSimpleWrite(MappingMongoConverter.java:792)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeSimpleInternal(MappingMongoConverter.java:773)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:78)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$3.doWithPersistentProperty(MappingMongoConverter.java:430)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:416)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:390)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.write(MappingMongoConverter.java:354)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.write(MappingMongoConverter.java:78)
at org.springframework.data.mongodb.core.MongoTemplate.toDbObject(MongoTemplate.java:813)
at org.springframework.data.mongodb.core.MongoTemplate.doSave(MongoTemplate.java:972)
at org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:921)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:483)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:468)
at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.sun.proxy.$Proxy51.save(Unknown Source)
at com.example.LoadLocaleWithCustomConverter.setup(LoadLocaleWithCustomConverter.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:254)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)

Users with the same issue

5 times, 1 year ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.