# Error when importing an UDT as a .xml

**URL:** <https://forum.inductiveautomation.com/t/error-when-importing-an-udt-as-a-xml/8097>\
**Category:** Ignition\
**Created:** [March 4, 2014, 12:44am UTC](https://forum.inductiveautomation.com/t/error-when-importing-an-udt-as-a-xml/8097 "2014-03-04T00:44:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bronson.G](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@Bronson.G](https://forum.inductiveautomation.com/u/Bronson.G)\
**Post date:** [March 4, 2014, 12:44am UTC](https://forum.inductiveautomation.com/t/error-when-importing-an-udt-as-a-xml/8097/1 "2014-03-04T00:44:28Z")

</div>

I added alarming properties to some opc tags within my my udt. I backed it up by exporting it as a .xml, when i tried to import the file an error message pops up saying the following:

org.xml.sax.SAXException: Error near line -1, column -1.  
java.lang.NullPointerException  
at com.inductiveautomation.ignition.common.xmlserialization.simple.SimpleXMLReader.endElement(SimpleXMLReader.java:182)  
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)  
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)  
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)  
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)  
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)  
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)  
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)  
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)  
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)  
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)  
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)  
at com.inductiveautomation.ignition.common.xmlserialization.simple.SimpleXMLReader.parseFile(SimpleXMLReader.java:64)  
at com.inductiveautomation.ignition.common.sqltags.importexport.TagXMLImporter.runImport(TagXMLImporter.java:88)  
at com.inductiveautomation.ignition.designer.sqltags.action.ImportTagAction$TagImportTask.run(ImportTagAction.java:112)  
at com.inductiveautomation.ignition.client.util.gui.progress.ClientProgressManager$ClientRunningTask.run(ClientProgressManager.java:544)  
at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:526)  
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)  
at java.util.concurrent.FutureTask.run(Unknown Source)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
at java.lang.Thread.run(Unknown Source)  
Caused by: java.lang.NullPointerException  
at com.inductiveautomation.ignition.common.sqltags.importexport.TagXMLImporter$AlarmDefElement.coerceValueFor(TagXMLImporter.java:214)  
at com.inductiveautomation.ignition.common.sqltags.importexport.TagXMLImporter$PropertyBasedElement.addChild(TagXMLImporter.java:168)  
at com.inductiveautomation.ignition.common.xmlserialization.simple.SimpleXMLReader.endElement(SimpleXMLReader.java:173)  
… 23 more

Ignition v7.6.4 (b2013112117)  
Java: Oracle Corporation 1.7.0\_51

My backed up files without the alarming properties import just fine.

---

<div class="post-metadata">

**Author:** ![anna](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@anna](https://forum.inductiveautomation.com/u/anna)\
**Post date:** [March 5, 2014, 8:28pm UTC](https://forum.inductiveautomation.com/t/error-when-importing-an-udt-as-a-xml/8097/2 "2014-03-05T20:28:19Z")

</div>

Bronson,

I will post what we discussed on the phone here, too, just for the reference.

This happens when the text of an expression binding on an alarm property has been removed but the binding itself has not.

To fix an existing file, open it with a text editor and search for the following:

```auto
bindtype="Expression"><
```

Delete lines containing the matches and save the file. It should now import fine.

To avoid this error in the future, make sure you click on “No binding” instead of just deleting its text.

---

<div class="post-metadata">

**Author:** ![Bronson.G](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@Bronson.G](https://forum.inductiveautomation.com/u/Bronson.G)\
**Post date:** [March 7, 2014, 11:17pm UTC](https://forum.inductiveautomation.com/t/error-when-importing-an-udt-as-a-xml/8097/3 "2014-03-07T23:17:50Z")

</div>

Great solution, thanks Anna.

Bronson

---

<div class="post-metadata">

**Author:** ![Mayon](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Mayon](https://forum.inductiveautomation.com/u/Mayon)\
**Post date:** [April 2, 2014, 12:13pm UTC](https://forum.inductiveautomation.com/t/error-when-importing-an-udt-as-a-xml/8097/4 "2014-04-02T12:13:27Z")

</div>

I ve got the same error. My problem was that I ve putted in to early. I have done a change of all alarms and made this wrong.

`<Alarm name="Alarm">
               <Property name="notes">abc</Property>
               <Property name="priority">3</Property>
               <Property name="displayPath">hello</Property> [u][b]</Alarm>[/b][/u] <Property name="mode">1</Property>
             </Alarm>`

---

<div class="post-metadata">

**Author:** ![Mayon](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Mayon](https://forum.inductiveautomation.com/u/Mayon)\
**Post date:** [April 2, 2014, 12:14pm UTC](https://forum.inductiveautomation.com/t/error-when-importing-an-udt-as-a-xml/8097/5 "2014-04-02T12:14:13Z")

</div>

I ve got the same error. My problem was that I ve putted in to early. I have done a change of all alarms and made this wrong.

`<Alarm name="Alarm">
               <Property name="notes">abc</Property>
               <Property name="priority">3</Property>
               <Property name="displayPath">hello</Property> </Alarm>
               <Property name="mode">1</Property>
</Alarm>`

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [April 2, 2014, 10:49pm UTC](https://forum.inductiveautomation.com/t/error-when-importing-an-udt-as-a-xml/8097/6 "2014-04-02T22:49:44Z")

</div>

For what it’s worth, in 7.6.6 it should now give you the correct line number in the error, so you don’t have to actually read through huge xml files hoping to find the problem… 😐

Regards,
