ClassCastException when working with Secure parameters

Assignee

Martin Zatopek

Reporter

Sprint

Description

A Mac user faces two issues when working with Secure parameters. One of them is ClassCastException thrown when a parameter is converted to a secure one (nondeterministically) and the other is the Designer becoming unresponsive. None of them can be reproduced easily. For the first one, the stacktrace is attached. The second one could be potentially related to the first one.

java.lang.ClassCastException: com.cloveretl.gui.editors.graphparameter.int$B cannot be cast to com.cloveretl.gui.model.primitive.ExString at com.cloveretl.gui.editors.graphparameter.Integer.setValue(Main:213) at org.eclipse.jface.viewers.EditingSupport.saveCellEditorValue(EditingSupport.java:113) at org.eclipse.jface.viewers.ColumnViewerEditor.saveEditorValue(ColumnViewerEditor.java:463) at org.eclipse.jface.viewers.ColumnViewerEditor.applyEditorValue(ColumnViewerEditor.java:319) at org.eclipse.jface.viewers.ColumnViewerEditor$2.applyEditorValue(ColumnViewerEditor.java:158) at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:336) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173) at org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(CellEditor.java:333) at org.eclipse.jface.viewers.CellEditor.focusLost(CellEditor.java:722) at org.eclipse.jface.viewers.TextCellEditor$5.focusLost(TextCellEditor.java:189) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:143) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495) at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:3328) at org.eclipse.swt.widgets.Display.checkFocus(Display.java:667) at org.eclipse.swt.widgets.Shell.makeFirstResponder(Shell.java:1273) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5802) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:227) at org.eclipse.swt.widgets.Widget.textDidEndEditing(Widget.java:1988) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5770) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Widget.callSuperBoolean(Widget.java:298) at org.eclipse.swt.widgets.Widget.makeFirstResponder(Widget.java:1194) at org.eclipse.swt.widgets.Shell.makeFirstResponder(Shell.java:1272) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5802) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:227) at org.eclipse.swt.widgets.Widget.mouseDownSuper(Widget.java:1121) at org.eclipse.swt.widgets.Tree.mouseDownSuper(Tree.java:2066) at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:1113) at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2571) at org.eclipse.swt.widgets.Tree.mouseDown(Tree.java:2034) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5692) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:227) at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2130) at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2337) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5756) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5193) at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5342) at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3695) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
java.lang.ClassCastException: com.cloveretl.gui.editors.graphparameter.int$B cannot be cast to com.cloveretl.gui.model.primitive.ExString at com.cloveretl.gui.editors.graphparameter.Integer.setValue(Main:213) at org.eclipse.jface.viewers.EditingSupport.saveCellEditorValue(EditingSupport.java:113) at org.eclipse.jface.viewers.ColumnViewerEditor.saveEditorValue(ColumnViewerEditor.java:463) at org.eclipse.jface.viewers.ColumnViewerEditor.applyEditorValue(ColumnViewerEditor.java:319) at org.eclipse.jface.viewers.ColumnViewerEditor$2.applyEditorValue(ColumnViewerEditor.java:158) at org.eclipse.jface.viewers.CellEditor$1.run(CellEditor.java:336) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173) at org.eclipse.jface.viewers.CellEditor.fireApplyEditorValue(CellEditor.java:333) at org.eclipse.jface.viewers.CellEditor.focusLost(CellEditor.java:722) at org.eclipse.jface.viewers.TextCellEditor$5.focusLost(TextCellEditor.java:189) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:143) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495) at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:3328) at org.eclipse.swt.widgets.Display.checkFocus(Display.java:667) at org.eclipse.swt.widgets.Display.applicationDidResignActive(Display.java:5040) at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5367) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5193) at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5342) at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3695) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

When I encrypt a parameter, its value in the left pane changes to asterisks immediately. The strange thing is that when the user does the same, the value is in plain text. The value in the right pane is masked in both cases.

The refered ticket contains also videos capturing the issues.

Steps to reproduce

None

Activity

Show:

Milan Krivanek June 1, 2017 at 7:58 AM

Automated test passes.

Milan Krivanek May 30, 2017 at 11:25 AM

4.6.0.083 OK

Jaroslav Urban May 25, 2017 at 8:20 AM

QA: test the ClassCastException, it's NOT specific to Mac

Martin Zatopek May 19, 2017 at 12:30 PM

I was able to reproduce only the ClassCastException in standalone parameters file editor. This is caused by the fact, that the left pane of parameter dialog is not refreshed on model updated made by right pane of the dialog. If the graph parameter dialog is opened from Outline view, the left pane is refreshed just by coincidence, since filter text is cleared on each model update, and each update of filter text refreshed the left pane of the dialog. But the filter text is not part of standalone parameter file editor.

So I just refreshed the left pane of the dialog on each model update.

Unfortunately I didn't run into the 'unresponsiveness' issue at all.

Jan Sedlacek April 24, 2017 at 9:22 AM

Observed same problems - it is necessary to use standalone param file editor (opening param file directly from navigator, not from graph)

Fixed

Details

Priority

Fix versions

Zendesk ticket

Affects versions

Branch

QA Testing

GUI automated test

QA Test Identification

Components

Environment

Mac OS X
Oracle JDK 8

Created April 24, 2017 at 8:04 AM
Updated September 12, 2023 at 9:47 AM
Resolved May 19, 2017 at 12:48 PM