com.fasterxml.jackson.databind.JsonMappingException: Unexpected token (END_OBJECT), expected FIELD_NAME: missing property '@type' that is to contain type id (for class com.datasources.DataSource) at [Source: /var/folders/g3/wtbqfj7d5fsbkz1gm74kqy380000gn/T/junit5577276768876379004/fileDataSource.json; line: 1, column: 123]

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

Samebug tips

,
Expert tip

Try indicating constructor to use @JsonCreator annotation.

,

You are trying to deserialize a type for which Jackson does not provide a default mapper. You should create your custom mapper for this type.

Solutions on the web

via Stack Overflow by daydreamer
, 1 year ago
Unexpected token (END_OBJECT), expected FIELD_NAME: missing property '@type' that is to contain type id (for class com.datasources.DataSource) at [Source: /var/folders/g3/wtbqfj7d5fsbkz1gm74kqy380000gn/T/junit5577276768876379004/fileDataSource.json; line: 1, column: 123]
via GitHub by hhimanshu
, 1 year ago
Unexpected token (END_OBJECT), expected FIELD_NAME: missing property '@type' that is to contain type id (for class com.datasources.DataSource) at [Source: /var/folders/g3/wtbqfj7d5fsbkz1gm74kqy380000gn/T/junit5577276768876379004/fileDataSource.json; line: 1, column: 123]
via GitHub by quilicicf
, 1 year ago
Unexpected token (END_OBJECT), expected FIELD_NAME: missing property 'type' that is to contain type id (for class com.fasterxml.jackson.module.jsonSchema.JsonSchema) at [Source: {}; line: 1, column: 2]
via GitHub by rpatrick00
, 2 years ago
Unexpected token (FIELD_NAME), expected START_OBJECT: need JSON Object to contain As.WRAPPER_OBJECT type information for class test.Computer at [Source: company-jackson.xml; line: 4, column: 9] (through reference chain: test.Company["computers"]->java.util.ArrayList[0])
via Tridion by Gulshan Thakur
, 5 months ago
Unexpected token (END_OBJECT), expected FIELD_NAME: missing property 'FieldType' that is to contain type id (for class org.dd4t.contentmodel.impl.BaseField) at [Source: {"Folder":{"PublicationId":"tcm:0-301-1","Id":"tcm:301-3014-2","Title
via GitHub by ecdavis
, 1 year ago
Can not deserialize instance of java.lang.String out of START_ARRAY token at [Source: [B@460ebd80; line: 1, column: 17] (through reference chain: com.amazonaws.services.lambda.invoke.LambdaFunctionError["stackTrace"]->java.util.ArrayList[0])
com.fasterxml.jackson.databind.JsonMappingException: Unexpected token (END_OBJECT), expected FIELD_NAME: missing property '@type' that is to contain type id (for class com.datasources.DataSource) at [Source: /var/folders/g3/wtbqfj7d5fsbkz1gm74kqy380000gn/T/junit5577276768876379004/fileDataSource.json; line: 1, column: 123]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:261)
at com.fasterxml.jackson.databind.DeserializationContext.wrongTokenException(DeserializationContext.java:1340)
at com.fasterxml.jackson.databind.DeserializationContext.reportWrongTokenException(DeserializationContext.java:1196)
at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedUsingDefaultImpl(AsPropertyTypeDeserializer.java:157)
at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:105)
at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:142)
at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:42)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3789)
at com.workflow.WorkflowConfigTest.testSerializeAndSerializeFileDataSourceFromFile(WorkflowConfigTest.java:55)
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:498)
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.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
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.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
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:498)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 4 months ago
4 times, 1 year ago
8 times, 1 year ago
6 times, 11 months ago
160 more bugmates

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