7

I have spent awful amount of time figuring out as to how to run the Remote Java Program from local Eclipse using RSE plugin.

I was able to connect to my remote machine through eclipse using RSE, and after doing Create Remote Project on a remote maven project on eclipse on Remote System Explorer perspective, I could see my project under Java Perspective.

Now under Java Perspective when I went on to create a simple java file constituting a Hello World Program, it throws me an error,

I have spent a day full to figure out as to what is the issue. If anyone has faced this issue before, or can throw some light on the issue, then it would be really appreciable.

Also, let me know if you need any more info?

Thanks traceback of .log in .metadata directory of workspace

!ENTRY org.eclipse.core.jobs 4 2 2013-08-18 01:19:20.101 !MESSAGE An internal error 
occurred during: "Launching abc". !STACK 0 java.lang.NullPointerException at 

org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.getDefaultWorkingDirectory
(AbstractJavaLaunchConfigurationDelegate.java:995) at 
org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.verifyWorkingDirectory(AbstractJavaLaunchConfigurationDelegate.java:684) at 
org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:53) at 
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855) at 
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704) at 
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047) at  org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251) at 
org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

traceback of .log for new null pointer exception

!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
        at org.eclipse.rse.ui.view.SystemTableViewProvider.getText(SystemTableViewProvider.java:221)
        at org.eclipse.jface.viewers.DecoratingLabelProvider.getText(DecoratingLabelProvider.java:129)
        at org.eclipse.rse.internal.ui.view.SystemDecoratingLabelProvider.getColumnText(SystemDecoratingLabelProvider.java:55)
        at org.eclipse.jface.viewers.TableColumnViewerLabelProvider.update(TableColumnViewerLabelProvider.java:70)
        at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
        at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:399)
        at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:485)
        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.updateItem(StructuredViewer.java:2167)
        at org.eclipse.jface.viewers.StructuredViewer.internalUpdate(StructuredViewer.java:2150)
        at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:2089)
        at org.eclipse.jface.viewers.ColumnViewer.update(ColumnViewer.java:554)
        at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:2033)
        at org.eclipse.jface.viewers.StructuredViewer.handleLabelProviderChanged(StructuredViewer.java:1191)
        at org.eclipse.jface.viewers.ContentViewer$1.labelProviderChanged(ContentViewer.java:97)
        at org.eclipse.ui.internal.decorators.DecoratorManager$1.run(DecoratorManager.java:430)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.ui.internal.decorators.DecoratorManager.fireListener(DecoratorManager.java:428)
        at org.eclipse.ui.internal.decorators.DecorationScheduler$3.runInUIThread(DecorationScheduler.java:530)
        at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3946)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3623)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
Cœur
  • 37,241
  • 25
  • 195
  • 267
Praful Bagai
  • 16,684
  • 50
  • 136
  • 267
  • Did you try clearing your eclipse metadata folder ? You can also disable the RSE plugin and repeat this process (just to see if the plugin is the root cause for what you see) – Zenil Aug 22 '13 at 07:49
  • I tried removing metadata folder, infact created a new workspace and tried running from there but no luck. How can i check if rse plugin is installed and disable rse plugin? – Praful Bagai Aug 22 '13 at 10:52
  • I posted an edit in my answer as it was too long to comment back here. – J-Boss Aug 27 '13 at 09:45

4 Answers4

0

I would fire up Wireshark to examine exactly what is going over the wire. As it is, you are flying blind in a snowstorm. With Wireshark, you might still be in a snowstorm but at least you won't be flying blind.

Mark Leighton Fisher
  • 5,609
  • 2
  • 18
  • 29
  • Hi Mark, I did not see any thing in wireshark that could help us why this issue is coming. I tried today as well for all the steps again, but this NullPointerException is hurting big time. Any other cues? – Praful Bagai Aug 22 '13 at 10:53
0

Try uninstalling the plugin and see. The uninstall process is slightly different based on the eclipse version you have.

If you have any view,editor,perspective that belongs to this plugin open, make sure you close all of them before you do the below .

Here are a couple of links :

http://wiki.eclipse.org/FAQ_How_do_I_remove_a_plug-in%3F : This also shows how to just disable a plugin

Temporarily disable Eclipse plugin

If all else fails, you can physically remove the plugins from the eclipse directory and restart it. Disabling plugins in Eclipse

Community
  • 1
  • 1
Zenil
  • 1,491
  • 3
  • 12
  • 21
  • Removing rse plugins manually from eclipse plugins directory removed the Remote System Explorer thing from eclipse. And i am not able to find out temporarily disabling the RSE plugin. – Praful Bagai Aug 23 '13 at 01:39
  • How about trying a new fresh eclipse version and repeat the same steps over there? – Praful Bagai Aug 23 '13 at 01:39
  • That should work.. But it's a heavy work around..What version of eclipse are you using ? – Zenil Aug 23 '13 at 06:12
  • Eclipse Java EE IDE for Web Developers. Version: Juno Service Release 2 Build id: 20130225-0426 – Praful Bagai Aug 23 '13 at 07:00
  • Also, i tried downloading a new java eclipse on mac. it doesn't contain rse plugin, i need to download rse plugin to do remote server explorer. downloading that means, getting stuck in the same issue again. – Praful Bagai Aug 23 '13 at 07:01
  • For disabling the plugins see if you have any options here : Eclipse Preferences->General->Startup and Shutdown..Also if you are downloading a new one why not download eclipse Kepler Java EE (the latest version) ? May bethe issue is fixed in that ? – Zenil Aug 23 '13 at 14:12
0

The information you have given here is somewhat incomplete, however given the steps that you have tried to resolve the situation I am going to make some assumptions:

  1. You installed the plugin and setup your RSE attached it to the remote project without creating a team profile for it.

  2. The plugin you chose to use, against best practice, directly implemented the RSE subsystem without implementing it's own service layer.

  3. You then finished your work/updated the remote project's version/or removed the link to the remote project.

Note: I can not say exactly what you did, it could be many things, but the net result is you attached a volatile resource to your private profile and that resource became unavailable.

How do I Know this?

  1. RSE Subsystems that do not implement their own service layer area required to return null from getServiceType() calls -- the beginning of your stack trace.

  2. The public Team profile must be explicitly created, while the private profile is automatically created. more on this here

  3. the UIPlugin component is one call away from the worker thread and RSE UI Plugin to RSE Subsystem to RSE Base API service layer would make this stack trace signature.

  4. The launch delegate attempts to launch a configuration which has a source lookup call to your profile that fails -- the end of your stack trace.

To understand what's happening you need to know that EVERY RSE resource is attached to a profile and those profiles will contain: 1. Connections -- including subsystem properties. 2. Filters, filter pools, and filters pool references 3. Other data associated with a profile

Profiles can be active or inactive. The Remote System Explorer displays all connections from all active profiles and, within a connection, allows filter pools to be referenced from any active profile.

However the there is one key point Your private profile cannot be deleted or made inactive.

That means if you have not created a Team profile that can be disabled AND your RSE plug-in does not implement it's own service layer for graceful failure AND that resource become unavailable you cannot launch a configuration profile --ever-- hence your problem.

So don't worry about reinstalling the plugin you can do that (or find a better one), just make sure to attach any remote resources to a project specific Team profile. Then you can use the Team view to control which profiles display in your workspace by making the various profiles active or inactive.

You can find out more about this in the RSE Developer Guide

EDIT: Follow-up

Unfortunately looks like it is actually the same error that you were having before through a different call chain. When you setup the team profile you had not removed/uninstalled all of the components of the RSE Plugin. As such the UI Decorator attempted construct a view for you of your remote resource and received the null pointer

This is born out by the fact that you could not "see" the RSE Plugin in you eclipse discovery. At least eclipse is behaving as if part of it was still in there, and I suspect it was.

You basically have two choices to resolving this issue and neither are very happy.

  1. If you do not have anything of serious value locked up in your eclipse IDE that you can't get out (which you shouldn't) the simplest would be to remove eclipse and all of its' associated files, re-install a clean eclipse, download RSE, configure a Team profile (two would be better) without allowing it to default the id from your private profile, THEN reconnect your remote system.

  2. If you REALLY feel like getting your hands dirty and getting this fixed through your existing eclipse installation, you can directly write code to the RSE registry FYI:(NOT trivial) and you won't be able to run it in Eclipse when you do it. The registry allows you to get almost all of your configuration setting, subsytems and profile information and manipulate it.

If I were in a hurry I'd just do 1, If you want to take the time and learn more about RSE and are not afraid of breaking it I'd do 2.

One more thing. There is "theoretically" a way to get and change/reset your private profile on the ISystemProfile interface of RSE there are two methods, that MAY be able to do this, but just so you know even the best eclipse gurus I know don't know if this possible or would work, none the less here is the info:

isDefaultPrivate to find the unique developer profile(returns boolean) and setDefaultPrivate may allow you to inactivate the unique developer profile and set another one.

Why do I say may, because even the eclipse API docs end this statement with a question mark ... see it here

J-Boss
  • 927
  • 4
  • 14
  • Thanks J-Boss. It was a clear informative reply and went ahead to try and create public profile as well. But it still returned me a Null pointer exception. Also a different null pointer exception is received . (New null pointer exception in the question)I don't know what am i doing wrong here. – Praful Bagai Aug 25 '13 at 03:50
  • Can you please point me to correct rse plugin, so that i try it out on new eclipse kepler, and try the above steps again on that (I am not able to find rse plugin now anywhere?). Is it outdated. – Praful Bagai Aug 25 '13 at 03:53
  • I realized I didn't answer your second question, yes RSE is a bit old, but TM has extended it quite a bit. This is [the site](http://www.eclipse.org/tm/) where you can find out more. It is a lightweight framework over RSE, but it is more fail-safe which you might appreciate right now. – J-Boss Aug 27 '13 at 10:13
  • Can you please provide me a remote help either through join.me or skype? I am actually not able to figure out and resolve this issue on my own, and i badly require to solve this now. Thanks. – Praful Bagai Aug 28 '13 at 08:27
0

I found this at

http://www.eclipse.org/forums/index.php/t/171215/

I already figured out the problem:

After looking at the details, I see that it all goes wrong when it tries to save some data related to the connection.

I'm a sucker for consistency, so I dropped the Eclipse folder in Program Files. I'm assuming RSE didn't have the approprate permissions to write there, so it just failed. Eclipse folder is now on my desktop and RSE works great!

Now why the hell doesn't Eclipse have a proper installer so it can live with the rest of my programs?! Cool

I don't know if this helps.

George Tomlinson
  • 1,871
  • 3
  • 17
  • 32