Unsupported curve (secp256k1) when trying to get DP2 sample running

Hi everybody,

I’m working through the instructions on this page and hitting a problem when trying to perform the deployCorda task.

Specifically, the preconfigured test (MyFirstFlowTest.kt) fails on line 27:

val aliceVN = simulator.createVirtualNode(aliceHoldingID, MyFirstFlow::class.java)

with:

java.security.InvalidAlgorithmParameterException: Curve not supported: secp256k1 (1.3.132.0.10) at jdk.crypto.ec/sun.security.ec.ECKeyPairGenerator.ensureCurveIsSupported(ECKeyPairGenerator.java:136) at jdk.crypto.ec/sun.security.ec.ECKeyPairGenerator.initialize(ECKeyPairGenerator.java:114) at java.base/java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:698) at net.corda.simulator.runtime.signing.BaseSimKeyStore.<init>(BaseSimKeyStore.kt:15) at net.corda.simulator.runtime.SimulatedVirtualNodeBase.<init>(SimulatedVirtualNodeBase.kt:22) at net.corda.simulator.runtime.SimulatorDelegateBase.createVirtualNode(SimulatorDelegateBase.kt:46) at net.corda.simulator.Simulator.createVirtualNode(Simulator.kt:48) at com.r3.developers.csdetemplate.MyFirstFlowTest.test that MyFirstFLow returns correct message(MyFirstFlowTest.kt:27) ...

Now I’m pretty sure this is because my JDK doesn’t support the curve.

Except… the instructions said to use Azul Zulu 11… and that’s what I’m doing!

So… is there a specific (higher?) version I should be using? If so, what? Is the project somehow not picking up this setting? If so, what’s the best way to verify exactly which JDK is being used?

SOLVED!

Make sure your IntelliJ global gradle setting is set to use the project’s sdk settings rather than picking up whatever the machine’s globally set JDK is

1 Like