org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Template must not be null or empty! (through reference chain: com.wraith.repository.entity.Account["type"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Template must not be null or empty! (through reference chain: com.wraith.repository.entity.Account["type"])

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.io by Unknown author, 2 years ago
Could not read JSON: Template must not be null or empty! (through reference chain: com.wraith.repository.entity.Account["type"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Template must not be null or empty! (through reference chain: com.wraith.repository.entity.Account["type"])
via Spring JIRA by Rowan Massey, 1 year ago
Could not read JSON: Template must not be null or empty! (through reference chain: com.wraith.repository.entity.Account["type"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Template must not be null or empty! (through reference chain: com.wraith.repository.entity.Account["type"])
via Spring JIRA by Rowan Massey, 1 year ago
Could not read JSON: Template must not be null or empty! (through reference chain: com.wraith.repository.entity.Account["type"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Template must not be null or empty! (through reference chain: com.wraith.repository.entity.Account["type"])
via Stack Overflow by Unknown author, 2 years ago
Could not read JSON: (was java.lang.NullPointerException) (through reference chain: test.Category["products"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: test.Category["products"])
via Spring JIRA by Petar Tahchiev, 1 year ago
reference chain: com.xxxxxx.platform.core.model.i18n.LocalizedValue["en"]); nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "en" (class com.xxxxxx.platform.core.model.i18n.LocalizedValue), not
via Spring JIRA by Craig Walls, 1 year ago
: java.io.ByteArrayInputStream@7e305fb2; line: 1, column: 2]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class org.springframework.social.facebook.api.FacebookProfile]: can not instantiate from JSON object (need to add/enable type information?) at [Source: java.io.ByteArrayInputStream@7e305fb2; line: 1, column: 2]
java.lang.IllegalArgumentException: Template must not be null or empty!
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:525)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:99)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:242)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapAndThrow(BeanDeserializerBase.java:1420)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:244)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2993)
at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.readJavaType(MappingJackson2HttpMessageConverter.java:225)
at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.readJavaType(MappingJackson2HttpMessageConverter.java:228)
at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.readInternal(MappingJackson2HttpMessageConverter.java:212)
at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:79)
at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:157)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
at com.wraith.repository.integrationTests.AbstractBaseIntegrationTests.performPostRequest(AbstractBaseIntegrationTests.java:105)
at com.wraith.repository.integrationTests.AbstractBaseIntegrationTests.createNewEntity(AbstractBaseIntegrationTests.java:113)
at com.wraith.repository.integrationTests.AccountRequestTest.createNewAccount(AccountRequestTest.java:43)
at com.wraith.repository.integrationTests.AccountRequestTest.testCreateAccountRequest(AccountRequestTest.java:32)
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:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
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:233)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)

Users with the same issue

Once, 2 months ago
52 times, 6 months ago
2 times, 7 months ago
Once, 7 months ago
2 times, 8 months ago

Write tip

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