org.springframework.restdocs.snippet.ModelCreationException: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input at [Source: [B@47fca3cc; line: 1, column: 0]

Stack Overflow | vic | 5 days ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Links Question

    GitHub | 1 year ago | kpb
    org.springframework.restdocs.snippet.ModelCreationException: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token at [Source: java.io.StringReader@5710f755; line: 1, column: 1]
  2. 0

    Spring Rest Docs error - "No content to map due to end-of-input"

    Stack Overflow | 5 days ago | vic
    org.springframework.restdocs.snippet.ModelCreationException: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input at [Source: [B@47fca3cc; line: 1, column: 0]
  3. 0

    restdocs SnippetException due to HAL "_links" elements from spring-data-rest

    Stack Overflow | 2 months ago | Eric Turley
    org.springframework.restdocs.snippet.SnippetException: The following parts of the payload were not documented: { "_links" : { "self" : { "href" : "https://my-api/item/10" }, "item" : { "href" : "https://my-api/item/10" } } } This is my test code: @Rule public JUnitRestDocumentation restDocs = new JUnitRestDocumentation("target/generated-snippets"); // ... mockMvc = webAppContextSetup(wac) //WebApplicationContext .apply(documentationConfiguration(restDocs) .uris() .withHost("my-api") .withPort(443) .withScheme("https")) .build(); // .... mockMvc.perform(get("/items/{id}", "10")) .andDo(documentation)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Exception when building rest-notes-spring-data-rest

    GitHub | 9 months ago | AdelinGhanaem
    org.springframework.restdocs.generate.RestDocumentationGenerationException: java.io.FileNotFoundException: target\generated-snippets\tag-get-example\links.adoc (The system cannot find the path specified)
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. com.fasterxml.jackson.databind.JsonMappingException

    No content to map due to end-of-input at [Source: [B@47fca3cc; line: 1, column: 0]

    at com.fasterxml.jackson.databind.JsonMappingException.from()
  2. Jackson
    ObjectMapper.readValue
    1. com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:270)
    2. com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3838)
    3. com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3783)
    4. com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2929)
    4 frames
  3. org.springframework.restdocs
    RestDocumentationResultHandler.handle
    1. org.springframework.restdocs.hypermedia.AbstractJsonLinkExtractor.extractLinks(AbstractJsonLinkExtractor.java:41)
    2. org.springframework.restdocs.hypermedia.LinksSnippet.createModel(LinksSnippet.java:127)
    3. org.springframework.restdocs.snippet.TemplatedSnippet.document(TemplatedSnippet.java:64)
    4. org.springframework.restdocs.generate.RestDocumentationGenerator.handle(RestDocumentationGenerator.java:196)
    5. org.springframework.restdocs.mockmvc.RestDocumentationResultHandler.handle(RestDocumentationResultHandler.java:55)
    5 frames
  4. Spring TestContext
    MockMvc$1.andDo
    1. org.springframework.test.web.servlet.MockMvc$1.andDo(MockMvc.java:177)
    1 frame
  5. com.example
    SpringDataSampleApplicationTests.createBookRest
    1. com.example.SpringDataSampleApplicationTests.createBookRest(SpringDataSampleApplicationTests.java:173)
    1 frame
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:483)
    4 frames
  7. JUnit
    RunBefores.evaluate
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    5 frames
  8. Spring TestContext
    RunAfterTestMethodCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
    2. org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
    2 frames
  9. org.springframework.restdocs
    JUnitRestDocumentation$1.evaluate
    1. org.springframework.restdocs.JUnitRestDocumentation$1.evaluate(JUnitRestDocumentation.java:55)
    1 frame
  10. JUnit
    RunRules.evaluate
    1. org.junit.rules.RunRules.evaluate(RunRules.java:20)
    1 frame
  11. Spring TestContext
    SpringRepeat.evaluate
    1. org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
    1 frame
  12. JUnit
    ParentRunner.runLeaf
    1. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    1 frame
  13. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
    2 frames
  14. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    5 frames
  15. 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:70)
    2 frames
  16. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    1 frame
  17. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
    1 frame
  18. JUnit
    JUnitCore.run
    1. org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    1 frame
  19. IntelliJ junit4 module
    JUnit4IdeaTestRunner.startRunnerWithArgs
    1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    1 frame
  20. IDEA
    JUnitStarter.main
    1. com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
    2. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
    3. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
    3 frames
  21. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:483)
    4 frames
  22. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
    1 frame