Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-1645

IllegalArgumentException setting SQL text for procedure

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Critical Critical
    • 8.1
    • 8.1
    • Transformations
    • None

      While running our E2EVirtualProceduresTestScript (attached) the Transformation frameowork has issues with null datatype being passed down to the datatype finder.

      This occurs on most of the procedures creation in this test.

      ava.lang.IllegalArgumentException: Expected argument to be non-null but got null
      	at org.teiid.core.util.ArgCheck.isNotNull(ArgCheck.java:303)
      	at org.teiid.core.util.ArgCheck.isNotNull(ArgCheck.java:289)
      	at org.teiid83.type.DataTypeManagerService.getDataTypeClass(DataTypeManagerService.java:68)
      	at org.teiid.designer.transformation.util.TransformationMappingHelper.getDatatype(TransformationMappingHelper.java:1500)
      	at org.teiid.designer.transformation.util.TransformationMappingHelper.setAttributeType(TransformationMappingHelper.java:1443)
      	at org.teiid.designer.transformation.util.TransformationMappingHelper.setGroupAttributeTypes(TransformationMappingHelper.java:1322)
      	at org.teiid.designer.transformation.util.TransformationMappingHelper.reconcileTargetAttributes(TransformationMappingHelper.java:769)
      	at org.teiid.designer.transformation.util.TransformationMappingHelper.reconcileTargetAttributes(TransformationMappingHelper.java:823)
      	at org.teiid.designer.transformation.util.TransformationMappingHelper.reconcileMappingsOnSqlChange(TransformationMappingHelper.java:144)
      	at org.teiid.designer.transformation.ui.editors.TransformationObjectEditorPage.handleSqlEditorCommandEvent(TransformationObjectEditorPage.java:2729)
      	at org.teiid.designer.transformation.ui.editors.TransformationObjectEditorPage.handleSqlEditorEvent(TransformationObjectEditorPage.java:2689)
      	at org.teiid.designer.transformation.ui.editors.TransformationObjectEditorPage.processEvent(TransformationObjectEditorPage.java:2649)
      	at org.teiid.designer.transformation.ui.editors.sqleditor.SqlEditorPanel.notifyEventListeners(SqlEditorPanel.java:702)
      	at org.teiid.designer.transformation.ui.editors.sqleditor.SqlEditorPanel.fireEditorEvent(SqlEditorPanel.java:646)
      	at org.teiid.designer.transformation.ui.editors.sqleditor.SqlEditorPanel$DocumentChangeListener.documentChanged(SqlEditorPanel.java:2215)
      	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2(AbstractDocument.java:769)
      	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:736)
      	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:721)
      	at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:796)
      	at org.eclipse.jface.text.AbstractDocument.set(AbstractDocument.java:1237)
      	at org.eclipse.jface.text.AbstractDocument.set(AbstractDocument.java:1217)
      	at org.teiid.designer.transformation.ui.editors.sqleditor.SqlEditorPanel.refreshWithDisplayComponent(SqlEditorPanel.java:608)
      	at org.teiid.designer.transformation.ui.editors.sqleditor.SqlEditorPanel.setTextInTransaction(SqlEditorPanel.java:476)
      	at org.teiid.designer.transformation.ui.editors.sqleditor.SqlEditorPanel$5.run(SqlEditorPanel.java:517)
      
      
      • Import attached project
      • open the MMSP03_A procedure in PartsVirtual.xmi model
      • Paste the following SQL text in the transformation editor and click Validate
        CREATE VIRTUAL PROCEDURE
        BEGIN
        	DECLARE short VARIABLES.x;
        	LOOP ON (SELECT PartsVirtual.SupplierInfo.QUANTITY FROM PartsVirtual.SupplierInfo ORDER BY quantity) AS quantityCursor
        	BEGIN
        		VARIABLES.x = convert((quantityCursor.QUANTITY - 1), short);
        		IF(VARIABLES.x = 100)
        		BEGIN
        			BREAK;
        		END
        		ELSE
        		BEGIN
        			CONTINUE;
        		END
        	END
        	SELECT PartsVirtual.SupplierInfo.QUANTITY, VARIABLES.x FROM PartsVirtual.SupplierInfo WHERE PartsVirtual.SupplierInfo.QUANTITY >= VARIABLES.x;
        END
        

              parichar@redhat.com Paul Richardson
              blafond Barry LaFond
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: