I followed the instruction mentioned here by creating the default-env.json exactly as suggested. However, while my Spring Boot application starts up, it fails still due to the private key issue. Stacktrace below:
2025-12-08 15:42:39,041 ERROR, MDC - [], org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sap.cds.framework.spring.config.runtime.CdsRuntimeInitializer': Failed to create HttpClient with certificate
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1826)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:607)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1228)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1130)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:990)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:318)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350)
at sap.signavio.ngm.Application.main(Application.java:12)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50)
Caused by: java.lang.IllegalStateException: Failed to create HttpClient with certificate
at com.sap.cds.feature.auditlog.ng.AuditLogNGCommunicator.<init>(AuditLogNGCommunicator.java:67)
at com.sap.cds.feature.auditlog.ng.AuditLogNGConfiguration.createHandler(AuditLogNGConfiguration.java:49)
at com.sap.cds.feature.auditlog.ng.AuditLogNGConfiguration.eventHandlers(AuditLogNGConfiguration.java:40)
at com.sap.cds.services.impl.runtime.CdsRuntimeConfigurerImpl.lambda$eventHandlerConfigurations$2(CdsRuntimeConfigurerImpl.java:141)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at com.sap.cds.services.impl.runtime.CdsRuntimeConfigurerImpl.eventHandlerConfigurations(CdsRuntimeConfigurerImpl.java:141)
at com.sap.cds.framework.spring.config.runtime.CdsRuntimeInitializer.afterPropertiesSet(CdsRuntimeInitializer.java:52)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1873)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1822)
... 21 common frames omitted
Caused by: java.lang.RuntimeException: Failed to create HttpClient with certificate/key: Invalid private key format: null
at com.sap.cds.feature.auditlog.ng.CertificateHttpClientConfig.createHttpClient(CertificateHttpClientConfig.java:193)
at com.sap.cds.feature.auditlog.ng.CertificateHttpClientConfig.<init>(CertificateHttpClientConfig.java:74)
at com.sap.cds.feature.auditlog.ng.CertificateHttpClientConfig$Builder.build(CertificateHttpClientConfig.java:160)
at com.sap.cds.feature.auditlog.ng.AuditLogNGCommunicator.<init>(AuditLogNGCommunicator.java:65)
... 29 common frames omitted
Caused by: java.lang.IllegalArgumentException: Invalid private key format: null
at com.sap.cds.feature.auditlog.ng.CertificateHttpClientConfig.parsePrivateKey(CertificateHttpClientConfig.java:249)
at com.sap.cds.feature.auditlog.ng.CertificateHttpClientConfig.createHttpClient(CertificateHttpClientConfig.java:175)
... 32 common frames omitted
Am I missing any instruction here?
I followed the instruction mentioned here by creating the default-env.json exactly as suggested. However, while my Spring Boot application starts up, it fails still due to the private key issue. Stacktrace below:
Am I missing any instruction here?