Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying microschema diff fails #591

Closed
npomaroli opened this issue Nov 29, 2018 · 0 comments

Comments

@npomaroli
Copy link
Member

commented Nov 29, 2018

Gentics Mesh Version, operating system, or hardware.

  • v0.28.2

Problem

Using the MeshRestClient, when applying the microschema diff returned from Mesh on the microschema fails with a 500 Internal Server Error.

Reproducer

In test case com.gentics.mesh.core.schema.MicroschemaDiffEndpointTest.testAddField() add line

call(() -> client().applyChangesToMicroschema(microschema.getUuid(), changes));

at the end.

Expected behaviour and actual behaviour

Expected: applying the changes should succeed (and microschema should be changed accordingly)
Actual: Applying the changes fails.
Logged exception is:

TEST ERROR [vert.x-eventloop-thread-0] [FailureHandler.java:127] - Error for request in path: /api/v1/microschemas/2f375d18ae254a72b75d18ae25ca72b1/changes
TEST ERROR [vert.x-eventloop-thread-0] [FailureHandler.java:129] - Error:
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
	at com.gentics.mesh.core.data.schema.impl.AddFieldChangeImpl.getAllowProp(AddFieldChangeImpl.java:63) ~[classes/:na]
	at com.gentics.mesh.core.data.schema.impl.AddFieldChangeImpl.apply(AddFieldChangeImpl.java:108) ~[classes/:na]
	at com.gentics.mesh.core.data.schema.handler.FieldSchemaContainerMutator.apply(FieldSchemaContainerMutator.java:29) ~[classes/:na]
	at com.gentics.mesh.core.data.schema.impl.AbstractGraphFieldSchemaContainerVersion.applyChanges(AbstractGraphFieldSchemaContainerVersion.java:187) ~[classes/:na]
	at com.gentics.mesh.core.data.schema.impl.AbstractGraphFieldSchemaContainerVersion.applyChanges(AbstractGraphFieldSchemaContainerVersion.java:224) ~[classes/:na]
	at com.gentics.mesh.core.endpoint.microschema.MicroschemaCrudHandler.lambda$7(MicroschemaCrudHandler.java:151) ~[classes/:na]
	at com.syncleus.ferma.tx.TxFactory.lambda$tx$1(TxFactory.java:71) ~[ferma-2.4.0.jar:2.4.0]
	at com.gentics.mesh.graphdb.OrientDBDatabase.tx(OrientDBDatabase.java:931) ~[classes/:na]
	at com.syncleus.ferma.tx.TxFactory.tx(TxFactory.java:70) ~[ferma-2.4.0.jar:2.4.0]
	at com.gentics.mesh.core.endpoint.microschema.MicroschemaCrudHandler.lambda$5(MicroschemaCrudHandler.java:149) ~[classes/:na]
	at com.syncleus.ferma.tx.TxFactory.lambda$tx$1(TxFactory.java:71) ~[ferma-2.4.0.jar:2.4.0]
	at com.gentics.mesh.graphdb.OrientDBDatabase.tx(OrientDBDatabase.java:931) ~[classes/:na]
	at com.syncleus.ferma.tx.TxFactory.tx(TxFactory.java:70) ~[ferma-2.4.0.jar:2.4.0]
	at com.gentics.mesh.core.verticle.handler.HandlerUtilities.lambda$15(HandlerUtilities.java:279) ~[classes/:na]
	at com.gentics.mesh.core.verticle.handler.HandlerUtilities.lambda$17(HandlerUtilities.java:304) ~[classes/:na]
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273) ~[vertx-core-3.5.4.jar:3.5.4]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_131]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.19.Final.jar:4.1.19.Final]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_131]
TEST ERROR [vert.x-eventloop-thread-0] [RoutingContextImplBase.java:154] - Unexpected exception in route
java.lang.IllegalArgumentException: code: -1 (expected: 0+)
	at io.netty.handler.codec.http.HttpResponseStatus.<init>(HttpResponseStatus.java:581) ~[netty-codec-http-4.1.19.Final.jar:4.1.19.Final]
	at io.netty.handler.codec.http.HttpResponseStatus.<init>(HttpResponseStatus.java:569) ~[netty-codec-http-4.1.19.Final.jar:4.1.19.Final]
	at io.netty.handler.codec.http.HttpResponseStatus.valueOf(HttpResponseStatus.java:446) ~[netty-codec-http-4.1.19.Final.jar:4.1.19.Final]
	at io.vertx.core.http.impl.HttpServerResponseImpl.setStatusCode(HttpServerResponseImpl.java:112) ~[vertx-core-3.5.4.jar:3.5.4]
	at com.gentics.mesh.router.route.FailureHandler.handle(FailureHandler.java:147) ~[classes/:na]
	at com.gentics.mesh.router.route.FailureHandler.handle(FailureHandler.java:1) ~[classes/:na]
	at io.vertx.ext.web.impl.RouteImpl.handleFailure(RouteImpl.java:235) ~[vertx-web-3.5.4.jar:3.5.4]
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:117) ~[vertx-web-3.5.4.jar:3.5.4]
	at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:133) [vertx-web-3.5.4.jar:3.5.4]
	at io.vertx.ext.web.impl.RoutingContextImpl.doFail(RoutingContextImpl.java:465) [vertx-web-3.5.4.jar:3.5.4]
	at io.vertx.ext.web.impl.RoutingContextImpl.fail(RoutingContextImpl.java:166) [vertx-web-3.5.4.jar:3.5.4]
	at io.vertx.ext.web.impl.RoutingContextWrapper.fail(RoutingContextWrapper.java:73) [vertx-web-3.5.4.jar:3.5.4]
	at io.vertx.ext.web.impl.RoutingContextWrapper.fail(RoutingContextWrapper.java:73) [vertx-web-3.5.4.jar:3.5.4]
	at com.gentics.mesh.context.impl.InternalRoutingActionContextImpl.fail(InternalRoutingActionContextImpl.java:131) [classes/:na]
	at com.gentics.mesh.core.verticle.handler.HandlerUtilities.lambda$18(HandlerUtilities.java:310) [classes/:na]
	at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:79) ~[vertx-core-3.5.4.jar:3.5.4]
	at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:289) ~[vertx-core-3.5.4.jar:3.5.4]
	at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:339) ~[vertx-core-3.5.4.jar:3.5.4]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.19.Final.jar:4.1.19.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) ~[netty-common-4.1.19.Final.jar:4.1.19.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463) ~[netty-transport-4.1.19.Final.jar:4.1.19.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) ~[netty-common-4.1.19.Final.jar:4.1.19.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.19.Final.jar:4.1.19.Final]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_131]

@Jotschi Jotschi self-assigned this Nov 29, 2018

@mephinet mephinet added this to Must Have in Release 1.0 Estimation Jan 18, 2019

@mephinet mephinet added this to the 1.0.0 milestone Jan 18, 2019

@mephinet mephinet added the quick win label Jan 25, 2019

@Jotschi Jotschi added this to Pending in 1.0 Apr 24, 2019

@Jotschi Jotschi moved this from Pending to In progress in 1.0 Apr 24, 2019

1.0 automation moved this from In progress to Reviewed / Merged May 7, 2019

@Jotschi Jotschi moved this from Reviewed / Merged to Released in 1.0 May 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.