Community
Participate
Working Groups
On a fresh install of Eclipse 2.1 RC2 I setup some of my external tools definitions but when trying to run some of them I receive a 'Exception occurred while launching error' and sometimes also a 'Reason: Error within Debug UI'. The tools are Linux bash shell commands similar to: Location: /bin/bash Working directory: ${project_loc:/WEB-INF/classes} Arguments: -c "cp -f ${project_name}.jar ../lib" I had these types of tool definitions working in previous eclipse versions.
One cosmetic comment also. The order of the elements on External Tools window is rather annoying. The order would be more intuitive as: Working Directory: Location: <-- this is where the tool is specified Arguments: <-- this is where the tools arguments are specified
Created attachment 4159 [details] log file
all I could see in the log was an old problem with JAVA_HOME not being set correctly from last week.
This is from Help | About | Configuration Details: !ENTRY org.eclipse.debug.ui 4 120 Mar 14, 2003 17:05:47.971 !MESSAGE Error logged from Debug UI: !STACK 0 java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:277) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:351) at org.eclipse.debug.ui.DebugUITools.launch(DebugUITools.java:493) at org.eclipse.debug.ui.actions.LaunchAction.run(LaunchAction.java:62) at org.eclipse.debug.ui.actions.LaunchAction.runWithEvent(LaunchAction.java:77) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:902) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1590) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1383) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1400) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1383) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: java.lang.NullPointerException at org.eclipse.ui.externaltools.internal.model.ToolUtil.expandDirectoryLocation(ToolUtil.java:216) at org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil.getWorkingDirectory(ExternalToolsUtil.java:150) at org.eclipse.ui.externaltools.internal.program.launchConfigurations.ProgramLaunchDelegate.launch(ProgramLaunchDelegate.java:63) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:152) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:672) at org.eclipse.debug.ui.DebugUITools.buildAndLaunch(DebugUITools.java:537) at org.eclipse.debug.ui.DebugUITools$2.run(DebugUITools.java:486) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:95)
Jared can you please investigate.
Here's the code in question. Can *you* spot the NPE? :-) IPath path= null; try { path= variable.getExpander().getPath(varDef.name, varDef.argument, context); } catch (CoreException exception) { status.merge(exception.getStatus()); } buffer.append(path.toOSString());
Created attachment 4175 [details] 35078.patch - a patch that fixes the problem This NPE would occur anytime we failed to expand a variable in the working directory.
adding EG as CC for RC3 approval.
yes
Fixed by returning null when an exception occurs expanding a variable. Please verify change to ToolUtil, DarinS.
Verified.