Troubleshooting
Problem
Two XML files are required to import a theme policy with XMLAccess.
Symptom
Importing a theme policy with XMLAccess results in:
Error EJPAG1006E: There was an exception when trying to import the selected XML file. Please make sure it is a valid XML file and try again.
com.ibm.portal.WpsException: EJPAG1006E: There was an exception when trying to import the selected XML file. Please make sure it is a valid XML file and try again.
at com.ibm.wps.portlets.importxml.actions.DoImportXMLAction.importXMLFileFromFormFile(DoImportXMLAction.java:338)
...
Error EJPFB0005E: An unexpected exception occurred.
com.ibm.wps.command.CommandFailedException: EJPFB0005E: An unexpected exception occurred. WrappedException is: com.ibm.wps.command.xml.XmlCommandException:
EJPXA0030E: The schema Policy.xsd is not valid for an XML configuration request. unknown at com.ibm.wps.command.AbstractCommand.throwCommandFailedException(AbstractCommand.java:525)
...
Error EJPXA0030E: The schema Policy.xsd is not valid for an XML configuration request. com.ibm.wps.command.xml.XmlCommandException: EJPXA0030E: The schema Policy.xsd is not valid for an XML configuration request. unknown
at com.ibm.wps.command.xml.XmlUtils.getEngine(XmlUtils.java:177)
...
Cause
A theme policy node must be created first via XMLAccess, and then the theme policy itself may be imported to the theme policy node. Importing a theme policy without first creating a theme policy node will result in the errors above.
Thus, specifying a sample policy XML configuration file as input to XMLAccess results in these errors.
Likewise, for any custom policy XML configuration files created based off the sample policy, these same errors may occur.
Resolving The Problem
The input to XMLAccess should be modeled after addThemePolicyNode.xml (Infocenter > Designing a Portal site > Layout of the Portal page > Theme polices > Navigate to the "Creating your own theme policy" section of this page.).
This XMLAccess input file should reference the theme policy XML configuration file similar to:
<policy-node ...>
<url>path to theme policy XML configuration file</url>
</policy-node>
With an example XMLAccess input file as follows:
<?xml version="1.0" encoding="UTF-8"?>
<request xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
create-oids="true" type="update"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<portal action="locate">
<policy-node action="update" label="WebPage" type="" path="">
<url>file:///c:/temp/myThemePolicy.xml</url>
</policy-node>
</portal>
</request>
Related Information
Was this topic helpful?
Document Information
Modified date:
03 December 2021
UID
swg21443245