]
Barry LaFond commented on TEIIDDES-2517:
----------------------------------------
master:
Saving View Model with syntax error in Transformation breaks it
completely
--------------------------------------------------------------------------
Key: TEIIDDES-2517
URL:
https://issues.jboss.org/browse/TEIIDDES-2517
Project: Teiid Designer
Issue Type: Bug
Components: Modeling, Transformations
Affects Versions: 9.0.2
Reporter: Andrej Šmigala
Assignee: Mark Drilling
Fix For: 9.0.4, 9.2
Saving a view model when there is a syntax error in the transformation can sometimes make
it completely broken.
Going through the steps to reproduce, it appears after the first save, the invalid
transformation is not saved to the file, but after saving for the second time, it is.
Designer should ideally prevent invalid SQL to be saved to the model.
Workaround is to open the model in XML editor and fix the transformation manually.
The following exception is logged:
{noformat}
org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException:
Failed to execute runnable (org.eclipse.swt.SWTException: Failed to execute runnable
(org.eclipse.swt.SWTException: Failed to execute runnable
(org.teiid.query.parser.v8.TokenMgrError: Lexical error at line 2, column 27.
Encountered: "\\" (92), after : ""))))
at org.eclipse.swt.SWT.error(SWT.java:4441)
at org.eclipse.swt.SWT.error(SWT.java:4356)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:139)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.executeRunnable(UiBusyIndicator.java:227)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhileInternal(UiBusyIndicator.java:159)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhile(UiBusyIndicator.java:116)
at
org.teiid.designer.diagram.ui.editor.DiagramSelectionHandler.handleDoubleClick(DiagramSelectionHandler.java:272)
at
org.teiid.designer.diagram.ui.notation.uml.part.UmlClassifierEditPart.performRequest(UmlClassifierEditPart.java:453)
at
org.teiid.designer.diagram.ui.util.SelectionTracker.handleDoubleClick(SelectionTracker.java:74)
at org.eclipse.gef.tools.AbstractTool.mouseDoubleClick(AbstractTool.java:1069)
at org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:527)
at org.eclipse.gef.EditDomain.mouseDoubleClick(EditDomain.java:231)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseDoubleClicked(DomainEventDispatcher.java:291)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDoubleClick(LightweightSystem.java:518)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:196)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
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:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: org.eclipse.swt.SWTException: Failed to execute runnable
(org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException:
Failed to execute runnable (org.teiid.query.parser.v8.TokenMgrError: Lexical error at line
2, column 27. Encountered: "\\" (92), after : "")))
at org.eclipse.swt.SWT.error(SWT.java:4441)
at org.eclipse.swt.SWT.error(SWT.java:4356)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:139)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.executeRunnable(UiBusyIndicator.java:227)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhileInternal(UiBusyIndicator.java:159)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhile(UiBusyIndicator.java:116)
at org.teiid.designer.ui.editors.ModelEditorManager.edit(ModelEditorManager.java:505)
at org.teiid.designer.ui.editors.ModelEditorManager.edit(ModelEditorManager.java:493)
at
org.teiid.designer.diagram.ui.notation.uml.part.UmlClassifierEditPart.edit(UmlClassifierEditPart.java:274)
at
org.teiid.designer.diagram.ui.editor.DiagramSelectionHandler$1.run(DiagramSelectionHandler.java:275)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator$2$1.run(UiBusyIndicator.java:206)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
... 41 more
Caused by: org.eclipse.swt.SWTException: Failed to execute runnable
(org.eclipse.swt.SWTException: Failed to execute runnable
(org.teiid.query.parser.v8.TokenMgrError: Lexical error at line 2, column 27.
Encountered: "\\" (92), after : ""))
at org.eclipse.swt.SWT.error(SWT.java:4441)
at org.eclipse.swt.SWT.error(SWT.java:4356)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:139)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.executeRunnable(UiBusyIndicator.java:227)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhileInternal(UiBusyIndicator.java:159)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhile(UiBusyIndicator.java:116)
at org.teiid.designer.ui.editors.ModelEditorManager.open(ModelEditorManager.java:344)
at org.teiid.designer.ui.editors.ModelEditorManager$7.run(ModelEditorManager.java:514)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator$2$1.run(UiBusyIndicator.java:206)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
... 53 more
Caused by: org.eclipse.swt.SWTException: Failed to execute runnable
(org.teiid.query.parser.v8.TokenMgrError: Lexical error at line 2, column 27.
Encountered: "\\" (92), after : "")
at org.eclipse.swt.SWT.error(SWT.java:4441)
at org.eclipse.swt.SWT.error(SWT.java:4356)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:139)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.executeRunnable(UiBusyIndicator.java:227)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhileInternal(UiBusyIndicator.java:159)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator.showWhile(UiBusyIndicator.java:116)
at
org.teiid.designer.diagram.ui.editor.DiagramEditor.openContext(DiagramEditor.java:1224)
at org.teiid.designer.ui.editors.ModelEditor.openModelObject(ModelEditor.java:1014)
at org.teiid.designer.ui.editors.ModelEditor.openModelObject(ModelEditor.java:985)
at org.teiid.designer.ui.editors.ModelEditorManager$5.run(ModelEditorManager.java:350)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator$2$1.run(UiBusyIndicator.java:206)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
... 63 more
Caused by: org.teiid.query.parser.v8.TokenMgrError: Lexical error at line 2, column 27.
Encountered: "\\" (92), after : ""
at
org.teiid.query.parser.v8.Teiid8ParserTokenManager.getNextToken(Teiid8ParserTokenManager.java:3314)
at org.teiid.query.parser.v8.Teiid8Parser.jj_ntk(Teiid8Parser.java:18993)
at org.teiid.query.parser.v8.Teiid8Parser.select(Teiid8Parser.java:4749)
at org.teiid.query.parser.v8.Teiid8Parser.query(Teiid8Parser.java:4471)
at org.teiid.query.parser.v8.Teiid8Parser.queryPrimary(Teiid8Parser.java:4382)
at org.teiid.query.parser.v8.Teiid8Parser.queryTerm(Teiid8Parser.java:4307)
at org.teiid.query.parser.v8.Teiid8Parser.queryExpressionBody(Teiid8Parser.java:4220)
at org.teiid.query.parser.v8.Teiid8Parser.queryExpression(Teiid8Parser.java:4143)
at org.teiid.query.parser.v8.Teiid8Parser.userCommand(Teiid8Parser.java:1081)
at org.teiid.query.parser.v8.Teiid8Parser.designerCommand(Teiid8Parser.java:611)
at org.teiid.query.parser.QueryParser.parseCommand(QueryParser.java:207)
at org.teiid.query.parser.QueryParser.parseDesignerCommand(QueryParser.java:196)
at org.teiid.query.parser.QueryParser.parseDesignerCommand(QueryParser.java:1)
at
org.teiid.designer.transformation.validation.TransformationValidator.parseSQL(TransformationValidator.java:398)
at
org.teiid.designer.transformation.validation.TransformationValidator.validateSql(TransformationValidator.java:351)
at
org.teiid.designer.transformation.util.SqlMappingRootCache.createStatus(SqlMappingRootCache.java:752)
at
org.teiid.designer.transformation.util.SqlMappingRootCache.getStatus(SqlMappingRootCache.java:833)
at
org.teiid.designer.transformation.util.SqlMappingRootCache.getStatus(SqlMappingRootCache.java:794)
at
org.teiid.designer.transformation.util.SqlMappingRootCache.getCommand(SqlMappingRootCache.java:675)
at
org.teiid.designer.transformation.util.SqlMappingRootCache.getSelectCommand(SqlMappingRootCache.java:428)
at
org.teiid.designer.transformation.util.TransformationHelper.isUnionCommand(TransformationHelper.java:3188)
at
org.teiid.designer.transformation.ui.model.TransformationNode.isUnion(TransformationNode.java:53)
at
org.teiid.designer.transformation.ui.figure.TransformationDiagramFigureFactory.createFigure(TransformationDiagramFigureFactory.java:111)
at
org.teiid.designer.transformation.ui.part.TransformationEditPart.createFigure(TransformationEditPart.java:70)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.getFigure(AbstractGraphicalEditPart.java:494)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addChildVisual(AbstractGraphicalEditPart.java:208)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:211)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:781)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:726)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:644)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:253)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:223)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:212)
at
org.eclipse.gef.editparts.SimpleRootEditPart.setContents(SimpleRootEditPart.java:105)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:617)
at
org.eclipse.gef.ui.parts.AbstractEditPartViewer.setContents(AbstractEditPartViewer.java:626)
at
org.teiid.designer.diagram.ui.editor.DiagramEditor.setDiagram(DiagramEditor.java:1575)
at org.teiid.designer.diagram.ui.editor.DiagramEditor$5.run(DiagramEditor.java:1227)
at
org.teiid.designer.ui.common.viewsupport.UiBusyIndicator$2$1.run(UiBusyIndicator.java:206)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
... 75 more
{noformat}