java.lang.AssertionError: Expected: To be empty but: Request violations: - Body does not match schema for action(POST /products) mime-type('application/json') Content: { "name" : "Motorbike", "price" : 150.0, "weight" : 800 } Message: Schema invalid: Unrecognized token 'product': was expecting ('true', 'false' or 'null') at [Source: Inline schema definition; line: 1, column: 8] Response violations: - Body does not match schema for action(POST /products) response(201) mime-type('application/json') Content: { "name" : "Motorbike", "price" : 150.0, "weight" : 800, "id" : "7fa62cdc-ed3f-493c-893b-41beaffd588f" } Message: Schema invalid: Unrecognized token 'product': was expecting ('true', 'false' or 'null') at [Source: Inline schema definition; line: 1, column: 8]

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 GitHub by boeboe
, 1 year ago
: Unrecognized token 'product': was expecting ('true', 'false' or 'null') at [Source: Inline schema definition; line: 1, column: 8] Response violations: - Body does not match schema for action(POST /products) response(201) mime-type('application/json
via GitHub by davido
, 10 months ago
Expected: iterable containing ["ec40f9121202be3508b4f5ab7b0a511d3bdcf9d9"] but: item 0: was "17327e726739c711762c2e4f2edea0e3ad24d9f3.metadata"
via GitHub by dominic-sps
, 2 months ago
Expected: is <378> but: was <1>
via Stack Overflow by EvgeniySharapov
, 2 years ago
Expected: "null()" but: was "/.[@name='data'][1][@name='data'][1]"
via Stack Overflow by Adio
, 2 years ago
Expected: is &lt;2&gt; but: was &lt;1&gt;
java.lang.AssertionError: Expected: To be empty but: Request violations: - Body does not match schema for action(POST /products) mime-type('application/json') Content: { "name" : "Motorbike", "price" : 150.0, "weight" : 800 } Message: Schema invalid: Unrecognized token 'product': was expecting ('true', 'false' or 'null') at [Source: Inline schema definition; line: 1, column: 8] Response violations: - Body does not match schema for action(POST /products) response(201) mime-type('application/json') Content: { "name" : "Motorbike", "price" : 150.0, "weight" : 800, "id" : "7fa62cdc-ed3f-493c-893b-41beaffd588f" } Message: Schema invalid: Unrecognized token 'product': was expecting ('true', 'false' or 'null') at [Source: Inline schema definition; line: 1, column: 8]
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:956)
at org.junit.Assert.assertThat(Assert.java:923)
at be.rombit.romcore.poc.productservice.RestVerticleTest.testAddProductEndpoint(RestVerticleTest.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at io.vertx.ext.unit.junit.VertxUnitRunner.invokeTestMethod(VertxUnitRunner.java:95)
at io.vertx.ext.unit.junit.VertxUnitRunner.lambda$invokeExplosively$0(VertxUnitRunner.java:114)
at io.vertx.ext.unit.impl.TestContextImpl$Step.run(TestContextImpl.java:122)
at io.vertx.ext.unit.impl.TestContextImpl$Step.access$600(TestContextImpl.java:30)
at io.vertx.ext.unit.impl.TestContextImpl.run(TestContextImpl.java:221)
at io.vertx.ext.unit.junit.VertxUnitRunner.invokeExplosively(VertxUnitRunner.java:130)
at io.vertx.ext.unit.junit.VertxUnitRunner.access$000(VertxUnitRunner.java:39)
at io.vertx.ext.unit.junit.VertxUnitRunner$1.evaluate(VertxUnitRunner.java:84)
at io.vertx.ext.unit.junit.VertxUnitRunner$2.evaluate(VertxUnitRunner.java:196)
at io.vertx.ext.unit.junit.VertxUnitRunner$3.evaluate(VertxUnitRunner.java:211)
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.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

Users with the same issue

2 times, 10 months ago
Once, 2 months ago
Once, 6 months ago
Once, 7 months ago
2 times, 5 months ago
23 more bugmates

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