SAP S/4HANA Cloud SDK: Version 1.8.0 is Available
The new version of the SAP S/4HANA Cloud SDK Java libraries is available since today. You can update your dependencies to version 1.8.0 and consume the new version from Maven Central.
In this blog post, we will walk you through the highlights of these releases. For a complete overview, visit our release notes for the Java libraries. The release notes also include the change log of all our releases so far.
At the end of the article, you will find a set of instructions on how to update to the new version.
Java Libraries: Release Highlights
Note: If you are using the SAP S/4HANA Cloud SDK in the Neo environment of SAP Cloud Platform, please note that there is a bug in the SDK that affects multi-tenant applications on Neo. We recommend NOT to update to version 1.8.0 in case of a multi-tenant application on Neo. Instead, wait for the next release of the SAP S/4HANA Cloud SDK, in which we plan to fix this bug. You can safely proceed to update the SDK version in Cloud Foundry applications.
As part of the SAP S/4HANA Cloud SDK, we also provide integration to popular third party frameworks on SAP Cloud Platform, for example Togglz or EclipseLink. Another example is Apache CXF; an open-source framework for developing services. With this version, we have extracted the JAX-RS specific functionality of the Apache CXF integration module into a seperate module com.sap.cloud.s4hana.frameworks:jaxrs
to make it easier to leverage the corresponding functionality such as JSON message (de)serialization and error handling in applications that do not use Apache CXF.
The Javadoc of the SAP Cloud Platform abstractions (classes in packages com.sap.cloud.sdk.cloudplatform.*
) has been improved to make it easier to use the corresponding functionality of the SAP S/4HANA Cloud SDK, which provides simple and transparent access to Cloud Platform features such as connectivity, security, tenants or audit logging, on both Cloud Foundry and Neo.
We have improved the contracts of methods for handling tenant, user and secret store by introducing more specific exceptions.
We have also changed names and packages of several classes – please take a close look at the compatibility notes for the full list of changes.
On some developer machines, deploying the app on the local TomEE server based on the scp-cf-tomee
archetype may have failed previously with exceptions such as java.lang.NoSuchMethodError: org.apache.tomcat.util.ExceptionUtils.preload()V
. We have resolved this issue by removing the tomcat-catalina
lib from the TomEE Maven plugin configuration in the application/pom.xml
file as generated by scp-cf-tomee
archetype. Newly generated project will no longer produce this error. If you have previously generated a project using that archetype and experience the same issue, manually remove the following lines at the end of application/pom.xml
:
<libs>
<lib>org.apache.tomcat:tomcat-catalina:7.0.82</lib>
</libs>
We have also fixed several further issues as explained in the full release notes.
How to Update: Java Libraries
Note: As mentioned above, we recommend NOT to update the SDK for a multi-tenant application on Neo.
To update the version of the SAP S/4HANA Cloud SDK Java libraries used in an existing project on Cloud Foundry, proceed as follows:
- Open the pom.xml file in the root folder of your project.
- Locate the dependency management section and therein the
sdk-bom
dependency. - Update the version of that dependency to
1.8.0
.
With this, you are already done thanks to the “bill of material” (BOM) approach. Your dependency should look like this:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.sap.cloud.s4hana</groupId>
<artifactId>sdk-bom</artifactId>
<version>1.8.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
<!-- possibly further managed dependencies ... -->
</dependencyManagement>
You can now recompile your project (be aware of the compatibility notes, though) and leverage the new features of the SAP S/4HANA Cloud SDK in version 1.8.0.
Of course, you can also generate a new project that uses version 1.8.0 from the start by running the Maven archetypes for Cloud Foundry with -DarchetypeVersion=1.8.0
(or RELEASE
).
This is probably the best, most concise step-by-step guide I’ve ever seen on how to build a successful blog on SAP.