Uploaded image for project: 'Fuse Tooling'
  1. Fuse Tooling
  2. FUSETOOLS-107

doTry .. doCatch example - causes NPE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • 1.1
    • None
    • Camel Editor
    • None

    Description

      I get an NPE when I try to create a simple route using doTry .. doCatch.

      java.lang.NullPointerException
      	at org.eclipse.gef.ui.actions.ActionBarContributor.setActiveEditor(ActionBarContributor.java:156)
      	at org.eclipse.ui.internal.EditorActionBars.partChanged(EditorActionBars.java:343)
      	at org.eclipse.ui.internal.WorkbenchPage$3.run(WorkbenchPage.java:635)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      	at org.eclipse.core.runtime.Platform.run(Platform.java:888)
      	at org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:624)
      	at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3533)
      	at org.eclipse.ui.internal.WorkbenchPage.internalActivate(WorkbenchPage.java:617)
      	at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:589)
      	at org.eclipse.ui.internal.WorkbenchPage.showEditor(WorkbenchPage.java:2949)
      	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2849)
      	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
      	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
      	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
      	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
      	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
      	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
      	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365)
      	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
      	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
      	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
      	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
      	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
      	at org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:49)
      	at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221)
      	at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185)
      	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
      	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
      	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
      	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843)
      	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131)
      	at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462)
      	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235)
      	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
      	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
      	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
      	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1187)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3622)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3277)
      	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
      	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
      	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
      	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      	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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
      

      The route is like this:

      <?xml version="1.0" encoding="UTF-8" standalone="no"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
      
        <camelContext xmlns="http://camel.apache.org/schema/spring" autoStartup="true" lazyLoadTypeConverters="false" streamCache="false" trace="false">
          <route id="route2">
              <description>Route: route2</description>
              <from uri=""/>
              <from uri=""/>
              <doTry id="doTry1">
                  <description>Try: doTry</description>
                  <doCatch id="doCatch1">
                      <description>Catch: []</description>
                      <to id="to6" uri="">
                          <description>Endpoint: </description>
                      </to>
                  </doCatch>
              </doTry>
          </route>
      </camelContext>
      
      </beans>
      

      See screenshot for the route.

      Attachments

        Issue Links

          Activity

            People

              jastrachan_jira James Strachan (Inactive)
              cibsen@redhat.com Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: