问题标签 [s4sdk]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1469 浏览

java - SAP Cloud Foundry 中的远程调试

我想知道如何远程调试部署在 SAP Cloud Foundry 中的 S4SDK/Spring 2.0.6 Java 应用程序。

我正在使用 Eclipse(Spring Tool Suite)并以调试模式启动应用程序。应用程序将使用以下环境变量重新启动: -Dspring.devtools.remote.secret=secret -Xdebug -Xrunjdwp:server=y,transport=dt_socket,suspend=n,address=47822

控制台输出显示,启动后,SSH 隧道已自动成功创建(作为先决条件,我已使用 cf enable-ssh 启用 SSH)。和“10.0.136.5:34858 成功远程访问”。

几秒钟后,eclipse 显示消息“无法连接到远程 VM”。

如何启用远程调试?

0 投票
1 回答
2560 浏览

sap - 地址已在使用中:部署到 localhost 时的 JVM_Bind

我正在使用命令 mvn tomee:run 部署原型 tomee-cf 并且我得到地址已经在使用问题。我检查了是否在端口 8005,8009,8080 和 8443 上运行的东西,发现只有一个系统 IPv4 监听 8005

我希望应用程序在本地主机上运行

0 投票
1 回答
470 浏览

s4sdk - 尝试将 dynatrace 代理集成到基于 s4sdk 的应用程序时收到 404 错误

我正在尝试按照此处提到的步骤将 dynatrace 与基于 s4sdk 的应用程序集成:

https://www.dynatrace.com/support/help/cloud-platforms/cloud-foundry/application-only/deploy-oneagent-on-sap-cloud-platform-for-application-only-monitoring/

唯一的例外:我使用的是 dynatrace 的试用帐户,而不是通过 SAP 市场设置帐户。

尝试推送我的应用程序时,我在暂存阶段收到以下错误:

编辑:从我的 PC 访问链接或通过 ssh 连接到容器后没有任何问题。

所以我的问题是我是否需要使用 SAP 应用程序中心来获取 dynatrace,或者错误是否出在其他地方?

名为 dynatrace-service 的用户提供服务的配置:

在我的应用程序的 manifest.yml 中设置:

0 投票
1 回答
122 浏览

s4sdk - 无法在 approuter 应用程序中获取 /api/business-partners

​嗨专家,我正在关注https://open.sap.com/courses/s4h13/items/258qEhXx5kdG8b4SXMSJYp教程,在部署应用程序后,我在 approuter 应用程序中的 servlet 得到 404,而相同的服务给我“http 401”如预期的那样在“地址管理器”中。有没有人成功做到这一点?如果是这样,请引导我朝着正确的方向前进。我已经经历了我能想到的一切,但我无法摆脱这个问题。

xs-app.json 文件内容

0 投票
2 回答
238 浏览

s4sdk - 无法使用 s4sdk 从本地系统获取数据

我按照教程进行操作: https ://open.sap.com/courses/s4h13/items/258qEhXx5kdG8b4SXMSJYp 我能够从模拟服务中获取数据,但是当我在目的地添加本地 sap 系统时得到一个空数组。我正在尝试阅读 ProductMaster 服务(在我的 sap 系统中可用)。任何正确博客的指导或链接将不胜感激。

应用程序日志:-

2019-01-31T09:49:30.98+0530 [APP/PROC/WEB/0] OUT { "written_at":"2019-01-31T04:19:30.980Z","written_ts":3583833066597470,"component_id":" ae30fb63-3ddc-42e4-95c9-c190e7c5950e","component_name":"address-manager","DCComponent":"","HOST":"0ca2bbc0-3f71-4dfd-5e4e-8577","organization_name":"- ","component_type":"application","space_name":"dev","SERVER":"main","component_instance":"0","organization_id":"-","correlation_id":"-", "CSNComponent":"","space_id":"71c96992-bd88-41e6-ac83-bdcc94e38fc6","应用程序":"address-manager","container_id":"10.0.137.101","type":"log","logger":"com.sap.xs2.security.container.UserInfoTomcat","thread":"http-bio-0.0.0.0-8080- exec-1","level":"INFO","categories":[],"msg":"解析 SAP_JWT_TRUST_ACL (value: [{\"clientid\" : \" \", \"identityzone\" : \ "\"}])" } 2019-01-31T09:49:30.98+0530 [APP/PROC/WEB/0] OUT { "written_at":"2019-01-31T04:19:30.980Z","written_ts": 3583833067255806,"component_id":"ae30fb63-3ddc-42e4-95c9-c190e7c5950e","component_name":"address-manager","DCComponent":"","HOST":"0ca2bbc0-3f71-4dfd-5e4e-8577" ,"organization_name":"-","component_type":"application","space_name":"dev","SERVER":"main","component_instance":"0","organization_id":"-"," correlation_id":"-","CSNComponent":"","space_id":"71c96992-bd88-41e6-ac83-bdcc94e38fc6","Application":"address-manager","container_id":"10.0.137.101","type":"log","logger":"com.sap.xs2.security.container.UserInfoTomcat","thread":"http-bio-0.0.0.0-8080 -exec-1","level":"INFO","categories":[],"msg":"服务计划的访问令牌\"application\"收到"} 2019-01-31T09:49:30.98+0530 [APP/PROC/WEB/0] OUT { "written_at":"2019-01-31T04:19:30.980Z","written_ts":3583833067335285,"component_id":"ae30fb63-3ddc-42e4-95c9-c190e7c5950e", "component_name":"address-manager","DCComponent":"","HOST":"0ca2bbc0-3f71-4dfd-5e4e-8577","organization_name":"-","component_type":"application","space_name":"dev","SERVER":"main","component_instance":"0","organization_id":"-","correlation_id":"-","CSNComponent":"","space_id": "71c96992-bd88-41e6-ac83-bdcc94e38fc6","应用程序":"address-manager","container_id":"10.0.137.101","type":"log","logger":"com.sap.xs2 .security.commons.SAPVcapServicesParser","thread":"http-bio-0.0.0.0-8080-exec-1","level":"INFO","categories":[],"msg":"VCAP_SERVICES:仅存在一个适用的绑定,服务计划提示“应用程序”未使用”} 2019-01-31T09:49:30.98+0530 [APP/PROC/WEB/0] OUT { "written_at":"2019-01-31T04:19:30.980Z","written_ts":3583833067403879,"component_id":"ae30fb63-3ddc-42e4-95c9-c190e7c5950e","component_name":"address-manager","DCComponent":" ","HOST":"0ca2bbc0-3f71-4dfd-5e4e-8577","organization_name":"-","component_type":"application","space_name":"dev","SERVER":"main", "component_instance":"0","organization_id":"-","correlation_id":"-","CSNComponent":"","space_id":"71c96992-bd88-41e6-ac83-bdcc94e38fc6","应用" :"address-manager","container_id":"10.0.137.101","type":"log","logger":"com.sap.xs2.security.commons.SAPPropertyPlaceholderConfigurer","thread":"http-bio-0.0.0.0-8080-exec-1","level":"INFO","categories":[], "msg":"从 VCAP_SERVICES 获取:clientid=sb-address-manager-p1942271708trial!t9649" }
2019-01-31T09:49:37.03+0530 [APP/PROC/WEB/0] OUT { "written_at":"2019-01-31T04:19:37.030Z","written_ts":3583839116771998,"component_id":" ae30fb63-3ddc-42e4-95c9-c190e7c5950e","component_name":"address-manager","DCComponent":"","HOST":"0ca2bbc0-3f71-4dfd-5e4e-8577","organization_name":"- ","component_type":"application","space_name":"dev","SERVER":"main","component_instance":"0","organization_id":"-","correlation_id":"-", "CSNComponent":"","space_id":"71c96992-bd88-41e6-ac83-bdcc94e38fc6","应用程序":"address-manager","container_id":"10.0.137.101","type":"log","logger":"com.sap.xs2.security.container.UserInfoTomcat","thread":"http-bio-0.0.0.0-8080- exec-3","level":"INFO","categories":[],"msg":"解析 SAP_JWT_TRUST_ACL (value: [{\"clientid\" : \" \", \"identityzone\" : \ "-","component_type":"application","space_name":"dev","SERVER":"main","component_instance":"0","organization_id":"-","correlation_id":"-" ,"CSNComponent":"","space_id":"71c96992-bd88-41e6-ac83-bdcc94e38fc6","Application":"address-manager","container_id":"10.0.137.101","type":"log ","logger":"com.sap.xs.security.container.XSSecurityAuthenticator","thread":"http-bio-0.0.0.0-8080-exec-10","level":"WARN","categories ":[],"msg":"AuditLog 服务绑定不可用。消息将写入控制台输出。","stacktrace":[" com.sap.xs.audit.api.exception.AuditLogNotAvailableException:无法将审核日志消息发送到后端。缺少审计日志服务凭据参数或绑定到审计日志服务实例。","\tat com.sap.xs.audit.client.impl.ConsoleCommunicator.send(ConsoleCommunicator.java:10)","\tat com.sap。 xs.audit.client.impl.AuditLogMessageImpl.log(AuditLogMessageImpl.java:85)","\tat com.sap.xs.security.container.XSSecurityAuthenticator.logSecurityEventAuditMessage(XSSecurityAuthenticator.java:112)","\tat com. sap.xs.security.container.XSSecurityAuthenticator.logSuccessfulLogonAuditMessage(XSSecurityAuthenticator.java:97)","\tat com.sap.xs.security.container.XSSecurityAuthenticator.authenticate(XSSecurityAuthenticator.java:45)","\tat org. apache.catalina.authenticator.AuthenticatorBase。main","component_instance":"0","organization_id":"-","correlation_id":"-","CSNComponent":"","space_id":"71c96992-bd88-41e6-ac83-bdcc94e38fc6", "应用程序":"address-manager","container_id":"10.0.137.101","type":"log","logger":"com.sap.cloud.sdk.s4hana.connectivity.ErpConfigContext","thread ":"http-bio-0.0.0.0-8080-exec-10","level":"INFO","categories":[],"msg":"回退到语言环境 \"en_US\"。要指定语言环境,请在目标“ErpQueryEndpoint”上设置属性或提供语言环境作为显式参数。(日志条目结束)”} 2019-01-31T09:49:41。101","type":"log","logger":"com.sap.cloud.sdk.s4hana.connectivity.ErpConfigContext","thread":"hystrix-com.sap.cloud.s4hana.examples.addressmgr. commands.GetAllProductsCommand#t=#u=-6","level":"INFO","categories":[],"msg":"回退到语言环境 \"en_US\"。要指定语言环境,请在目标“ErpQueryEndpoint”上设置属性或提供语言环境作为显式参数。(日志条目结束)"} 2019-01-31T09:49:41.38+0530 [APP/PROC/WEB/0] OUT { "written_at":"2019-01-31T04:19:41.386Z","written_ts" :3583843472964643,"component_id":"ae30fb63-3ddc-42e4-95c9-c190e7c5950e","component_name":"address-manager","DCComponent":""," "msg":"成功连接到目标服务。" } 2019-01-31T09:49:41.64+0530 [APP/PROC/WEB/0] OUT { "written_at":"2019-01-31T04:19:41.639Z","written_ts":3583843726319402,"component_id": "ae30fb63-3ddc-42e4-95c9-c190e7c5950e","component_name":"address-manager","DCComponent":"","HOST":"0ca2bbc0-3f71-4dfd-5e4e-8577","organization_name":" -","component_type":"application","space_name":"dev","SERVER":"main","component_instance":"0","organization_id":"-","correlation_id":"-" ,"CSNComponent":"","space_id":"71c96992-bd88-41e6-ac83-bdcc94e38fc6" "level":"ERROR","categories":[],"msg":"成功连接到目标服务。" } 2019-01-31T09:49:41.75+0530 [APP/PROC/WEB/0] OUT { "written_at":"2019-01-31T04:19:41.751Z","written_ts":3583843838110377,"component_id": "ae30fb63-3ddc-42e4-95c9-c190e7c5950e","component_name":"address-manager","DCComponent":"","HOST":"0ca2bbc0-3f71-4dfd-5e4e-8577","organization_name":" -","component_type":"application","space_name":"dev","SERVER":"main","component_instance":"0","organization_id":"-","correlation_id":"-" ,"CSN 组件":"","https://approuter-p1942271708trial.cfapps.eu10.hana.ondemand.com/address-manager/ " "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36""-""10.0.137.101:61002"x_forwarded_for:"-"x_forwarded_proto:"https"vcap_request_id:"4b3e148c-ac4a-444f-5676-00f83c7fda10"response_time:0.963585441 app_id:"ae30fb653-de3d -c190e7c5950e" app_index:"0" x_correlationid:"c3b465c1-cdad-4fe4-7033-9c9b3d8b7971" x_b3_traceid:"ee848c54fc661573" x_b3_spanid:"ee848c54fc661573" x_b3_parentspanid:-"

云连接器中的子账户

Cloud Foundry 中的目的地

在此处输入图像描述

在此处输入图像描述

0 投票
1 回答
120 浏览

s4sdk - 无法生成 VDM 类

我关注了博客:https ://blogs.sap.com/2018/04/30/deep-dive-10-with-sap-s4hana-cloud-sdk-generating-java-vdm-for-s4hana-custom-odata -service/comment-page-1/#comment-450108

VDM -.java创建文件,但每次编译都会失败,这似乎是我的一些愚蠢错误。

堆栈跟踪:

0 投票
1 回答
518 浏览

s4sdk - AuthTokenAccessException:无法解码 JWT 承载:请求的“授权”标头中不存在 JWT 承载

我正在尝试使用云 sdk API 进行 OData 调用。虽然我传递了 JWT 令牌(客户端凭据),但我得到了以下异常:

完整的堆栈跟踪:

我不确定您需要哪些类来进行故障排除。请发表评论以获取更多信息。

0 投票
1 回答
40 浏览

s4sdk - 无法导入机器学习依赖项

我正在尝试使用 s4sdk 原型合并机器学习服务。我无法加载 ML 依赖项。我需要在 pom.xml 中显式添加它还是它是 s4 原型的一部分。

我正在按照下面的博客尝试这是链接

以下无法加载的依赖项

导入 com.sap.cloud.sdk.services.scp.machinelearning.LeonardoMlFoundation;请在这方面帮助我。

0 投票
1 回答
63 浏览

s4sdk - 无法通过邮递员在我的 s4sdk 应用程序上运行更新、创建和删除查询

我按照教程进行操作:https ://open.sap.com/courses/s4h13/items/258qEhXx5kdG8b4SXMSJYp ,我根据我的自定义 Odata 服务进行了更改,但是我的应用程序仅适用于读取操作。我在通过 get 请求获取 X-CSRF-token 后添加了它,但我仍然得到 501(未实现错误),即使我的 servlet 及其各自的命令类中实现了 doPatch 方法。有什么建议我可能做错了吗?

0 投票
2 回答
569 浏览

s4sdk - 使用 S/4HANA SDK 使用 SalesOrderItem API

我正在尝试使用

com.sap.cloud.sdk.s4hana.datamodel.odata.services.DefaultSalesOrderService

由 S/4HANA SDK 提供的类,但响应始终是一个空列表,并且在日志中我看到此错误:

提一下:使用的SDK最新版本——2.9.1——S/4HANA系统版本为1902。

这是一个响应示例: