Format of Table Column not Changing

I have a table with two columns that are being populated from a SQL query. The first column is an integer and the second is a concatenated string from various columns of joined tables.

The problem is when the fpmi window is opened I receive the following error:

com.inductiveautomation.factorypmi.common.xmlserialization.SerializationException: Error invoking [PMITable]PMITable[Table].setColumnAttributesData(DataSet [2R ⅹ 21C])

I found that if I try to change the number format of the second column from the default #,##0.## to any other number format it will default back to #,##0.##.

In order for the number format to be changed I had to add a column heading in my SQL query. (I added as " " to my select query). Then when I changed the number format of the second column the number format saved. I changed the format of the column to 0 and saved the project and the previous error of serialization exception has gone away.

I am not sure how changing the number format of a column of strings made this error go away.

What version are you running? Can you post the stack trace associated with that error, or if your Gateway has internet access can you hit the “Send to Inductive Automation” button?

com.inductiveautomation.factorypmi.common.xmlserialization.SerializationException: Error invoking [PMITable]PMITable[Table].setColumnAttributesData(DataSet [2R ⅹ 21C]) at com.inductiveautomation.factorypmi.common.xmlserialization.deserialization.handlers.ObjectDeserializationHandler.endSubElement( at com.inductiveautomation.factorypmi.common.xmlserialization.deserialization.handlers.ComponentDeserializationHandler.endSubElement( at com.inductiveautomation.factorypmi.common.xmlserialization.deserialization.XMLDeserializer$Parser.endElement( at Source) at Source) at$ Source) at Source) at Source) at Source) at Source) at Source) at Source) at$JAXPSAXParser.parse(Unknown Source) at com.inductiveautomation.factorypmi.common.xmlserialization.deserialization.XMLDeserializer.deserialize( at com.inductiveautomation.factorypmi.application.model.WindowController.deserializeWindow( at com.inductiveautomation.factorypmi.application.model.WindowController._loadWindow( at com.inductiveautomation.factorypmi.application.model.WindowController.getWindow( at com.inductiveautomation.factorypmi.application.FPMIApp.openWindow( at com.inductiveautomation.factorypmi.application.FPMIApp.openWindow( at com.inductiveautomation.factorypmi.designer.model.ObjectHolder.openWindow( at com.inductiveautomation.factorypmi.designer.navtree.ProjectBrowserPanel.mousePressed( at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at Source) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor567.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.inductiveautomation.factorypmi.common.xmlserialization.deserialization.handlers.ObjectDeserializationHandler.endSubElement( ... 42 more Caused by: java.lang.NullPointerException at com.inductiveautomation.factorypmi.application.components.PMITable.addTableEditors( at com.inductiveautomation.factorypmi.application.components.PMITable.setColumnAttributesData( ... 46 more
FactoryPMI v3.3.0 (build 2430)
Java: Sun Microsystems Inc. 1.6.0_07

Oh and I did click the send to Inductive Automation before I posted the original message.

Ok thanks. I think I see what the problem is, but I’m having trouble reproducing it. You seem to be able to: want to step me through exactly how I could re-create this?

Ok this is what I did to reproduce it.

  1. Create a new window.
  2. Create a table on the window.
  3. Creating a binding to a SQL query on the table that will concatenate a string with a selected value. I used this:
SELECT Brewhopid,'1st -- ' + addition
FROM tblBrewHop
  1. Save your project

you should receive the error posted previously.

Thanks - the cause of this has been fixed, and will be available in 3.3.0. Until then, make sure that all of your columns have actual names (using the AS clause if necessary). That is, they aren’t empty string.