Pentaho Data Integration - Kettle
  1. Pentaho Data Integration - Kettle
  2. PDI-8786

User Defined Java Class Step : "Unable to open dialog for this step"

    Details

    • Story Points:
      5
    • PDI Sub-component:
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Sprint Team:
      Pervach
    • Operating System/s:
      Mac OSX Lion
    • QA Validation Status:
      Validated by QA
    • SpiraTest:
    • Sprint:
      Sprint TBD, Sprint TBD, Sprint Moonshine

      Description

      when I make a mistake in the User Defined java class, such as a syntax error in the java (but I'm not entirely sure what causes this) I get on closing the message "Unable to open dialog for this step" and the details present the following stack trace:

      java.lang.NullPointerException
      	at org.pentaho.di.trans.steps.userdefinedjavaclass.StepDefinition.clone(StepDefinition.java:36)
      	at org.pentaho.di.trans.steps.userdefinedjavaclass.UserDefinedJavaClassMeta.clone(UserDefinedJavaClassMeta.java:263)
      	at org.pentaho.di.trans.step.StepMeta.replaceMeta(StepMeta.java:476)
      	at org.pentaho.di.trans.step.StepMeta.clone(StepMeta.java:464)
      	at org.pentaho.di.ui.spoon.delegates.SpoonStepsDelegate.editStep(SpoonStepsDelegate.java:131)
      	at org.pentaho.di.ui.spoon.Spoon.editStep(Spoon.java:7756)
      	at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:2756)
      	at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:705)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:195)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
      	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
      	at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1183)
      	at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:6968)
      	at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:567)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.pentaho.commons.launcher.Launcher.main(Launcher.java:134)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at apple.launcher.LaunchRunner.run(LaunchRunner.java:116)
      	at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)
      	at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
      

      The step can't be opened after this, because it comes up with the same error and so does not let the user correct what ever is wrong.

      1. StepDefinition.java.patch
        2 kB
        Kaj Kandler

        Activity

        Hide
        Jens Bleuel added a comment - - edited

        Kaj, any chance to attach this buggy part for reproduction? Thanks, Jens

        Show
        Jens Bleuel added a comment - - edited Kaj, any chance to attach this buggy part for reproduction? Thanks, Jens
        Hide
        Kaj Kandler added a comment -

        The attached patch seems to fix the issue.

        Show
        Kaj Kandler added a comment - The attached patch seems to fix the issue.
        Hide
        Kaj Kandler added a comment - - edited

        Jens,
        unfortunately I don't know what exactly causes the issue (it's in the middle of my project, I copied some user defined java class step (with an attached info step) from one transformation to another and edited the java class and a parameter name, but its value is most likely not correct). But it is an NPE. My patch simply avoids that from happening, which seems quite reasonable.

        I have not a deep enough understanding of the Spoon code to know when the meta data of a step might be null.

        Show
        Kaj Kandler added a comment - - edited Jens, unfortunately I don't know what exactly causes the issue (it's in the middle of my project, I copied some user defined java class step (with an attached info step) from one transformation to another and edited the java class and a parameter name, but its value is most likely not correct). But it is an NPE. My patch simply avoids that from happening, which seems quite reasonable. I have not a deep enough understanding of the Spoon code to know when the meta data of a step might be null.
        Hide
        Kaj Kandler added a comment -

        Another mismatch was that the step in the info tab was empty (an entry with a tag, but no step), as I had messed around with names and hops.

        Show
        Kaj Kandler added a comment - Another mismatch was that the step in the info tab was empty (an entry with a tag, but no step), as I had messed around with names and hops.
        Show
        Dzmitry Stsiapanau added a comment - local ci - http://epbyminsd0259t1.minsk.epam.com:8080/view/Integration/job/kettle-master/221/
        Show
        Dzmitry Stsiapanau added a comment - https://github.com/pentaho/pentaho-kettle/pull/357 -pull-request
        Show
        Dzmitry Stsiapanau added a comment - resolved at http://ci.pentaho.org/view/Data%20Integration/job/Kettle/1054/
        Hide
        Viktoryia Shalkova added a comment -

        Validated on PDI 5.1 nightly build #516.

        Verified that "User Defined Java Class" step can be edited in case the "stepMeta" value is not null. Tested using attached "PDI-8786.jar", which simulates stepMeta value equal null.
        Tested on Windows 7 (x64)/ Ubuntu 12.04 (x64).

        Closed.

        Show
        Viktoryia Shalkova added a comment - Validated on PDI 5.1 nightly build #516. Verified that "User Defined Java Class" step can be edited in case the "stepMeta" value is not null. Tested using attached " PDI-8786 .jar", which simulates stepMeta value equal null. Tested on Windows 7 (x64)/ Ubuntu 12.04 (x64). Closed.

          People

          • Assignee:
            Viktoryia Shalkova
            Reporter:
            Kaj Kandler
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Agile