GetAttributeData() Method Returns Null In One Environment But Works In Another Environment
(Doc ID 1676527.1)
Last updated on OCTOBER 18, 2021
Applies to:
Oracle WebCenter Sites - Version 11.1.1.8.0 and laterInformation in this document applies to any platform.
Symptoms
The MutableAssetData getAttributeData method returns null on Stage but works on Dev.
Below is the scenario:
Have a utility designed to update a page attribute with existing data from a page.
When running this utility on the dev server, it works properly as designed.
When running this utility on the stage server, see the following issue ...
First, a code snippet that demonstrates the issue:
Session ses = SessionFactory.getSession();
AssetDataManager adm = (AssetDataManager) ses.getManager( AssetDataManager.class.getName() );
AssetId id = new AssetIdImpl("Page", <AssetID>L);
for (MutableAssetData assetdata : adm.readForUpdate(Arrays.asList(id))) {
AttributeData testattrData = assetdata.getAttributeData("testattr");
if (testattrData == null) {
ics.StreamText("testattr is null
");
}
else {
ics.StreamText("testattr is not null
");
}
}
"testattr" is the page attribute that was published from dev to stage.
The output of this test program is as follows ...
On dev: testattrData Data is not null
On stage: testattrData Data is null
The servers are set up the same. The example page (asset id = <AssetID>) was also published from dev to stage.
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |