简体   繁体   English

ApplicationPropertiesAccess无法解析为一种类型

[英]ApplicationPropertiesAccess cannot be resolved to a type

I'm trying to implement an Accessing Application Properties functionality. 我正在尝试实现“ 访问应用程序属性”功能。
In SAP's code snippet there is a line: 在SAP的代码段中有一行:

ApplicationPropertiesAccess appCfgProps =
          (ApplicationPropertiesAccess) ctx.lookup("ApplicationConfiguration");

The problem is that my NWDS can't resolve ApplicationPropertiesAccess , I get an error: 问题是我的NWDS无法解析ApplicationPropertiesAccess ,出现错误:

ApplicationPropertiesAccess cannot be resolved to a type ApplicationPropertiesAccess无法解析为一种类型

SAP JVM version: 8.1.030 SAP JVM版本:8.1.030

Any idea why NWDS/Eclipse can't resolve ApplicationPropertiesAccess ? 知道NWDS / Eclipse为什么无法解析ApplicationPropertiesAccess吗?

The issue was with a lack of the required DC . 问题是缺少所需的DC Based on SAP NetWeaver 7.20 (SP01) JavaDoc, in order to recognize ApplicationProperties and to be able to add: 基于SAP NetWeaver 7.20(SP01) JavaDoc,以便识别ApplicationProperties并能够添加:

import com.sap.engine.services.configuration.appconfiguration.ApplicationPropertiesAccess;

we have to add tc/je/appconfiguration/api DC to the Dependencies → Required DCs via Component Properties . 我们必须通过Component Propertiestc / je / appconfiguration / api DC添加到Dependencies→Required DC

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM