reTHINK-project / dev-service-framework

DEPRECATED! Service framework libs have been moved to dev-runtime-core repo
Apache License 2.0
1 stars 2 forks source link

Omit resources parameter in discovery.discoverDataObject makes msg-node fail #88

Closed dvilchez closed 7 years ago

dvilchez commented 7 years ago

The msg-node error

`2017-03-03 09:37:48 INFO BROKER - IN: (id: 1, type: read, from: hyperty://localhost/cdee3352-536c-4b9c-965d-046868b8b85e, to: domain://registry.localhost/) 2017-03-03 09:37:48 INFO BROKER - RESOLVED: hyperty://localhost/cdee3352-536c-4b9c-965d-046868b8b85e - TO runtime://localhost/71f456f6-db18-16b7-f302-055607d5dd9e/c6c83248-93e2-4c0a-a1f9-12efb6e6c6ae [RegistryConnector.handle]{"type":"read","from":"hyperty://localhost/cdee3352-536c-4b9c-965d-046868b8b85e","to":"domain://registry.localhost/","body":{"resource":"discovery","criteria":{"dataSchemes":["context"]},"auth":false},"id":1}

Mar 03, 2017 9:37:49 AM io.vertx.core.impl.ContextImpl SEVERE: Unhandled exception /build/node_modules/dev-registry-domain/connector/src/java-request.js:26 SyntaxError: Invalid JSON: :1:0 Expected json literal but found <

500 Internal Error

^ at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57) at jdk.nashorn.internal.runtime.ECMAErrors.syntaxError(ECMAErrors.java:160) at jdk.nashorn.internal.runtime.ECMAErrors.syntaxError(ECMAErrors.java:145) at jdk.nashorn.internal.runtime.JSONFunctions.parse(JSONFunctions.java:81) at jdk.nashorn.internal.objects.NativeJSON.parse(NativeJSON.java:105) at jdk.nashorn.internal.scripts.Script$Recompilation$702$832A$\^eval_#88!17\^eval_.L:1$get$L:23$L:24(/build/nodemodules/dev-registry-domain/connector/src/java-request.js:26) at jdk.nashorn.internal.scripts.Script$Recompilation$684$6705A$\^eval_#88!17\^eval\.L:1$HttpClientResponse$bodyHandler$L:233(.vertx/debug-js/vertx-js/http_client_response.js:234) at io.vertx.core.Handler$$NashornJavaAdapter.handle(Unknown Source) at io.vertx.core.http.impl.HttpClientResponseImpl$BodyHandler.notifyHandler(HttpClientResponseImpl.java:256) at io.vertx.core.http.impl.HttpClientResponseImpl.lambda$bodyHandler$82(HttpClientResponseImpl.java:172) at io.vertx.core.http.impl.HttpClientResponseImpl.handleEnd(HttpClientResponseImpl.java:221) at io.vertx.core.http.impl.ClientConnection.handleResponseEnd(ClientConnection.java:283) at io.vertx.core.http.impl.HttpClientImpl$ClientHandler.doMessageReceived(HttpClientImpl.java:864) at io.vertx.core.http.impl.HttpClientImpl$ClientHandler.doMessageReceived(HttpClientImpl.java:832) at io.vertx.core.http.impl.VertxHttpHandler.lambda$channelRead$18(VertxHttpHandler.java:80) at io.vertx.core.impl.ContextImpl.lambda$wrapTask$16(ContextImpl.java:333) at io.vertx.core.impl.OrderedExecutorFactory$OrderedExecutor.lambda$new$261(OrderedExecutorFactory.java:91) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: jdk.nashorn.internal.runtime.ParserException: :1:0 Expected json literal but found <

500 Internal Error

^ at jdk.nashorn.internal.parser.JSONParser.error(JSONParser.java:529) at jdk.nashorn.internal.parser.JSONParser.error(JSONParser.java:533) at jdk.nashorn.internal.parser.JSONParser.expectedError(JSONParser.java:541) at jdk.nashorn.internal.parser.JSONParser.parseLiteral(JSONParser.java:182) at jdk.nashorn.internal.parser.JSONParser.parse(JSONParser.java:148) at jdk.nashorn.internal.runtime.JSONFunctions.parse(JSONFunctions.java:79) ... 16 more

Mar 03, 2017 9:38:18 AM io.vertx.core.eventbus.impl.EventBusImpl WARNING: Message reply handler timed out as no reply was received - it will be removed 2017-03-03 09:38:18 INFO BROKER - REPLY: (id: 1, type: response, from: domain://registry.localhost/, to: hyperty://localhost/cdee3352-536c-4b9c-965d-046868b8b85e) PIPELINE-FAIL: Error contacting domain registry`

I think the error is in the domain-registry, but this is the way you can reproduce it.

pchainho commented 7 years ago

this seems to be domain registry connector

nunofmn commented 7 years ago

I'm unable to replicate this bug. Here is working fine using the branches develop and R0.7.0 in dev-registry-domain.

Do you have the logs from the domain-registry?

dvilchez commented 7 years ago

Ok, it doesn't fail with the last version of domain-registry but you have to set at least name and schema to get some results, I don't know if that is an error if it is not, you can close this issue