Administration guide > Troubleshoot


Troubleshoot XML configuration


Problem: Deployment policy and ObjectGrid XML files must match

The deployment policy and ObjectGrid XML files must match. If they do not have matching ObjectGrid names and map names, errors occur.

If the backingMap list in an ObjectGrid XML file does not match the map references list in a deployment policy XML file, an error occurs on the catalog server.

For example, the following ObjectGrid XML file and deployment policy XML file are used to start a container process. The deployment policy file has more map references than are listed in the ObjectGrid XML file.

ObjectGrid.xml - incorrect example

<?xml version="1.0" encoding="UTF-8"?>
<objectGridConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://ibm.com/ws/objectgrid/config ../objectGrid.xsd"
 xmlns="http://ibm.com/ws/objectgrid/config">
   
<objectGrids>
       
<objectGrid name="accounting">
           
<backingMap name="payroll" readOnly="false" />
       
</objectGrid>
   
</objectGrids>
</objectGridConfig>

deploymentPolicy.xml - incorrect example

<?xml version="1.0" encoding="UTF-8"?>
<deploymentPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://ibm.com/ws/objectgrid/deploymentPolicy ../deploymentPolicy.xsd"
 xmlns="http://ibm.com/ws/objectgrid/deploymentPolicy">
   
<objectgridDeployment objectgridName="accounting">
       
<mapSet name="mapSet1" numberOfPartitions="4" minSyncReplicas="1" 
                    maxSyncReplicas="2" maxAsyncReplicas="1">
           
<map ref="payroll"/>
           
<map ref="ledger"/>
       
</mapSet>
   
</objectgridDeployment>
</deploymentPolicy>


Messages: An error message occurs in the SystemOut.log file when the deployment policy is incompatible with the ObjectGrid XML file. For the preceding example, the following message occurs:

CWOBJ3179E: The map ledger reference in the mapSet mapSet1 of ObjectGrid accounting 
deployment descriptor file does not reference a valid backing map from the ObjectGrid 
XML.

If the deployment policy is missing map references to backingMaps that are listed in the ObjectGrid XML file, an error message occurs in the SystemOut.log file. For example:

CWOBJ3178E: The map ledger in ObjectGrid accounting referenced in the ObjectGrid XML 
was not found in the deployment descriptor file.


Solution: Determine which file has the correct list and alter the relevant code accordingly.


Problem: Incorrect ObjectGrid names between XML files also causes and error

The name of the ObjectGrid is referenced in both the ObjectGrid XML file and the deployment policy XML file.


Message: An ObjectGridException occurs with a caused by exception of IncompatibleDeploymentPolicyException. An example follows.

Caused by: com.ibm.websphere.objectgrid.IncompatibleDeploymentPolicyException: The objectgridDeployment with objectGridName "accountin" does not have a corresponding objectGrid in the ObjectGrid XML.

The ObjectGrid XML file is the master list of ObjectGrid names. If a deployment policy has an ObjectGrid name that is not contained in the ObjectGrid XML file, an error occurs.


Solution: Verify details such as the spelling of the ObjectGrid name. Remove any extra names, or add missing ObjectGrid names, to the ObjectGrid XML or deployment policy XML files. In the example message, the objectGridName is misspelled as "accountin" instead of "accounting".


Problem: Some of the attributes in the XML file can only be assigned certain values

These attributes have acceptable values enumerated by the schema. The following list provides some of the attributes:

If one of these attributes is assigned an invalid value, XML validation fails. In the following example XML file, an incorrect value of INVALID_COPY_MODE is used:

INVALID_COPY_MODE example
<?xml version="1.0" encoding="UTF-8"?>
<objectGridConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://ibm.com/ws/objectgrid/config ../objectGrid.xsd"
 xmlns="http://ibm.com/ws/objectgrid/config">
   
<objectGrids>
       
<objectGrid name="accounting">
           
<backingMap name="payroll" copyMode="INVALID_COPY_MODE"/>
       
<objectGrid/>
  
</objectGrids>
</objectGridConfig>

The following message appears in the log.

CWOBJ2403E: The XML file is invalid. A problem has been detected with < null > at line 5. The error message is cvc-enumeration-valid: Value 'INVALID_COPY_MODE' is not facet-valid with respect to enumeration '[COPY_ON_READ_AND_COMMIT, COPY_ON_READ, COPY_ON_WRITE, NO_COPY, COPY_TO_BYTES]'. It must be a value from the enumeration.


Problem: Missing or incorrect attributes or tags in an XML file causes errors

Such as the following example in which the ObjectGrid XML file is missing the closing < /objectGrid > tag:

missing attributes - example XML

<?xml version="1.0" encoding="UTF-8"?>
<objectGridConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://ibm.com/ws/objectgrid/config ../objectGrid.xsd"
 xmlns="http://ibm.com/ws/objectgrid/config">
   
<objectGrids>
       
<objectGrid name="accounting">
           
<backingMap name="payroll" />

  
</objectGrids>
</objectGridConfig>


Message:

CWOBJ2403E: The XML file is invalid. A problem has been detected with 
< null > at line 7. The error message is The end-tag for element type "objectGrid" 
must end with a '>' delimiter.

An ObjectGridException about the invalid XML file occurs with the name of the XML file.


Solution: Verify the necessary tags and attributes appear in the XML files with correct format.


Problem: XML file formatted with incorrect or missing syntax

The CWOBJ2403E appears in the log. For example, the following message is displayed when a quotation is missing on one of the XML attributes

CWOBJ2403E: The XML file is invalid. A problem has been detected with < null > at line 7. The error message is Open quote is expected for attribute "maxSyncReplicas" associated with an element type "mapSet".

An ObjectGridException about the invalid XML file also occurs.


Solution: Various solutions can be used for a given XML syntax error. Consult relevant documentation about XML script writing.


Problem: Referencing a nonexistent plug-in collection causes an XML file to be invalid

For example, when using XML to define BackingMap plug-ins, the pluginCollectionRef attribute of the backingMap element must reference a backingMapPluginCollection. The pluginCollectionRef attribute must match the backingMapPluginCollection elements.


Message:

If the pluginCollectionRef attribute does not match any ID attributes of any of the backingMapPluginConfiguration elements, the following message, or one that is similar, is displayed in the log.

[7/14/05 14:02:01:971 CDT] 686c060e XmlErrorHandl E CWOBJ9002E: This is an English only Error message: Invalid XML file. Line: 14; URI: null; Message: Key 'pluginCollectionRef' with value 'bookPlugins' not found for identity constraint of element 'objectGridConfig'.

The following XML file is used to produce the error. Notice that the name of the BackingMap book has its pluginCollectionRef attribute set to bookPlugins, and the single backingMapPluginCollection has an ID of collection1.

referencing a non-existent attribute XML - example

<?xml version="1.0" encoding="UTF-8"?>
<objectGridConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://ibm.com/ws/objectgrid/config../objectGrid.xsd"
 xmlns="http://ibm.com/ws/objectgrid/config">
  
<objectGrids>
     
<objectGrid name="bookstore">
        
<backingMap name="book" pluginCollectionRef="bookPlugin" />
     
</objectGrid>
  
</objectGrids>
  
<backingMapPluginCollections>
   
<backingMapPluginCollection id="collection1">
    
<bean id="Evictor"
       className="com.ibm.websphere.objectgrid.plugins.builtins.LRUEvictor" />
    
</backingMapPluginCollection>
   
</backingMapPluginCollections>
</objectGridConfig>


Solution:

To fix the problem, ensure that the value of each pluginCollectionRef matches the ID of one of the backingMapPluginCollection elements. Simply change the name of pluginCollectionRef to collection1 to not receive this error. Alternatively, change the ID of the existing backingMapPluginCollection to match the pluginCollectionRef, or add an additional backingMapPluginCollection with an ID that matches the pluginCollectionRef to correct the error.


Problem: XML validation failure

The IBM SDK v1.4.2 contains an implementation of some JAXP function to use for XML validation against a schema. When using an SDK that does not contain this implementation, attempts to validate might fail.

When you attempt to validate XML with an SDK that does not have the necessary implementation, the log contains the following error:

XmlConfigBuild XML validation is enabled
SystemErr R com.ibm.websphere.objectgrid
SystemErr R at com.ibm.ws.objectgrid.ObjectGridManagerImpl.getObjectGridConfigurations
    (ObjectGridManagerImpl.java:182)
SystemErr R at com.ibm.ws.objectgrid.ObjectGridManagerImpl.createObjectGrid(ObjectGridManagerImpl.java:309)
SystemErr R at com.ibm.ws.objectgrid.test.config.DocTest.main(DocTest.java:128)
SystemErr R Caused by: java.lang.IllegalArgumentException: No attributes are implemented
SystemErr R at org.apache.crimson.jaxp.DocumentBuilderFactoryImpl.setAttribute(DocumentBuilderFactoryImpl.java:93)
SystemErr R at com.ibm.ws.objectgrid.config.XmlConfigBuilder.<init>XmlConfigBuilder.java:133)
SystemErr R at com.ibm.websphere.objectgrid.ProcessConfigXML$2.runProcessConfigXML.java:99)...

The SDK that is used does not contain an implementation of JAXP function that is necessary to validate XML files against a schema.


Solution: To validate XML by using an SDK that does not contain JAXP implementation, download Apache Xerces, and include its Java archive (JAR) files in the classpath.

To avoid this problem, after you download Xerces and include the JAR files in the classpath, you can validate the XML file successfully.


Parent topic:

Troubleshoot


Related tasks

Enable logs
Enable trace
Troubleshoot installation
Troubleshoot client connectivity
Troubleshoot loaders
Troubleshoot security

Related reference

Trace options
IBM Support Assistant for WebSphere eXtreme Scale
Messages
Release notes


+

Search Tips   |   Advanced Search