Skip to Content
avatar image
Former Member

Java System Properties: Parameter returning null

Hi All,

I have a requirement to create a property in EJB DC which is configurable through NWA.

For this, I have created an EJB DC & EAR DC.

In the META-INF folder of EAR DC, I have created “” file. 

In file, I have created the required property. The properties are getting displayed in NWA also, when deployed.

In the java file of EJB DC, I am implementing the below code to read the required property.

InitialContext appCtx = new InitialContext();

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

  if(appCfgProps != null){

  logger.infoT("[ApplicationConfiguration] appCfgProps.toString() = "+appCfgProps.toString());

  java.util.Properties appProps = appCfgProps.getApplicationProperties();

  if(appProps != null){

  String oldUri = appProps.getProperty("oldUri");

  logger.infoT("[ApplicationConfiguration] oldUri = "+oldUri);


  logger.infoT("[ApplicationConfiguration] appProps is NULL");



  logger.infoT("[ApplicationConfiguration] appCfgProps is NULL");


But the parameter “appProps” is getting returned as null, due to which null pointer exception occurs &  I’m not able to fetch the required property.

Can you please advise how to resolve this.

Thanks & Regards.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer