Simulation Aids where and orderBy expressions through IllegalArgumentException

@pturmel

I have the following expression:

unionAll(
	flatten(
		asList(
			asList(asList('Occurrence','str')),
			forEach(
				groupBy({this.custom.rawData},it()['path']),
				forEach(
					it()[1],
					asList(
						left(dateFormat(it()['timestamp'],'_hha'),4),
						"I"
					)
				)
			)[0]
		)
	),
	forEach(
		forEach(
			groupBy({this.custom.rawData},it()['path']),
			it()
		),
		flatten(
			asList(
				asList(
					case(
						split(it()[0],'_',2)[0],
						'productlevel','No Product',
						'cap','No Caps',
						'downstream','Packaging',
						'No Bottles'
					)
				),	
				forEach(it()[1],it()['value'])
			)
		)
	)
)

This seems to produce a valid dataset although in vision if I run this in the designer I do get a ClassCastException: BasicDataset cannot be cast to class java.util.ArrayList.

The topic of this post is however, if I wrap this expression in either a where or an orderBy expression:

orderBy({expression above},descending(it()['Occurrence']))
where({expression above),it()['Occurrence'] = 'No Bottles')

I get an IllegalArgumentException: Wrong number of values for a row. Expected 25.

The same error is present for both Vision and perspective.

What am I doing wrong?

Additional information:

Sample Data

"#NAMES"
"path","value","quality","timestamp"
"#TYPES"
"str","L","I","date"
"#ROWS","120"
"productlevel_at_sp","0","192","2023-07-31 12:00:00.000"
"cap_supply","1","192","2023-07-31 12:00:00.000"
"downstream_stop_request","8","192","2023-07-31 12:00:00.000"
"empty_bottles_present","7","192","2023-07-31 12:00:00.000"
"empty_bottles_primied","5","192","2023-07-31 12:00:00.000"
"productlevel_at_sp","0","192","2023-07-31 13:00:00.000"
"cap_supply","2","192","2023-07-31 13:00:00.000"
"downstream_stop_request","5","192","2023-07-31 13:00:00.000"
"empty_bottles_present","3","192","2023-07-31 13:00:00.000"
"empty_bottles_primied","4","192","2023-07-31 13:00:00.000"
"productlevel_at_sp","5","192","2023-07-31 14:00:00.000"
"cap_supply","0","192","2023-07-31 14:00:00.000"
"downstream_stop_request","0","192","2023-07-31 14:00:00.000"
"empty_bottles_present","0","192","2023-07-31 14:00:00.000"
"empty_bottles_primied","1","192","2023-07-31 14:00:00.000"
"productlevel_at_sp","2","200","2023-07-31 15:00:00.000"
"cap_supply","0","192","2023-07-31 15:00:00.000"
"downstream_stop_request","1","192","2023-07-31 15:00:00.000"
"empty_bottles_present","0","192","2023-07-31 15:00:00.000"
"empty_bottles_primied","0","192","2023-07-31 15:00:00.000"
"productlevel_at_sp","0","200","2023-07-31 16:00:00.000"
"cap_supply","2","192","2023-07-31 16:00:00.000"
"downstream_stop_request","2","192","2023-07-31 16:00:00.000"
"empty_bottles_present","0","192","2023-07-31 16:00:00.000"
"empty_bottles_primied","0","192","2023-07-31 16:00:00.000"
"productlevel_at_sp","0","200","2023-07-31 17:00:00.000"
"cap_supply","3","192","2023-07-31 17:00:00.000"
"downstream_stop_request","13","192","2023-07-31 17:00:00.000"
"empty_bottles_present","0","192","2023-07-31 17:00:00.000"
"empty_bottles_primied","1","192","2023-07-31 17:00:00.000"
"productlevel_at_sp","0","200","2023-07-31 18:00:00.000"
"cap_supply","3","192","2023-07-31 18:00:00.000"
"downstream_stop_request","11","192","2023-07-31 18:00:00.000"
"empty_bottles_present","0","192","2023-07-31 18:00:00.000"
"empty_bottles_primied","0","192","2023-07-31 18:00:00.000"
"productlevel_at_sp","0","200","2023-07-31 19:00:00.000"
"cap_supply","5","192","2023-07-31 19:00:00.000"
"downstream_stop_request","7","192","2023-07-31 19:00:00.000"
"empty_bottles_present","4","192","2023-07-31 19:00:00.000"
"empty_bottles_primied","6","192","2023-07-31 19:00:00.000"
"productlevel_at_sp","0","200","2023-07-31 20:00:00.000"
"cap_supply","5","192","2023-07-31 20:00:00.000"
"downstream_stop_request","1","192","2023-07-31 20:00:00.000"
"empty_bottles_present","5","192","2023-07-31 20:00:00.000"
"empty_bottles_primied","4","192","2023-07-31 20:00:00.000"
"productlevel_at_sp","0","200","2023-07-31 21:00:00.000"
"cap_supply","2","192","2023-07-31 21:00:00.000"
"downstream_stop_request","0","192","2023-07-31 21:00:00.000"
"empty_bottles_present","0","192","2023-07-31 21:00:00.000"
"empty_bottles_primied","3","192","2023-07-31 21:00:00.000"
"productlevel_at_sp","0","200","2023-07-31 22:00:00.000"
"cap_supply","2","192","2023-07-31 22:00:00.000"
"downstream_stop_request","1","192","2023-07-31 22:00:00.000"
"empty_bottles_present","1","192","2023-07-31 22:00:00.000"
"empty_bottles_primied","2","192","2023-07-31 22:00:00.000"
"productlevel_at_sp","0","200","2023-07-31 23:00:00.000"
"cap_supply","4","192","2023-07-31 23:00:00.000"
"downstream_stop_request","5","192","2023-07-31 23:00:00.000"
"empty_bottles_present","2","192","2023-07-31 23:00:00.000"
"empty_bottles_primied","3","192","2023-07-31 23:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 00:00:00.000"
"cap_supply","5","192","2023-08-01 00:00:00.000"
"downstream_stop_request","5","192","2023-08-01 00:00:00.000"
"empty_bottles_present","0","192","2023-08-01 00:00:00.000"
"empty_bottles_primied","3","192","2023-08-01 00:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 01:00:00.000"
"cap_supply","6","192","2023-08-01 01:00:00.000"
"downstream_stop_request","2","192","2023-08-01 01:00:00.000"
"empty_bottles_present","0","192","2023-08-01 01:00:00.000"
"empty_bottles_primied","2","192","2023-08-01 01:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 02:00:00.000"
"cap_supply","8","192","2023-08-01 02:00:00.000"
"downstream_stop_request","1","192","2023-08-01 02:00:00.000"
"empty_bottles_present","2","192","2023-08-01 02:00:00.000"
"empty_bottles_primied","3","192","2023-08-01 02:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 03:00:00.000"
"cap_supply","10","192","2023-08-01 03:00:00.000"
"downstream_stop_request","6","192","2023-08-01 03:00:00.000"
"empty_bottles_present","1","192","2023-08-01 03:00:00.000"
"empty_bottles_primied","3","192","2023-08-01 03:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 04:00:00.000"
"cap_supply","7","192","2023-08-01 04:00:00.000"
"downstream_stop_request","1","192","2023-08-01 04:00:00.000"
"empty_bottles_present","1","192","2023-08-01 04:00:00.000"
"empty_bottles_primied","3","192","2023-08-01 04:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 05:00:00.000"
"cap_supply","4","192","2023-08-01 05:00:00.000"
"downstream_stop_request","3","192","2023-08-01 05:00:00.000"
"empty_bottles_present","1","192","2023-08-01 05:00:00.000"
"empty_bottles_primied","3","192","2023-08-01 05:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 06:00:00.000"
"cap_supply","3","192","2023-08-01 06:00:00.000"
"downstream_stop_request","2","192","2023-08-01 06:00:00.000"
"empty_bottles_present","3","192","2023-08-01 06:00:00.000"
"empty_bottles_primied","6","192","2023-08-01 06:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 07:00:00.000"
"cap_supply","4","192","2023-08-01 07:00:00.000"
"downstream_stop_request","1","192","2023-08-01 07:00:00.000"
"empty_bottles_present","1","192","2023-08-01 07:00:00.000"
"empty_bottles_primied","1","192","2023-08-01 07:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 08:00:00.000"
"cap_supply","13","192","2023-08-01 08:00:00.000"
"downstream_stop_request","1","192","2023-08-01 08:00:00.000"
"empty_bottles_present","1","192","2023-08-01 08:00:00.000"
"empty_bottles_primied","1","192","2023-08-01 08:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 09:00:00.000"
"cap_supply","11","192","2023-08-01 09:00:00.000"
"downstream_stop_request","0","192","2023-08-01 09:00:00.000"
"empty_bottles_present","0","192","2023-08-01 09:00:00.000"
"empty_bottles_primied","2","192","2023-08-01 09:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 10:00:00.000"
"cap_supply","8","200","2023-08-01 10:00:00.000"
"downstream_stop_request","1","200","2023-08-01 10:00:00.000"
"empty_bottles_present","1","200","2023-08-01 10:00:00.000"
"empty_bottles_primied","6","200","2023-08-01 10:00:00.000"
"productlevel_at_sp","0","200","2023-08-01 11:00:00.000"
"cap_supply","0","200","2023-08-01 11:00:00.000"
"downstream_stop_request","0","200","2023-08-01 11:00:00.000"
"empty_bottles_present","0","200","2023-08-01 11:00:00.000"
"empty_bottles_primied","0","200","2023-08-01 11:00:00.000"

consoleOutput_from_traceMe.txt (78.0 KB)

Will have to study later (can't wait for me to implement pivot(), hmm?).

2 Likes

pivot() will be well worth the wait!

Doing my best to eliminate unnecessary script calls.

Straight-up bug, looks like. If you take the inner expression's resulting dataset as a constant to feed them, they break the same way. Will fix.

And fixed. For Ignition v8.1+ as usual: v2.0.8.232162051

1 Like

I'm back.

Here is a clip of what I am seeing, this is also somewhat present in the client, but to a lesser extent.

designer

Error Stack Traces
NPE on Power Table.data
java.lang.Exception: Error executing expression binding on
Stop Occurances_New.Root Container.Group 1.Power Table 1.data
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:92)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter$1.run(ExpressionPropertyAdapter.java:59)
	at com.inductiveautomation.ignition.client.util.EDTUtil$ProcessQueue.run(EDTUtil.java:126)
	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(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	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)
Caused by: java.lang.RuntimeException: Unable to handle rowSource #2
	at com.automation_pros.simaids.expressions.UnionAll.execute(UnionAll.java:111)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.DefaultFunctionFactory$ColumnRearrangeFunction.execute(DefaultFunctionFactory.java:1837)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
	at com.automation_pros.simaids.expressions.SimpleIterator.execute(SimpleIterator.java:177)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:83)
	... 15 more
Caused by: java.lang.NullPointerException
	at com.automation_pros.simaids.expressions.UnionAll.buildWith(UnionAll.java:188)
	at com.automation_pros.simaids.expressions.UnionAll.execute(UnionAll.java:107)
	... 26 more

Ignition v8.1.24 (b2023011208)
Java: Azul Systems, Inc. 11.0.16.1

ClassCastException on summedData binding
java.lang.Exception: Error executing expression binding on
Stop Occurances_New.Root Container.Group 1.Power Table 1.summedData
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:92)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter$1.run(ExpressionPropertyAdapter.java:59)
	at com.inductiveautomation.ignition.client.util.EDTUtil$ProcessQueue.run(EDTUtil.java:126)
	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(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	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)
Caused by: java.lang.ClassCastException

Ignition v8.1.24 (b2023011208)
Java: Azul Systems, Inc. 11.0.16.1

ClassCastException on pivotedData

java.lang.Exception: Error executing expression binding on
Stop Occurances_New.Root Container.Group 1.Power Table 1.pivotedData
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:92)
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter$1.run(ExpressionPropertyAdapter.java:59)
at com.inductiveautomation.ignition.client.util.EDTUtil$ProcessQueue.run(EDTUtil.java:126)
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(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
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)
Caused by: java.lang.ClassCastException

Ignition v8.1.24 (b2023011208)
Java: Azul Systems, Inc. 11.0.16.1

NPE on Power Table 2.data
java.lang.Exception: Error executing expression binding on
Stop Occurances_New.Root Container.Power Table 2.data
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:92)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter$1.run(ExpressionPropertyAdapter.java:59)
	at com.inductiveautomation.ignition.client.util.EDTUtil$ProcessQueue.run(EDTUtil.java:126)
	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(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	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)
Caused by: java.lang.NullPointerException
	at com.automation_pros.simaids.expressions.Flatten.execute(Flatten.java:55)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
	at com.automation_pros.simaids.expressions.AsMap.execute(AsMap.java:41)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
	at com.automation_pros.simaids.expressions.UnionAll.execute(UnionAll.java:52)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.DefaultFunctionFactory$ColumnRearrangeFunction.execute(DefaultFunctionFactory.java:1837)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:83)
	... 15 more

Ignition v8.1.24 (b2023011208)
Java: Azul Systems, Inc. 11.0.16.1

Summary
java.lang.Exception: Error executing expression binding on
Stop Occurances_New.Root Container.Power Table 2.effByHour
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:92)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter$1.run(ExpressionPropertyAdapter.java:59)
	at com.inductiveautomation.ignition.client.util.EDTUtil$ProcessQueue.run(EDTUtil.java:126)
	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(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	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)
Caused by: java.lang.ClassCastException

Ignition v8.1.24 (b2023011208)
Java: Azul Systems, Inc. 11.0.16.1

These errors also happen if I add/remove a custom property to/from one of the tables. Sometimes it seems to matter which order I refresh the bindings in. For instance if I refresh summed data prior to pivoted data, it will continue to show <No Data> until I have refreshed the pivoted data.

Sample Data
"#NAMES"
"path","value","quality","timestamp"
"#TYPES"
"str","L","I","date"
"#ROWS","120"
"Labeler","77","192","2023-08-10 13:00:00.000"
"Laber","0","192","2023-08-10 13:00:00.000"
"Caser","173","192","2023-08-10 13:00:00.000"
"Stacker","0","192","2023-08-10 13:00:00.000"
"Dynac","35","192","2023-08-10 13:00:00.000"
"Labeler","0","192","2023-08-10 14:00:00.000"
"Laber","107","192","2023-08-10 14:00:00.000"
"Caser","155","192","2023-08-10 14:00:00.000"
"Stacker","77","192","2023-08-10 14:00:00.000"
"Dynac","0","192","2023-08-10 14:00:00.000"
"Labeler","226","192","2023-08-10 15:00:00.000"
"Laber","0","192","2023-08-10 15:00:00.000"
"Caser","205","192","2023-08-10 15:00:00.000"
"Stacker","131","192","2023-08-10 15:00:00.000"
"Dynac","0","192","2023-08-10 15:00:00.000"
"Labeler","0","192","2023-08-10 16:00:00.000"
"Laber","0","192","2023-08-10 16:00:00.000"
"Caser","72","192","2023-08-10 16:00:00.000"
"Stacker","0","192","2023-08-10 16:00:00.000"
"Dynac","18","192","2023-08-10 16:00:00.000"
"Labeler","0","192","2023-08-10 17:00:00.000"
"Laber","0","192","2023-08-10 17:00:00.000"
"Caser","877","192","2023-08-10 17:00:00.000"
"Stacker","134","192","2023-08-10 17:00:00.000"
"Dynac","14","192","2023-08-10 17:00:00.000"
"Labeler","0","192","2023-08-10 18:00:00.000"
"Laber","0","192","2023-08-10 18:00:00.000"
"Caser","0","192","2023-08-10 18:00:00.000"
"Stacker","35","192","2023-08-10 18:00:00.000"
"Dynac","0","192","2023-08-10 18:00:00.000"
"Labeler","3","192","2023-08-10 19:00:00.000"
"Laber","29","192","2023-08-10 19:00:00.000"
"Caser","312","192","2023-08-10 19:00:00.000"
"Stacker","0","192","2023-08-10 19:00:00.000"
"Dynac","14","192","2023-08-10 19:00:00.000"
"Labeler","0","192","2023-08-10 20:00:00.000"
"Laber","35","192","2023-08-10 20:00:00.000"
"Caser","121","192","2023-08-10 20:00:00.000"
"Stacker","0","192","2023-08-10 20:00:00.000"
"Dynac","0","192","2023-08-10 20:00:00.000"
"Labeler","0","192","2023-08-10 21:00:00.000"
"Laber","178","192","2023-08-10 21:00:00.000"
"Caser","47","192","2023-08-10 21:00:00.000"
"Stacker","0","192","2023-08-10 21:00:00.000"
"Dynac","0","192","2023-08-10 21:00:00.000"
"Labeler","0","192","2023-08-10 22:00:00.000"
"Laber","0","192","2023-08-10 22:00:00.000"
"Caser","116","192","2023-08-10 22:00:00.000"
"Stacker","0","192","2023-08-10 22:00:00.000"
"Dynac","0","192","2023-08-10 22:00:00.000"
"Labeler","68","192","2023-08-10 23:00:00.000"
"Laber","0","192","2023-08-10 23:00:00.000"
"Caser","17","192","2023-08-10 23:00:00.000"
"Stacker","0","192","2023-08-10 23:00:00.000"
"Dynac","0","192","2023-08-10 23:00:00.000"
"Labeler","0","192","2023-08-11 00:00:00.000"
"Laber","0","192","2023-08-11 00:00:00.000"
"Caser","29","192","2023-08-11 00:00:00.000"
"Stacker","0","192","2023-08-11 00:00:00.000"
"Dynac","25","192","2023-08-11 00:00:00.000"
"Labeler","0","192","2023-08-11 01:00:00.000"
"Laber","36","192","2023-08-11 01:00:00.000"
"Caser","106","192","2023-08-11 01:00:00.000"
"Stacker","0","192","2023-08-11 01:00:00.000"
"Dynac","0","192","2023-08-11 01:00:00.000"
"Labeler","0","192","2023-08-11 02:00:00.000"
"Laber","0","192","2023-08-11 02:00:00.000"
"Caser","24","192","2023-08-11 02:00:00.000"
"Stacker","0","192","2023-08-11 02:00:00.000"
"Dynac","18","192","2023-08-11 02:00:00.000"
"Labeler","113","192","2023-08-11 03:00:00.000"
"Laber","0","192","2023-08-11 03:00:00.000"
"Caser","131","192","2023-08-11 03:00:00.000"
"Stacker","0","192","2023-08-11 03:00:00.000"
"Dynac","67","192","2023-08-11 03:00:00.000"
"Labeler","0","192","2023-08-11 04:00:00.000"
"Laber","0","192","2023-08-11 04:00:00.000"
"Caser","137","192","2023-08-11 04:00:00.000"
"Stacker","0","192","2023-08-11 04:00:00.000"
"Dynac","0","192","2023-08-11 04:00:00.000"
"Labeler","102","192","2023-08-11 05:00:00.000"
"Laber","90","192","2023-08-11 05:00:00.000"
"Caser","38","192","2023-08-11 05:00:00.000"
"Stacker","0","192","2023-08-11 05:00:00.000"
"Dynac","34","192","2023-08-11 05:00:00.000"
"Labeler","25","192","2023-08-11 06:00:00.000"
"Laber","0","192","2023-08-11 06:00:00.000"
"Caser","588","192","2023-08-11 06:00:00.000"
"Stacker","0","192","2023-08-11 06:00:00.000"
"Dynac","0","192","2023-08-11 06:00:00.000"
"Labeler","0","192","2023-08-11 07:00:00.000"
"Laber","0","192","2023-08-11 07:00:00.000"
"Caser","157","192","2023-08-11 07:00:00.000"
"Stacker","0","192","2023-08-11 07:00:00.000"
"Dynac","0","192","2023-08-11 07:00:00.000"
"Labeler","317","192","2023-08-11 08:00:00.000"
"Laber","50","192","2023-08-11 08:00:00.000"
"Caser","793","192","2023-08-11 08:00:00.000"
"Stacker","0","192","2023-08-11 08:00:00.000"
"Dynac","0","192","2023-08-11 08:00:00.000"
"Labeler","111","192","2023-08-11 09:00:00.000"
"Laber","0","192","2023-08-11 09:00:00.000"
"Caser","811","192","2023-08-11 09:00:00.000"
"Stacker","18","200","2023-08-11 09:00:00.000"
"Dynac","0","192","2023-08-11 09:00:00.000"
"Labeler","174","192","2023-08-11 10:00:00.000"
"Laber","229","192","2023-08-11 10:00:00.000"
"Caser","549","192","2023-08-11 10:00:00.000"
"Stacker","0","200","2023-08-11 10:00:00.000"
"Dynac","0","192","2023-08-11 10:00:00.000"
"Labeler","162","200","2023-08-11 11:00:00.000"
"Laber","231","200","2023-08-11 11:00:00.000"
"Caser","534","192","2023-08-11 11:00:00.000"
"Stacker","0","200","2023-08-11 11:00:00.000"
"Dynac","0","200","2023-08-11 11:00:00.000"
"Labeler","0","200","2023-08-11 12:00:00.000"
"Laber","0","200","2023-08-11 12:00:00.000"
"Caser","0","192","2023-08-11 12:00:00.000"
"Stacker","0","200","2023-08-11 12:00:00.000"
"Dynac","0","200","2023-08-11 12:00:00.000"
Pivoted Data Expression
columnRearrange(
	unionAll(
		flatten(
			asList(
				asList(asList('Occurrence','str')),
				forEach(
					groupBy({Root Container.Group 1.Power Table 1.historicalData},it()['path']),
					forEach(
						it()[1],
						asList(
							left(dateFormat(it()['timestamp'],'_ha'),if(len(dateFormat(it()['timestamp'],'_ha')) = 4,3,4)),
							"F"
						)
					)
				)[0]
			)
		),
		forEach(
			forEach(
				groupBy(
					{Root Container.Group 1.Power Table 1.historicalData},
					it()['path']
				),
				it()
			),
			flatten(
				asList(
					asList(it()[0]),
					forEach(it()[1],round(it()['value'] / 60.0,1))
				)
			)
		)
	),
	'Occurrence',
	'_7A',
	'_8A',
	'_9A',
	'_10A',
	'_11A',
	'_12P',
	'_1P',
	'_2P',
	'_3P',
	'_4P',
	'_5P',
	'_6P',
	'_7P',
	'_8P',
	'_9P',
	'_10P',
	'_11P',
	'_12A',
	'_1A',
	'_2A',
	'_3A',
	'_4A',
	'_5A',
	'_6A'
)
Summed Data Expression
selectStar(
	{Root Container.Group 1.Power Table 1.pivotedData},
	asMap(	
		forEach(
			groupBy(
				{Root Container.Group 1.Power Table 1.last8HistoricalData},
				it()['path']
			),
			asList(
				it()[0],
				round(sum(it()[1],'value')/60.0,1)
			)
		)
	)[it()['Occurrence']],
	'Last 8',
	'F',
	asMap(
		forEach(
			groupBy(
				{Root Container.Group 1.Power Table 1.historicalData},
				it()['path']
			),
			asList(
				it()[0],
				round(sum(it()[1],'value') / 60.0,1)
			)
		)
	)[it()['Occurrence']],
	'Last 24',
	'F'
)

So, null pointer exceptions are always a bug. This update prevents those two, and provide more helpful information where available:

For Ignition v8.1+: v2.0.9.232231702

For the class cast exceptions, you will need to configure your designer launcher to include this extra JVM option:

-XX:-OmitStackTraceInFastThrow

That will cause a more complete stack track to be reported.

1 Like

Updated to 2.0.9, included JVM option.

NPE

java.lang.Exception: Error executing expression binding on
Stop Occurances_New.Root Container.Group.Power Table.data
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:92)
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.startup(ExpressionPropertyAdapter.java:113)
at com.inductiveautomation.factorypmi.application.binding.DefaultInteractionController.startupBindings(DefaultInteractionController.java:355)
at com.inductiveautomation.factorypmi.application.binding.DefaultInteractionController.startupAdapters(DefaultInteractionController.java:360)
at com.inductiveautomation.factorypmi.application.FPMIWindow.startup(FPMIWindow.java:346)
at com.inductiveautomation.factorypmi.designer.workspace.WindowWorkspace$DesigntimeWindowOpener.openWindow(WindowWorkspace.java:3791)
at com.inductiveautomation.factorypmi.designer.workspace.WindowWorkspace.openWindow(WindowWorkspace.java:1520)
at com.inductiveautomation.factorypmi.designer.workspace.WindowWorkspace$4.lambda$createPanels$2(WindowWorkspace.java:628)
at com.inductiveautomation.ignition.designer.workspacewelcome.RecentlyModifiedTilePanel$Tile.lambda$new$1(RecentlyModifiedTilePanel.java:206)
at com.inductiveautomation.ignition.client.util.gui.Listen$1.mousePressed(Listen.java:52)
at java.desktop/java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.desktop/java.awt.Component.processEvent(Unknown Source)
at java.desktop/java.awt.Container.processEvent(Unknown Source)
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at com.jidesoft.docking.DockingUtils.a(Unknown Source)
at com.jidesoft.docking.DefaultDockingManager.handleEvent(Unknown Source)
at com.jidesoft.docking.DefaultDockingManager$a3.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.desktop/java.awt.Toolkit.notifyAWTEventListeners(Unknown Source)
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(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(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
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)
Caused by: java.lang.NullPointerException
at com.automation_pros.simaids.expressions.ColumnsOf.execute(ColumnsOf.java:30)
at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
at com.automation_pros.simaids.expressions.UnionAll.execute(UnionAll.java:52)
at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
at com.inductiveautomation.ignition.common.expressions.DefaultFunctionFactory$ColumnRearrangeFunction.execute(DefaultFunctionFactory.java:1837)
at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:83)
... 70 more

Ignition v8.1.24 (b2023011208)
Java: Azul Systems, Inc. 11.0.16.1

Class Cast Exception on summedData
java.lang.Exception: Error executing expression binding on
Stop Occurances_New.Root Container.Group 1.Power Table 1.summedData
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:92)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter$1.run(ExpressionPropertyAdapter.java:59)
	at com.inductiveautomation.ignition.client.util.EDTUtil$ProcessQueue.run(EDTUtil.java:126)
	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(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	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)
Caused by: java.lang.ClassCastException: class com.inductiveautomation.ignition.common.BasicDataset cannot be cast to class java.util.ArrayList (com.inductiveautomation.ignition.common.BasicDataset is in unnamed module of loader java.net.URLClassLoader @1529fea1; java.util.ArrayList is in module java.base of loader 'bootstrap')
	at com.automation_pros.simaids.expressions.GroupBy.accumulateOutput(GroupBy.java:106)
	at com.automation_pros.simaids.expressions.SimpleIterator.execute(SimpleIterator.java:212)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
	at com.automation_pros.simaids.expressions.SimpleIterator.execute(SimpleIterator.java:177)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
	at com.automation_pros.simaids.expressions.AsMap.execute(AsMap.java:41)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.automation_pros.simaids.expressions.IterationHelper.condSubstExpression(IterationHelper.java:249)
	at com.automation_pros.simaids.expressions.IterationHelper.preExecuteAll(IterationHelper.java:165)
	at com.automation_pros.simaids.expressions.IterationHelper.condSubstExpression(IterationHelper.java:205)
	at com.automation_pros.simaids.expressions.IterationHelper.preExecuteAll(IterationHelper.java:165)
	at com.automation_pros.simaids.expressions.SimpleIterator.execute(SimpleIterator.java:206)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:83)
	... 15 more

Ignition v8.1.24 (b2023011208)
Java: Azul Systems, Inc. 11.0.16.1

Class Cast Exception on effByHour
java.lang.Exception: Error executing expression binding on
Stop Occurances_New.Root Container.Power Table 2.effByHour
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:92)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter$1.run(ExpressionPropertyAdapter.java:59)
	at com.inductiveautomation.ignition.client.util.EDTUtil$ProcessQueue.run(EDTUtil.java:126)
	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(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	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)
Caused by: java.lang.ClassCastException: class com.inductiveautomation.ignition.common.BasicDataset cannot be cast to class java.util.ArrayList (com.inductiveautomation.ignition.common.BasicDataset is in unnamed module of loader java.net.URLClassLoader @1529fea1; java.util.ArrayList is in module java.base of loader 'bootstrap')
	at com.automation_pros.simaids.expressions.GroupBy.accumulateOutput(GroupBy.java:106)
	at com.automation_pros.simaids.expressions.InnerJoin.execute(InnerJoin.java:140)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
	at com.automation_pros.simaids.expressions.SimpleIterator.execute(SimpleIterator.java:177)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
	at com.automation_pros.simaids.expressions.UnionAll.execute(UnionAll.java:52)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:83)
	... 15 more

Ignition v8.1.24 (b2023011208)
Java: Azul Systems, Inc. 11.0.16.1

Class Cast Exception on pivotedData
java.lang.Exception: Error executing expression binding on
Stop Occurances_New.Root Container.Group.Power Table.pivotedData
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:92)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter$1.run(ExpressionPropertyAdapter.java:59)
	at com.inductiveautomation.ignition.client.util.EDTUtil$ProcessQueue.run(EDTUtil.java:126)
	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(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	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)
Caused by: java.lang.ClassCastException: class com.inductiveautomation.ignition.common.BasicDataset cannot be cast to class java.util.ArrayList (com.inductiveautomation.ignition.common.BasicDataset is in unnamed module of loader java.net.URLClassLoader @1529fea1; java.util.ArrayList is in module java.base of loader 'bootstrap')
	at com.automation_pros.simaids.expressions.GroupBy.accumulateOutput(GroupBy.java:106)
	at com.automation_pros.simaids.expressions.SimpleIterator.execute(SimpleIterator.java:212)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
	at com.automation_pros.simaids.expressions.SimpleIterator.execute(SimpleIterator.java:177)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.SubscriptExpression.execute(SubscriptExpression.java:50)
	at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
	at com.automation_pros.simaids.expressions.AsList.execute(AsList.java:39)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
	at com.automation_pros.simaids.expressions.Flatten.execute(Flatten.java:37)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.functions.BaseFunction.executeAll(BaseFunction.java:64)
	at com.automation_pros.simaids.expressions.UnionAll.execute(UnionAll.java:52)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.client.expressions.ClientDynamicDispatchFunction.execute(ClientDynamicDispatchFunction.java:43)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.ignition.common.expressions.DefaultFunctionFactory$ColumnRearrangeFunction.execute(DefaultFunctionFactory.java:1837)
	at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
	at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:83)
	... 15 more

Ignition v8.1.24 (b2023011208)
Java: Azul Systems, Inc. 11.0.16.1

Thanks for the detailed report. Found and fixed a stale data bug in groupBy(). Also fixed the NPE in columnsOf(). (The null source was the failures in groupBy, as far as I can tell.)

1 Like