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

Internal error while querying node's versions #1117

Closed
DevNils opened this issue Sep 2, 2020 · 4 comments
Closed

Internal error while querying node's versions #1117

DevNils opened this issue Sep 2, 2020 · 4 comments
Labels

Comments

@DevNils
Copy link

DevNils commented Sep 2, 2020

Gentics Mesh Version, operating system, or hardware.

  • v1.7.0

Operating System

  • MacOSX
  • Docker

JVM

  • Open JDK 1.8.0_100

Problem

On some (not all) of my nodes I get an error when I try to query the node's versions:

08:54:44.810 [] ERROR [vert.x-eventloop-thread-8] - Error for request in path: /api/v2/entdeckertour/nodes/1bcedad277a34298884ab11fcf8678ba/versions?lang=en
08:54:44.819 [] ERROR [vert.x-eventloop-thread-8] - Error:
java.lang.NullPointerException: null
	at com.gentics.mesh.core.data.container.impl.NodeGraphFieldContainerImpl.transformToVersionInfo(NodeGraphFieldContainerImpl.java:797)
	at com.gentics.mesh.core.data.node.impl.NodeImpl.lambda$transformToVersionList$11(NodeImpl.java:1003)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.Iterator.forEachRemaining(Unknown Source)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at com.gentics.mesh.core.data.node.impl.NodeImpl.lambda$transformToVersionList$12(NodeImpl.java:1004)
	at java.base/java.lang.Iterable.forEach(Unknown Source)
	at com.gentics.mesh.core.data.node.impl.NodeImpl.transformToVersionList(NodeImpl.java:1001)
	at com.gentics.mesh.core.endpoint.node.NodeCrudHandler.lambda$handleListVersions$43(NodeCrudHandler.java:502)
	at com.gentics.mesh.graphdb.OrientDBDatabase.tx(OrientDBDatabase.java:416)
	at com.gentics.mesh.core.verticle.handler.HandlerUtilities.syncTx(HandlerUtilities.java:233)
	at com.gentics.mesh.core.endpoint.node.NodeCrudHandler.handleListVersions(NodeCrudHandler.java:500)
	at com.gentics.mesh.core.endpoint.node.NodeEndpoint.lambda$addVersioningHandlers$1(NodeEndpoint.java:143)
	at io.vertx.ext.web.impl.BlockingHandlerDecorator.lambda$handle$0(BlockingHandlerDecorator.java:48)
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:316)
	at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Unknown Source)
08:54:44.834 [] ERROR [vert.x-eventloop-thread-8] - 172.18.0.4 - GET /api/v2/entdeckertour/nodes/1bcedad277a34298884ab11fcf8678ba/versions?lang=en HTTP/1.1 500 44 - 47 ms

Reproducer

/api/v2/entdeckertour/nodes/1bcedad277a34298884ab11fcf8678ba/versions?lang=en
I don't really know when this error occurred the first time and how to reproduce it. During development I fiddled around with users, deleted and added them. It might be possible that some users are not existing anymore, that where responsible for some versions.

Is it possible that the missing users are causing this error?

Expected behaviour and actual behaviour

Should deliver the version history of the node.

@Jotschi
Copy link
Contributor

Jotschi commented Sep 2, 2020

NPE in info.setCreator(getEditor().transformToReference());

TODO:

  • Check whether user could be deleted
  • Add NPE check for getEditor()==null

@Jotschi Jotschi added the bug label Sep 2, 2020
@Jotschi
Copy link
Contributor

Jotschi commented Sep 5, 2020

Thanks for reporting the issue. I made a fix for the error which will be included in the next release of Gentics Mesh.

@DevNils
Copy link
Author

DevNils commented Sep 5, 2020 via email

@Jotschi
Copy link
Contributor

Jotschi commented Sep 5, 2020

Fixed with version 1.7.1

@Jotschi Jotschi closed this as completed Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants