cancel
Showing results for 
Search instead for 
Did you mean: 

URGENT** Can not read Configuration properties file

Former Member
0 Kudos

I have created a properties file called buildlabel.properties. I am not able to access this file using the IWDConfiguration interface. I get the Configuration not found exception. I copied the properties file at ALL of the following locations but still it’s not finding the resource.

-src\configuration

- src\configuration\Applications

-src\configuration\Applications\com.epiviews.relatedsearch.Related_Search

I am able to see the configuration file in the configuration adapter in visual admin.

The error I am getting is “Configuration not found: webdynpro/local/ Web_Dynpro/Applications/com. epiviews.relatedsearch.Related_Search/buildlabel.properties”

I tried reading the properties file using both of the following methods. In debugger I can see that the WDDeployableObjectPartType is not null.

IWDDeployableObject spiceDeplObj =

WDDeployableObject.getDeployableObject("local/Web_Dynpro");

WDDeployableObjectPart[] applParts =

spiceDeplObj.getParts(WDDeployableObjectPartType.APPLICATION);

WDDeployableObjectPart cicPart = null;

for (int i = 0; i < applParts.length; i++) {

if (applParts<i>

.getName()

.equals("com.epiviews.relatedsearch.Related_Search")) {

cicPart = applParts<i>;

break;

}

}

IWDConfiguration buildFileConfig =

WDConfiguration.getConfigurationByName(

cicPart,

"buildlabel.properties");

} catch (WDConfigurationNotFoundException we) {

LOG.debug(we.getMessage());

}

Method #2:

WDDeployableObjectPart currentAppPart =

wdComponentAPI.getApplication().getDeployableObjectPart();

//When I inspect currentAppPart I do see the object part name as //com.epiviews.relatedsearch.Related_Search & deployable object as local/Web_Dynpro

try {

IWDConfiguration buildFileConfig2 =

WDConfiguration.getConfigurationByName(

currentAppPart,

"buildlabel.properties");

} catch (WDConfigurationNotFoundException wee) {

LOG.debug(wee.getMessage());

}

What am I doing wrong? I am using EP6 sp9.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hello Sam,

Are your properties files included in wda archive (check generated ear file, wda is inside)?

And is first approach there is small point:

not

WDConfiguration.getConfigurationByName(cicPart, "buildlabel.properties");

but

WDConfiguration.getConfigurationByName(cicPart, "buildlabel");

Not sure whether it would fix the problem, but you have not so many options.

And another last-desperate-step - restart your engine. Sometime it helps to resolve class loading issues.

Best regards, Maksim Rashchynski.

Answers (1)

Answers (1)

Former Member
0 Kudos

Earlier answer solved my problem.

Just FYI the NW documentation is wrong in this case.Here is what the documentation says..

IWDConfiguration myConfig =

WDConfiguration.getConfigurationByName(cicPart, “my_config.properties”);

http://help.sap.com/saphelp_nw04/helpdata/en/b8/aa343e32ff1033e10000000a114084/content.htm