java lang ClassNotFoundException net i2p crypto eddsa spec EdDSAParameterSpec

java lang ClassNotFoundException net i2p crypto eddsa spec EdDSAParameterSpec

If you are getting below error:

Exception in thread "main" java.lang.NoClassDefFoundError: net/i2p/crypto/eddsa/spec/EdDSAParameterSpec
	at net.schmizz.sshj.common.KeyType.<clinit>(KeyType.java:176)
	at net.schmizz.sshj.signature.SignatureECDSA$Factory.getName(SignatureECDSA.java:40)
	at net.schmizz.sshj.common.Factory$Named$Util.getNames(Factory.java:86)
	at net.schmizz.sshj.transport.Proposal.<init>(Proposal.java:41)
	at net.schmizz.sshj.transport.KeyExchanger.sendKexInit(KeyExchanger.java:184)
	at net.schmizz.sshj.transport.KeyExchanger.startKex(KeyExchanger.java:152)
	at net.schmizz.sshj.transport.TransportImpl.doKex(TransportImpl.java:247)
	at net.schmizz.sshj.SSHClient.doKex(SSHClient.java:735)
	at net.schmizz.sshj.SSHClient.onConnect(SSHClient.java:723)
	at net.schmizz.sshj.SocketClient.connect(SocketClient.java:54)
	at net.schmizz.sshj.SocketClient.connect(SocketClient.java:80)
	at com.javahonk.sftpclient.SSHClientJava.main(SSHClientJava.java:34)
Caused by: java.lang.ClassNotFoundException: net.i2p.crypto.eddsa.spec.EdDSAParameterSpec
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 12 more

Solution: This happens if eddsa.xxx.jar is missing from classpath. Please add below dependencies in your project if you are using maven:

<!-- https://mvnrepository.com/artifact/net.i2p.crypto/eddsa -->
<dependency>
    <groupId>net.i2p.crypto</groupId>
    <artifactId>eddsa</artifactId>
    <version>0.1.0</version>
</dependency>
  • Otherwise google eddsa.version.jar and download and include in your project.

Leave a Reply

Your email address will not be published. Required fields are marked *