Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-1935

After Variables doesn't support custom object types

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • Hide

      Declare custom object type and return it as the type in the @AfterVariable

      Show
      Declare custom object type and return it as the type in the @AfterVariable
    • All
    • Small

    Description

      Declare custom object type and return it as the type in the @AfterVariable
      You will receive this stacktrace:

      java.lang.NullPointerException
      	at org.talend.sdk.component.studio.ComponentModel.createReturns(ComponentModel.java:347)
      	at org.talend.designer.core.ui.editor.nodes.Node.init(Node.java:593)
      	at org.talend.designer.core.ui.editor.nodes.Node.<init>(Node.java:491)
      	at org.talend.designer.core.ui.editor.process.Process.loadNode(Process.java:2507)
      	at org.talend.designer.core.ui.editor.process.Process.loadNode(Process.java:2494)
      	at org.talend.designer.core.ui.editor.process.Process.loadNodes(Process.java:2419)
      	at org.talend.designer.core.ui.editor.process.Process.loadXmlFile(Process.java:2181)
      	at org.talend.core.ui.editor.JobEditorInput.loadProcess(JobEditorInput.java:119)
      	at org.talend.core.ui.editor.JobEditorInput.checkInit(JobEditorInput.java:76)
      	at org.talend.core.ui.editor.JobEditorInput.<init>(JobEditorInput.java:68)
      	at org.talend.designer.core.ui.editor.ProcessEditorInput.<init>(ProcessEditorInput.java:39)
      	at org.talend.designer.core.ui.editor.ProcessEditorInput.<init>(ProcessEditorInput.java:34)
      	at org.talend.designer.core.ui.action.EditProcess.getEditorInput(EditProcess.java:166)
      	at org.talend.designer.core.ui.action.EditProcess.doRun(EditProcess.java:145)
      	at org.talend.repository.ui.actions.AContextualAction$2.run(AContextualAction.java:675)
      	at org.talend.repository.RepositoryWorkUnit.executeRun(RepositoryWorkUnit.java:103)
      	at org.talend.core.repository.model.AbstractRepositoryFactory.executeRepositoryWorkUnit(AbstractRepositoryFactory.java:258)
      	at org.talend.repository.localprovider.model.LocalRepositoryFactory.executeRepositoryWorkUnit(LocalRepositoryFactory.java:3716)
      	at org.talend.core.repository.model.ProxyRepositoryFactory.executeRepositoryWorkUnit(ProxyRepositoryFactory.java:2551)
      	at org.talend.repository.ui.actions.AContextualAction.run(AContextualAction.java:688)
      	at org.talend.repository.viewer.action.RepoDoubleClickAction.executeAction(RepoDoubleClickAction.java:251)
      	at org.talend.repository.viewer.action.RepoDoubleClickAction.run(RepoDoubleClickAction.java:138)
      	at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:219)
      	at org.eclipse.ui.navigator.CommonNavigatorManager$1.open(CommonNavigatorManager.java:183)
      	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:49)
      	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:853)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
      	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
      	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:850)
      	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1165)
      	at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:454)
      	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:276)
      	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:271)
      	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:311)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
      	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
      	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:636)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
      	at org.talend.rcp.intro.Application.start(Application.java:247)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
      

      It happens because
      https://github.com/Talend/studio-tools/blob/12808863466ad7adecc3e24efe9db8c5489fd825/org.talend.cloud.publisher/src/main/java/org/talend/core/model/metadata/types/JavaTypesManager.java
      Doesn't have such type in its map.

      Right now I see two possible solutions.
      1) When its null fallback to the Object.class type
      2) On the side of the component-runtime forbid declare the custom types as the possible after variables types.

      We can implement both of them. (1) to support existed connectors (it should be very small amount of connectors, because this feature just was released)
      And the (2) - for the future.
      I think we can proceed with the (2).

      Attachments

        Activity

          People

            emmanuel_g emmanuel gallois
            ozhelezniak Oleksandr Zhelezniak
            Oleksandr Zhelezniak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour
                1d 1h