Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spot client fails to construct #69

Open
kannanjgithub opened this issue Mar 23, 2024 · 2 comments
Open

Spot client fails to construct #69

kannanjgithub opened this issue Mar 23, 2024 · 2 comments

Comments

@kannanjgithub
Copy link

Calling your new Spot(apiKey, apiSecret) throws the below exception.

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [Mexc.Sdk.Spot]: Factory method 'getSpotClient' threw exception; nested exception is java.io.UncheckedIOException: java.io.IOException: Cannot run program "node": error=2, No such file or directory
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.20.jar:5.3.20]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.20.jar:5.3.20]
	... 33 common frames omitted
Caused by: java.io.UncheckedIOException: java.io.IOException: Cannot run program "node": error=2, No such file or directory
	at software.amazon.jsii.JsiiRuntime.startRuntimeIfNeeded(JsiiRuntime.java:320) ~[jsii-runtime-1.95.0.jar:na]
	at software.amazon.jsii.JsiiRuntime.getClient(JsiiRuntime.java:422) ~[jsii-runtime-1.95.0.jar:na]
	at software.amazon.jsii.JsiiEngine.getClient(JsiiEngine.java:150) ~[jsii-runtime-1.95.0.jar:na]
	at software.amazon.jsii.JsiiEngine.loadModule(JsiiEngine.java:188) ~[jsii-runtime-1.95.0.jar:na]
	at software.amazon.jsii.JsiiEngine.createNewObject(JsiiEngine.java:608) ~[jsii-runtime-1.95.0.jar:na]
	at Mexc.Sdk.Spot.<init>(Spot.java:25) ~[Core-1.0.0.jar:1.0.0]
	at mexctrader.config.MexcConfiguration.getSpotClient(MexcConfiguration.java:16) ~[classes/:na]
	at mexctrader.config.MexcConfiguration$$EnhancerBySpringCGLIB$$5aec6ba.CGLIB$getSpotClient$0(<generated>) ~[classes/:na]
	at mexctrader.config.MexcConfiguration$$EnhancerBySpringCGLIB$$5aec6ba$$FastClassBySpringCGLIB$$ad582dd6.invoke(<generated>) ~[classes/:na]
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.20.jar:5.3.20]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.20.jar:5.3.20]
	at mexctrader.config.MexcConfiguration$$EnhancerBySpringCGLIB$$5aec6ba.getSpotClient(<generated>) ~[classes/:na]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:577) ~[na:na]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.20.jar:5.3.20]
	... 34 common frames omitted
Caused by: java.io.IOException: Cannot run program "node": error=2, No such file or directory
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143) ~[na:na]
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073) ~[na:na]
	at software.amazon.jsii.JsiiRuntime.startRuntimeIfNeeded(JsiiRuntime.java:312) ~[jsii-runtime-1.95.0.jar:na]
	... 48 common frames omitted
Caused by: java.io.IOException: error=2, No such file or directory
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method) ~[na:na]
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314) ~[na:na]
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244) ~[na:na]
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110) ~[na:na]
	... 50 common frames omitted
@kannanjgithub
Copy link
Author

CDK was not installed. Got resolved after installing aws-cdk using npm. I'd expect this sort of basic stuff to be mentioned in your README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@kannanjgithub and others