Dave,
If you want to keep the path relative, you could also try changing getWorkingDirectory() to something like:
try { IHostShell cmd = connection.getRemoteShellService().runCommand("", "pwd", new String[0], new NullProgressMonitor()); String path = cmd.getStandardOutputReader().readLine().getString().trim(); return new Path(path); } catch (SystemMessageException e) { return new Path("/"); }
Greg
On Sep 17, 2008, at 8:12 AM, Greg Watson wrote: Probably a better solution is to add:
if (!path.isAbsolute()) { path = getWorkingDirectory().append(path); }
just before the return. However, that probably won't solve your problem though, because there doesn't seem to be any way to get the working directory in RSE so it still won't be able to find the file. You really need to supply the absolute path to the file you're trying to check for.
Greg On Sep 17, 2008, at 7:58 AM, Greg Watson wrote: Dave,
Can you try changing the return in RSEFileManager.toURI to:
return new URI("rse", connection.getHost().getHostName(), path.makeAbsolute().toPortableString(), null); //$NON-NLS-1$
Let me know what happens.
Greg On Sep 16, 2008, at 11:10 PM, Dave Wootton wrote: I'm trying to run my PTP 2.0 plugins on AIX and am having problems with lots of null pointer exceptions when filling in a launch configuration that I'm not seeing on Linux that have the following few methods at the top of the traceback java.lang.NullPointerException at org.eclipse.core.internal.filesystem.NullFileSystem.getStore(NullFileSystem.java:52) at org.eclipse.rse.internal.efs.RSEFileSystem.getStore(RSEFileSystem.java:88) at org.eclipse.ptp.remote.rse.RSEFileManager.getResource(RSEFileManager.java:74) at org.eclipse.ptp.rm.ibm.pe.ui.rmLaunchConfiguration.PERMLaunchConfigurationDynamicTab.validateOutputPath(PERMLaunchConfigurationDynamicTab.java:2751) at org.eclipse.ptp.rm.ibm.pe.ui.rmLaunchConfiguration.PERMLaunchConfigurationDynamicTab.validateOutputPath(PERMLaunchConfigurationDynamicTab.java:2694) at org.eclipse.ptp.rm.ibm.pe.ui.rmLaunchConfiguration.PERMLaunchConfigurationDynamicTab.validateMiscTab(PERMLaunchConfigurationDynamicTab.java:2644) at org.eclipse.ptp.rm.ibm.pe.ui.rmLaunchConfiguration.PERMLaunchConfigurationDynamicTab.validateAllFields(PERMLaunchConfigurationDynamicTab.java:2451) at org.eclipse.ptp.rm.ibm.pe.ui.rmLaunchConfiguration.PERMLaunchConfigurationDynamicTab$EventMonitor.modifyText(PERMLaunchConfigurationDynamicTab.java:679) I downloaded the PTP code from CVS using the PTP 2.0 tag to try to debug this. It looks like the reason I'm getting the null pointer exception is because there's a call to RSEFileManager.toURI where a URISyntaxException is caught and that method returns null. The IPath object that's passed to toURI has a device=null and a segments array with a single String element with value pmadjpri.log. The detail message in the URISyntaxException is "Relative path in absolute URI". The input variable in the URIException object is rse://K17SF2P01.PPD.POK.IBM.COMpmadjpri.log Is this exception being thrown because of something missing out of the pathname (it looks like '/' or ':' might be missing)? Note: The pmadjpri.log is passed in as a String parameter (path name) to my method org.eclipse.ptp.rm.ibm.pe.ui.PERMLaunchConfigurationDynamicTab.validateOutputPath at line 2740 where I'm trying to validate a pathname on the remote system. Am I doing something invalid in that method? Dave_______________________________________________ ptp-dev mailing list ptp-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________ ptp-dev mailing list ptp-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________ ptp-dev mailing list ptp-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/ptp-dev
|