[IGN-15623]Unable to create new class error

I’m getting this error when I create a template instance. Nothing is special about this template or instance compared to other ones I’ve created so I’m confused


java.lang.ClassCastException: Unable to create new class com.inductiveautomation.ignition.common.model.values.QualityCode. com.inductiveautomation.ignition.common.model.values.QualityCode
at com.inductiveautomation.ignition.common.TypeUtilities$DefaultClassInitializer.createNew(TypeUtilities.java:2217)
at com.inductiveautomation.ignition.common.TypeUtilities.getInitValueForClass(TypeUtilities.java:2157)
at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.setQValue(AbstractPropertyAdapter.java:217)
at com.inductiveautomation.factorypmi.application.binding.SimpleBoundTagAdapter.setQValue(SimpleBoundTagAdapter.java:259)
at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateValue(AbstractPropertyAdapter.java:269)
at com.inductiveautomation.factorypmi.application.binding.SimpleBoundTagAdapter.notifyTagChanged(SimpleBoundTagAdapter.java:518)
at com.inductiveautomation.factorypmi.application.binding.SimpleBoundTagAdapter.tagChanged(SimpleBoundTagAdapter.java:506)
at com.inductiveautomation.ignition.client.tags.impl.ClientTagSubscriptionManager$ListenerDeliveryManager.edtDeliver(ClientTagSubscriptionManager.java:608)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.inductiveautomation.snap.swing.RibsEventQueue.dispatchEvent(RibsEventQueue.java:99)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Ignition v8.1.45 (b2025010709)
Java: Azul Systems, Inc. 17.0.13

That backtrace is entirely within IA code. You should open a support ticket. This looks like a real bug. (Triggered by some odd init value corner case, presumably.)

2 Likes

I found the bug. The quality property for sth was linked to a tag incorrectly

1 Like

Though you worked around it OP, I filed an internal ticket so we'd get this fixed.

I can't tell exactly what you did, but I can reproduce the same stacktrace by just adding an expression binding on the Quality (not the Data Quality) field that returns something that isn't a QualityCode.
Internally, that's triggering a class cast exception (because e.g. the literal value 0 is not a valid QualityCode) but in the process of handling that CCE we're throwing a different class cast exception, which is interrupting the standard error handling flow for the binding.

1 Like