CloudPlatform | 该项目基于SpringBoo2.1.6、Spring Cloud Hoxton.RELEASE、Spring | Microservice library
kandi X-RAY | CloudPlatform Summary
kandi X-RAY | CloudPlatform Summary
注意如果项目clone下来不自动加载编译,请操作--> 选着 by-platform --> 右键 add as Maven Project.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of CloudPlatform
CloudPlatform Key Features
CloudPlatform Examples and Code Snippets
def deserialize_keras_object(identifier,
module_objects=None,
custom_objects=None,
printable_module_name='object'):
"""Turns the serialized form of a Keras objec
def getMid(p1, p2):
return ((p1[0] + p2[0]) / 2, (p1[1] + p2[1]) / 2)
Community Discussions
Trending Discussions on CloudPlatform
QUESTION
I am following the official documentation to call BAPI both on SAP Cloud Platform and locally with Cloud SDK Spring archetype. The Cloud SDK version is 3.35.0.
It works fine on SAP Cloud Platform with the RFC destination provided but the destination could not be found locally. I finished all the steps in the documentation.
Below is the code snippets.
...ANSWER
Answered 2021-Jan-28 at 17:02We extended the documentation on running BAPI calls from the local machine.
We added a section on how to maintain the environment variable destinations
which lets the SAP Cloud SDK find the destination name.
QUESTION
I am following the official documentation to call workflow REST APIs with Cloud SDK libraries.
https://sap.github.io/cloud-sdk/docs/java/features/rest/clients/scp-workflow-rest-api
When I deployed the application to Cloud Foundry environment. It failed to start. The error messages are the same when I started the application locally.
Cloud SDK version: 3.27.0
Below is the error stack.
...ANSWER
Answered 2020-Sep-11 at 07:02Update: SAP Cloud SDK 3.28.1 is available since today and fixes this issue. Check out the release notes here.
Thanks for reporting this Jerry. This is a bug, I will update this answer here once a bug fix is released with the SAP Cloud SDK.
As a workaround you can use the Tomee archetype of the SAP Cloud SDK scp-cf-tomee
. There the problem does not exist.
QUESTION
I'm building a Spring Boot project making use of S/4HANA custom OData Service and Java VDM. I have been following various tutorials on SAP Blog, developer.sap.com or S4H13 course - the approach is pretty much the same. I managed to successfully generate VDM for my Custom OData Service based on the edmx file, created all necessary commands, methods in the controller and so on.
Unfortunately, I'm encountering an issue when launching the project locally.
I use the following command first: mvn clean package
and later, when I'm in the application directory want to run the project: mvn spring-boot:run
.
The project build fails with the following errors and exceptions:
2020-07-31 12:45:20.941 ERROR 70176 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Exception sending context initialized event to listener instance of class [com.sap.cloud.sdk.s4hana.connectivity.ErpDestination]
ANSWER
Answered 2020-Jul-31 at 13:16Please find the outdated dependency in your dependency tree:
QUESTION
I am not able to move forward due to an exception thrown by Cloud SDK. EdmNamedImpl class of cloud SDK is throwing an error due to incorrect SF Metadata property name. The property name of the SF entity is "goto-url", so due to hyphen in field name is not being accepted by PATTER_VALID_NAME matcher. I have tried many approaches but could not get around this exception. I guess Cloud SDK either should provide a way to suppress name validation or a way to pass path of local metadata file to execute method of FluentHelper.
The way I am constructing Query is:
...ANSWER
Answered 2020-Jun-16 at 09:38Unfortunately I currently see no easy way around this. The SDK itself internally uses another library to perform OData 2.0 requests. The library performs the metadata request and processes it before issuing the actual request.
However, as shared in this answer a hyphen is not legal within entity identifiers. So this is more of a problem on the SuccessFactors side of things.
Edit:
There is a beta API in place that does not rely on metadata requests but requires you to assemble the request manually:
QUESTION
I come to ask help with an issue I am facing at an application deployment in SCP.
SAP Cloud Platform:
- SCP environment is Neo
- Runtime name = Java EE7 Web Profile TomEE 7
- Version = 1.74
Java application:
- Archetype Neo
- SAP Cloud SDk v3
The application log follows:
...ANSWER
Answered 2020-Jun-15 at 11:03I guess your application uses backend protection, right?
The class com.sap.cloud.sdk.cloudplatform.security.servlet.HttpSecurityHeadersFilter
is included in the Maven artifact
QUESTION
I am looking for a way to call S4HANA on-premise BAPI locally and on SAP Cloud Platform with Cloud SDK. The problem is how to define RFC destinations just like HTTP ones.
I also encountered JCo class not found exception and could not find a suitable workaround.
Locally
In HTTP destination, I can provide environment variables like the following:
...ANSWER
Answered 2020-Apr-08 at 13:44Thanks for raising this question here. I can identify different aspects in your question, hence touching upon them individually in the following.
JCO Class Not found exceptionPlease provide more information on the following questions:
- I understand that you receive a
java.lang.NoClassDefFoundError: com/sap/conn/jco/JCo
at runtime after app deployment to the SCP. Is my understanding correct? - I understand that you use a Spring Boot application, correct?
- Have you used the SAP Cloud SDK archetype?
- Please attach the application log here for further reference.
- Can you also elaborate on how exactly you added sapjco3.jar to the project classpath?
- Do you deploy you app as jar or as war?
I understand that you struggle understanding how to specify the RFC destination in your environment variable. May I ask what you already tried respectively which concrete problems (error messages, etc.) you are facing?
RFC Destination cannot be decorated to involve additional propertiesYou are pointing out correctly that the SAP Cloud SDK is able to enrich the request headers considering the additional properties on an HTTP destination. Therefore, you need to decorate your HttpDestination
instance like so:
QUESTION
We are trying to call OData and REST endpoints in an S/4HANA On Premise system from our SAP Cloud Platform Java app. However, our attempts to use the SAP CloudSDK to get an HTTP client for the corresponding destination
...ANSWER
Answered 2020-May-20 at 10:37Florian, you'll have to decorate your destination with DefaultErpHttpDestination
like
QUESTION
It works in SAP Cloud SDK Version 3.7.0 to 3.10.0 but failed in the latest version from 3.11.0 to 3.13.0.
I have two applications deployed on SAP Cloud Platform. One is cloud java application based on SAP Cloud SDK using destination which is configured with Principal Propagation. The other is app router.
All related configuration of Principal Propagation are all finished in Cloud Connector and backend on-premise system. We also set up our own identity provider in SAP Cloud Platform.
Let me introduce what we want to achieve.
User login to cloud application using our own IDP from app router and then get some data from S4 on-premise system using the same user (different from the technical user in Basic authentication) configured in destination.
For more details please refer to https://blogs.sap.com/2017/07/13/part-2-how-to-use-the-sap-cloud-platform-connectivity-and-the-cloud-connector-in-the-cloud-foundry-environment/
What I did in java application to invoke billing document from S4 system.
...ANSWER
Answered 2020-Feb-24 at 13:21The error message SSO token validation failed. Make sure trust is configured correctly in the cloud connector to enable principal propagation, if token has not expired yet.
indicates an outdated/wrong/lacking trust configuration between the Cloud Connector and Cloud Foundry.
Kindly reconsider the trust configuration as per its official documentation, conduct the steps below headline 'Configure Trusted Entities in the Cloud Connector' in particular
QUESTION
I am getting the issue described up above when running integration tests.
The full error message follows:
...ANSWER
Answered 2020-Mar-25 at 13:55Looking at the dependency tree, I can see that there is a mix-up of SDK dependencies of version 2 and 3 in your project which is causing the issue.
The dependency entries with groupId starting with com.sap.cloud.s4hana
are mostly v2 dependencies and the ones with groupId starting with com.sap.cloud.sdk
are v3 dependencies.So, please use this as a reference to convert all v2 dependencies to the corresponding v3 dependencies.
Alternatively, you can also include the sdk-bom
dependency (groupId: com.sap.cloud.sdk
, artifactId: sdk-bom
) in your pom with a version
, so that you can start including other sdk dependencies without explicitly including the version
information.
This would also ensure that all the sdk dependencies you include would always fall into the a particular version:
QUESTION
I want to get user info and authorities but could not find any interface. But there is an interface called AuthTokenAccessor in package com.sap.cloud.sdk.cloudplatform.security. I could get JWT token but could not parse it due to lack of information e.g. sign key.
...ANSWER
Answered 2020-Mar-24 at 15:07Please use PrincipalAccessor
instead. UserAccessor
has been merged into the more generic PrincipalAccessor
.
Also, while migrating from v2 to v3 of the Cloud SDK, please refer to this migration guide. You can also find release notes of the SDK here.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install CloudPlatform
You can use CloudPlatform like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the CloudPlatform component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page