on 09-13-2005 2:38 AM
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 its 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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.