This version (2017/05/27 13:44) is a draft.
Approvals: 0/1

[11:29:26] <qsys> anyone an example how to start vertx shell programmatically? I'm trying to follow/understand how it works, but I fail :p

[11:30:21] <qsys> I did (try to) follow http://vertx.io/docs/vertx-shell/java/ so far… what I basically try to do is start a vert shell server and interact with it using a 'HttpTermServer'

[11:31:00] <qsys> So well, I thought it was deploying a shell verticle (vertx.deployVerticle(“maven:io.vertx:vertx-shell:3.2.0”, new DeploymentOptions().setConfig(new JsonObject(). put(“httpOptions”, new JsonObject(). put(“host”, “localhost”). put(“port”, 5000))) );

[11:31:37] <qsys> and starting a Term server: TermServer server = TermServer.createHttpTermServer(vertx, new HttpTermOptions().setPort(5000).setHost(“localhost”)); server.termHandler(term → term.stdinHandler(term::write)); server.listen();

[11:31:44] <qsys> (sorry about the formatting…)

[11:32:27] <qsys> however, doing this, I get a NPE in HttpTermServer

[11:32:45] <qsys> at io.vertx.ext.shell.term.impl.HttpTermServer.lambda$listen$123(HttpTermServer.java:136)

[18:39:38] <voidDotClass> in the jdbc driver config, does the 'max prepared statements to cache' mean it'll only cache the param bindings, or it will cache the results of SQL queries?

[18:40:00] <voidDotClass> in other words, will only the query string get cached, or the results?

[18:52:50] <AlexLehm_> i would assume prepared statements only

[20:58:54] <voidDotClass> any examples of before / after code written the regular vertx way first, then written with reactive?

[22:34:14] <cantemojimmy> Hello, i just completed http://vertx.io/blog/my-first-vert-x-3-application/, and it works, but i really would like to run the MyFirstVerticle.java without compilation. But when i run “vertx run MyFirstVerticle.java” i get syntax errors even though can compile the code with mvn otherwise, any ideas ?

[22:34:53] <cantemojimmy> error is:

[22:35:01] <cantemojimmy> MyFirstVerticle.java:26: error: illegal start of expression

[22:35:40] <cantemojimmy> java seems to be v8.

[22:35:59] <cantemojimmy> $ java -version

[22:35:59] <cantemojimmy> java version “1.8.0_66”

[23:35:18] <voidDotClass> I have a blob column in mysql, if i use the jdbc driver, get it as a json object, and try to get getBytes, the output i get is weird

[23:39:16] <cantemojimmy> weird how ? wring encoding ?

[23:43:04] <voidDotClass> not sure, but its stored as gibberish in the database

[23:43:15] <voidDotClass> cantemojimmy ^

[23:44:22] <voidDotClass> byte[] bytes = string.getBytes(UTF_8); log.info( new String(bytes));

[23:44:27] <voidDotClass> that prints the string correctly

[23:44:40] <cantemojimmy> what do you send in and what do you get out ?

[23:45:11] <voidDotClass> cantemojimmy, I send in the array of bytes[], which i log just before inserting and they print correctly. then i insert them, and i get gibberish in the db

[23:46:27] <cantemojimmy> sorry, i cant help.

[23:46:36] <voidDotClass> * JSON has no notion of binary so the binary will be base64 encoded to a String, and the String added.

[23:46:51] <voidDotClass> that's what jsonObject.add(byte[]) method's docs say

[23:46:53] <voidDotClass> so..

[23:47:02] <voidDotClass> there's no way to insert a blob?

[23:47:14] <voidDotClass> i'm pretty sure they base64 encode it

[23:47:17] <voidDotClass> before inserting

[23:47:24] <voidDotClass> and that's why i get gibberish

[23:50:57] <voidDotClass> huh, saving it as a string works

[23:51:01] <voidDotClass> motherfucker

[23:53:00] <AlexLehm> cantemojimmy: what is the error msg?

[23:53:32] <cantemojimmy> MyFirstVerticle.java:26: error: illegal start of expression

[23:53:48] <cantemojimmy> and then more syntax-errors.

[23:54:09] <cantemojimmy> but mvn complies it properly …

[23:54:49] <cantemojimmy> right now i just compile to a fat JAR every run … tedious.