I have the same error as described on this Google Discussion, ie. the push subscriptions of the google cloud emulator for the pubsub service aren't working and raise a:
java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
The solution proposed in this thread is to use the --add-modules
flag:
java ... --add-modules ...
but this is no longer possible in Java11.
So I followed up to see how to replace this --add-modules
flag, but now I have to edit a pom.xml
file and use maven to add the new dependencies. I looked up some maven plugin commands like mvn exec:java
, because I am not sure how to rebuild the project and would just like to run my:
java -jar cloud-pubsub-emulator-0.1-SNAPSHOT-all.jar ...
by adding the necessary dependencies that would substitute the --add-modules
flag.
PS: I tried to downgrade to Java version < 11 and re-install the pubsub emulator, but another error was raised, so I decided to stick with Java's latest version.