0

I want to use the HOCON format for configuration in a Vert.x application deployed as a fat jar. I'm facing the same issue as described in this similar question.

However I applied the gradle Plugin "io.vertx.vertx-plugin" (v1.0.1) and succeeded in getting the line io.vertx.config.hocon.HoconProcessor into META-INF/services/io.vertx.config.spi.ConfigProcessor in the jar.

I still get the exception. What else could be required for the proper bundling of the HoconProcessor class in the jar?

A. Gldmn
  • 11
  • 2

1 Answers1

0

I had the same problem and it took quite a while to figure out what the problem was. In my case I was building a fat jar using the gradle shadowJar plugin. To start the application I used the vertx command what resulted in the described error. Starting the application directly with java using java -jar my-fat-jar.jar was no problem.

So I had a look into the vertx script and found out that the classpath is set like this: CLASSPATH=${CLASSPATH}:${VERTX_HOME}/conf:${VERTX_HOME}/lib/* so the fat jar is actually not in the classpath and the ConfigProcessor for YAML can not be found. Using CLASSPATH=my-fat-jar.jar vertx run my-fat-jar.jar works properly.

So you can either use this or start you application directly using java as described above.

DanK
  • 3
  • 4