Closed ToolsPool closed 1 year ago
Hey, the issue is likely that you have the Security Library v2 (e.g. com.sap.cloud.security.xsuaa:token-client:jar:2.13.9:compile
) with Spring 6 / Spring Boot 3 / Java 17 (e.g. org.springframework.boot:spring-boot-starter-web:jar:3.1.4:compile
).
When using Spring 6 / Spring Boot 3 / Java 17 you need a version >= 3.0.0 of com.sap.cloud.security
. You can achieve this for example by giving
<dependency>
<groupId>com.sap.cloud.security</groupId>
<artifactId>java-bom</artifactId>
<version>3.1.3</version>
<scope>import</scope>
<type>pom</type>
</dependency>
at the top of your dependency management section.
Hey
Thank you very much! This solved the issue.
On the topic of Java 17: The FAQ suggests transitioning from javax.inject to jakarta.inject-api. However, I've noticed that the OData Generator Maven Plugin continues to generate source code using the old javax module. Is there a way to modify the code generation process to use the new package?
Good to hear this fixed it. We now also added this information to our docs, so thanks for raising this 👍🏻
Regarding the OData generator: We are planning to remove the generation of this annotation with the next major version of the Cloud SDK, because she annotation didn't bring much value in our experience. Version 5.0.0 is planned to be released still this quarter, but there is no specific date yet. But once it is released you can just update and re-generate and the change should take effect.
I greatly appreciate your help and informations.
Perfect. So for the time being I will keep the the javax.inject dependency and as soon as the update drops i will remove it.
Hi
I'm currently working on creating some tests using the Java Cloud SDK.
My code is as follows:
Source function:
Test code:
The function works well when run the program locally under normal conditions. However, when I attempt to execute the test function, I encounter the following error message:
Error Message
Project Details
SDK Version:
Project type, for example:
Platform:
Checklist
Where does this error come from and how can i fix it?