920 views

Error importing data directly from one instance to another through XML data source

Problem
When importing data directly from one instance to another instance via XML data source sometimes an error occurs: The current node has been removed using a method other than Iterator#remove() in the progress page.
Symptoms
After executing the data source, in the progress page you can see the following:
  • The state is complete and completion code is Error with the message: The current node has been removed using a method other than Iterator#remove()
  • In the local host logs the following stack trace appears:
  • ImportProcessor SYSTEM SEVERE *** ERROR *** com.glide.db.impex.XMLLoader 
    java.util.ConcurrentModificationException: The current node has been removed using a method other than Iterator#remove() 
    at org.apache.axiom.om.impl.traverse.OMAbstractIterator.hasNext(OMAbstractIterator.java:67) 
    at org.jaxen.util.DescendantAxisIterator.hasNext(DescendantAxisIterator.java:101) 
    at com.glide.xpath.GlideStep$GlideStepImpl.nextFromIterator(GlideStep.java:80) 
    at com.glide.xpath.GlideAllNodeStep.nextFromIterator(GlideAllNodeStep.java:49) 
    at com.glide.xpath.GlideXPath.selectNextNode(GlideXPath.java:118) 
    at com.glide.util.XMLStreamDocument.selectNextNode(XMLStreamDocument.java:284) 
    at com.glide.db.impex.XMLLoader.next(XMLLoader.java:175) 
    at com.glide.db.impex.XMLLoader.getColumnAttributes(XMLLoader.java:291) 
    at com.glide.db.impex.AbstractLoader.createTableFromImportData(AbstractLoader.java:375)

  

Cause
The problem seems to be triggered when both element and its attribute are named similar. In other words, whenever a table and its field has the same name, this issue happens when import is performed through the xml datasource from one instance to another.
For example, https://xxxx.service-now.com/u_sar_item.do?XML
<xml> 
<u_sar_item> -----------------------------------------------------------------------------> Element name 
<sys_created_by>NORMOYS</sys_created_by> 
<sys_created_on>2015-05-07 15:31:54</sys_created_on> 
<sys_id>0f5844cf9973310001ccc5dc7b0dd344</sys_id> 
<sys_mod_count>0</sys_mod_count> 
<sys_updated_by>NORMOYS</sys_updated_by> 
<sys_updated_on>2015-05-07 15:31:54</sys_updated_on> 
<u_association/> 
<u_item_display>Business Central OLB</u_item_display> 
<u_sar_item>ce88fdfaa467b5009a24c1eea0d7430c</u_sar_item> ------>Attribute with the same name as element. 
<u_task_approvers/> 
<u_task_instructions/> 
</u_sar_item> 

 u_sar_item is the table name, and it also has a field named u_sar_item.


Resolution
Rename either the element/table or the attribute/field so that the names do not match.

Article Information

Last Updated:2015-06-15 15:06:45
Published:2015-06-15