Error when importing an UDT as a .xml

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.

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:

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.

Great solution, thanks Anna.

Bronson

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>

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>

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… :neutral_face:

Regards,