I'm trying to implement an Accessing Application Properties functionality.
In SAP's code snippet there is a line:
ApplicationPropertiesAccess appCfgProps = (ApplicationPropertiesAccess) ctx.lookup("ApplicationConfiguration");
The problem is that my NWDS can't resolve ApplicationPropertiesAccess
, I get an error:
ApplicationPropertiesAccess cannot be resolved to a type
SAP JVM version: 8.1.030
Why can't NWDS/Eclipse resolve ApplicationPropertiesAccess
?
The issue was with a lack of the required DC. Based on SAP NetWeaver 7.20 (SP01) JavaDoc, in order to recognize ApplicationProperties
and to be able to add:
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.