Microcks error: $objectToArray requires a document input, found: missing #1370
Replies: 2 comments 19 replies
-
Hello @etumwizere21 From what I see you're using the Now it looks like this is not related at all to the import error you encounter. I'll have to take a look at your AsyncAPI file definition to see what's going wrong. Final thought: using the uber image for doing asynchronous mocks is not the easiest path to go with when starting with Microcks. I would rather recommend using the Docker compose development mode (see https://microcks.io/documentation/guides/installation/docker-compose/#development-mode) for easier startup. |
Beta Was this translation helpful? Give feedback.
-
Hello, Have you checked the async-minion container logs? Is the connection to Artemis from the minion is ok? Can you see in the logs that it is publishing mock messages on the queues? |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I'm trying to use Microcks create a mock server from my asyncapi definition file but whenever I upload the file I get this type of error and it does not create mocks though it shows the operations. I'm not sure if I'm missing anything. any thought?
failed to handle {"aggregate" : "service", "pipeline" : [ { "$project" : { "labels" : { "$objectToArray" : "$metadata.labels" } } }, { "$unwind" : "$labels" }, { "$sort" : { "labels.v" : -1 } }, { "$group" : { "_id" : "$labels.k", "values" : { "$addToSet" : "$labels.v" }, "key" : { "$first" : "$labels.k" } } } ], "cursor" : {}, "allowDiskUse" : false, "$db" : "test"}
de.bwaldvogel.mongo.backend.aggregation.Aggregation$PlanExecutorError: [Error 40390] PlanExecutor error during aggregation :: caused by :: $objectToArray requires a document input, found: missing
at de.bwaldvogel.mongo.backend.aggregation.Aggregation.computeResult(Aggregation.java:242)
at de.bwaldvogel.mongo.backend.AbstractMongoDatabase.commandAggregate(AbstractMongoDatabase.java:623)
at de.bwaldvogel.mongo.backend.AbstractMongoDatabase.handleCommand(AbstractMongoDatabase.java:132)
at de.bwaldvogel.mongo.backend.AbstractMongoBackend.handleCommand(AbstractMongoBackend.java:340)
at de.bwaldvogel.mongo.backend.AbstractMongoBackend.handleMessage(AbstractMongoBackend.java:413)
at de.bwaldvogel.mongo.wire.MongoDatabaseHandler.handleMessage(MongoDatabaseHandler.java:73)
at de.bwaldvogel.mongo.wire.MongoDatabaseHandler.channelRead0(MongoDatabaseHandler.java:62)
at de.bwaldvogel.mongo.wire.MongoDatabaseHandler.channelRead0(MongoDatabaseHandler.java:27)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base@17.0.12/java.lang.Thread.run(Thread.java:840)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:915)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:890)
Caused by: de.bwaldvogel.mongo.exception.MongoServerError: [Error 40390] $objectToArray requires a document input, found: missing
at de.bwaldvogel.mongo.backend.aggregation.Expression$50.apply(Expression.java:1033)
at de.bwaldvogel.mongo.backend.aggregation.Expression$50.apply(Expression.java:1028)
at de.bwaldvogel.mongo.backend.aggregation.Expression.apply(Expression.java:1746)
at de.bwaldvogel.mongo.backend.aggregation.Expression.evaluateDocumentExpression(Expression.java:1833)
at de.bwaldvogel.mongo.backend.aggregation.Expression.evaluate(Expression.java:1811)
at de.bwaldvogel.mongo.backend.aggregation.Expression.evaluateDocument(Expression.java:1752)
at de.bwaldvogel.mongo.backend.aggregation.stage.ProjectStage.projectDocument(ProjectStage.java:82)
at java.base@17.0.12/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@17.0.12/java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:1003)
at java.base@17.0.12/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.base@17.0.12/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base@17.0.12/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@17.0.12/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base@17.0.12/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base@17.0.12/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@17.0.12/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at de.bwaldvogel.mongo.backend.aggregation.stage.GroupStage.apply(GroupStage.java:43)
at de.bwaldvogel.mongo.backend.aggregation.Aggregation.runStagesAsStream(Aggregation.java:204)
at de.bwaldvogel.mongo.backend.aggregation.Aggregation.runStages(Aggregation.java:196)
at de.bwaldvogel.mongo.backend.aggregation.Aggregation.runStages(Aggregation.java:192)
at de.bwaldvogel.mongo.backend.aggregation.Aggregation.computeResult(Aggregation.java:235)
... 30 common frames omitted
here is our asyncapi definition attached
message_new_v3.zip
Beta Was this translation helpful? Give feedback.
All reactions