BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Java catch Exception in thread "main" when Generating own initial certificates

Hello!

Local server: Ubuntu 18.
Java version: openjdk “11.0.9” and java “1.8”.

I get Exception in thread “main” when Generating own initial certificates.

root@abu:/home/blynk# java -jar /home/blynk/server-0.41.14.jar -dataFolder /home/blynk/data & [1] 1959 root@abu:/home/blynk# Blynk Server successfully started. All server output is stored in folder '/home/blynk/logs' file. Generating own initial certificates... Exception in thread "main" java.lang.NoClassDefFoundError: org/bouncycastle/asn1/isara/IsaraObjectIdentifiers at org.bouncycastle.operator.jcajce.OperatorHelper.<clinit>(Unknown Source) at org.bouncycastle.operator.jcajce.JcaContentSignerBuilder.<init>(Unknown Source) at org.shredzone.acme4j.util.CSRBuilder.sign(CSRBuilder.java:263) at cc.blynk.server.acme.AcmeClient.fetchCertificate(AcmeClient.java:108) at cc.blynk.server.acme.AcmeClient.requestCertificate(AcmeClient.java:66) at cc.blynk.server.SslContextHolder.regenerate(SslContextHolder.java:91) at cc.blynk.server.SslContextHolder.generateInitialCertificates(SslContextHolder.java:108) at cc.blynk.server.launcher.ServerLauncher.start(ServerLauncher.java:114) at cc.blynk.server.launcher.ServerLauncher.main(ServerLauncher.java:73) Caused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.isara.IsaraObjectIdentifiers at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 9 more

server.properties has all needed params such as server.host and contact.email.

Whats wrong with it?

When I read this it reminded me that I’d seen this guide a few days ago…

I have no idea if the error you are seeing is the same as the one that @warlock016 was getting whne generating self-signed certificates, but it might be woth taking a look at.

Pete.

Actually I found a solution, I took old release (server-0.41.5.jar) and run it in new folder. And it successfully generate new certificates. Then I copy new certificates to my current folder and it works.

But newest version (server-0.41.14.jar) can’t do it and just catch Exception.
So I guess latest server versions have cricical bug with bouncycastle or something like that.