edgedb-java icon indicating copy to clipboard operation
edgedb-java copied to clipboard

Can't execute query from Spring Boot App

Open Afler opened this issue 1 year ago • 1 comments

Running on Windows 10 and JDK corretto-17.0.8 I've tried to execute query like this: image

and get:

Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146) ~[na:na]
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:127) ~[na:na]
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297) ~[na:na]
	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434) ~[na:na]
	... 36 common frames omitted

If i set TSLSecurity.INSECURE options then my whole app hang on this line image

Afler avatar Jul 08 '24 12:07 Afler

Ok I solved my problem when I used suggested project-based approach from documentation. I assume my problem with manual config approach appeared because creating EdgeDBConnection and EdgeDBClientConfig drops its default values so I must to set all existing properties manually instead of overwrite one or two I wanted. I think adding method EdgeDBClientConfig.builder().getDefaultConfig().set-PropertyName-() would be good to ensure option to overwrite only desired config or connection properties; I'm still curious how I had to configure my original setup to make it work

Afler avatar Jul 08 '24 13:07 Afler