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

NPE after set function category during creating UDF

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 11.1.3
    • Fix Version/s: 11.1.3
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      1. Open clear workspace
      2. Import project from the attachment
      3. Create empty view model (New -> Teiid Metadata Model)
      4. Right-click on the view model and choose New Child -> Procedure
      5. Select User Defined Function
      6. Set the following values:
      • Name: ConcatNull
      • Function Category: TEST_FUNCTIONS
      • Java Class: userdefinedfunctions.ConcatNull
      • Java Method: concatNull
      Show
      Open clear workspace Import project from the attachment Create empty view model (New -> Teiid Metadata Model) Right-click on the view model and choose New Child -> Procedure Select User Defined Function Set the following values: Name: ConcatNull Function Category: TEST_FUNCTIONS Java Class: userdefinedfunctions.ConcatNull Java Method: concatNull

      Description

      In the "Create User Defined Function" wizard I fill in name of the Function Category but the wizard still shows error: "User defined function category is undefined" (wizard.png) and during typing the name of the function category, the Unhandled event loop exceptions (NPE) are throwing in the error log. Stack trace:

      java.lang.NullPointerException
      	at java.util.Hashtable.put(Hashtable.java:460)
      	at org.teiid.designer.relational.model.RelationalProcedure.handleInfoChanged(RelationalProcedure.java:578)
      	at org.teiid.designer.relational.model.RelationalProcedure.setFunctionCategory(RelationalProcedure.java:355)
      	at org.teiid.designer.transformation.ui.editors.ViewProcedureEditorPanel$16.modifyText(ViewProcedureEditorPanel.java:680)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:180)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5348)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4602)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4183)
      	at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
      	at org.eclipse.jface.window.Window.open(Window.java:794)
      	at org.teiid.designer.transformation.ui.actions.CreateViewProcedureAction.run(CreateViewProcedureAction.java:190)
      	at org.teiid.designer.transformation.ui.actions.CreateViewProcedureAction.run(CreateViewProcedureAction.java:174)
      	at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
      	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
      	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5348)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4602)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4183)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
      	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
      	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
      	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
      	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:388)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
      	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:653)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
      	at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
      

      When I want to continue and I select JAR file from the system, the wizard doesn't fill in the UDF Jar Path. (Maybe this behavior is caused by NPE before) However, TD imports JAR to the workspace so I must set JAR again from the workspace. After that, the error from the top of the wizard is disappeared and I am able to finish the wizard. After that, empty error windows appears.
      I have uploaded the video with this behavior to the attachment too.

        Attachments

        1. NPE_UDF.mkv
          5.87 MB
        2. wizard.png
          wizard.png
          209 kB

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            mkralik Matej Kralik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: