Problems starting remote Java program through RSE plugin in Eclipse

I spent a huge amount of time figuring out how to run the Remote Java program from local Eclipse using the RSE plugin.

I was able to connect to my remote machine via Eclipse using RSE, and after running Create Remote Project for a remote Maven project in Eclipse in the Remote System Explorer perspective, I could see my project in Java Perspective.

Now in Java Perspective, when I continued to create a simple Java file that makes up the Hello World Program, it gives me an error

I spent the whole day to find out what the problem is. If someone has encountered this problem before, or can shed light on this problem, then this would be really noticeable.

Also, let me know if you need more information?

Thanks to .log tracking in the .metadata directory of the 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) 

.log trace 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) 
+7
java eclipse remote-server remote-debugging
source share
4 answers

I would run Wireshark to accurately check what happens on the wire. Be that as it may, you flew blind in a blizzard. With Wireshark, you can still be in a snowstorm, but at least you won't be flying blind.

0
source share

Try removing the plugin and see. The uninstall process is slightly different depending on the version of eclipse you have.

If you have a view, editor, perspective that belongs to this plugin, make sure you close all of them before doing the following.

Here are some links:

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

Temporarily disable the Eclipse plugin

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

0
source share

The information provided here is somewhat incomplete, however, given the steps you tried to solve, I am going to make some assumptions:

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

  • The plugin that you chose to use, with best practice, directly implemented the RSE subsystem without implementing your own service level.

  • Then you completed your work / updated the version of the remote project / or deleted the link to the remote project.

Note. I can’t say for sure what you did, it can be a lot, but the result is that you have connected a volatile resource to your private profile and this resource has become inaccessible.

How to find out?

  • RSE subsystems that do not implement their service level domain, required to return null from getServiceType () calls, start the stack trace.

  • The public team profile must be explicitly created, and the private profile is automatically created. more about this here

  • The UIPlugin component is one call from the workflow, and the RSE UI Plugin interface for the RSE subsystem to the basic RSE API will make this stack trace signature.

  • The start delegate is trying to start a configuration that has a source search call for your profile that fails - the end of the stack trace.

To understand what is happening, you need to know that each RSE resource is associated with a profile, and these profiles will contain: 1. Connections - including the properties of the subsystem. 2. Filters, filter pools and links to filter pools 3. Other profile data

Profiles can be active or inactive. The remote system explorer displays all connections from all active profiles and, within the connection, allows you to refer to filter pools from any active profile.

However, there is one key point your personal profile cannot be deleted or made inactive.

This means that if you have not created a Team profile that can be disabled. And your RSE plugin does not implement its own level of service for a graceful rejection. And this resource will become unavailable, you will not be able to run the configuration profile - your problem.

So don’t worry about reinstalling the plugin that you can make (or find the best one), just make sure you attach any remote resources to your Team Profile. You can then use the Team view to control which profiles appear in your workspace, making the various profiles active or inactive.

Learn more about this in the RSE Developer Guide.

EDIT: Follow up

Unfortunately, it seems that this is actually the same error that you encountered earlier in another call chain. When you set up the command profile, you did not remove / delete all the components of the RSE plugin. Thus, UI Decorator tried to build for you the look of your remote resource and got a null pointer

This is confirmed by the fact that you could not "see" the RSE plugin in your eclipse opening. At least the eclipse behaves as if part of it is still there, and I suspect it was.

You basically have two options for solving this problem, and they are not very happy.

  • If you don’t have any serious value blocked in your Eclipse IDE that you cannot get (which you don’t need), the easiest would be to remove eclipse and all the files associated with it, reinstall the clean eclipse, load the RSE, configure Team profile (two will be better), not allowing him to specify the identifier from your personal profile by default, then reconnect the remote system.

  • If you REALLY feel your hands getting dirty and fixing it through an existing eclipse installation, you can directly write the code to the RSE FYI registry : (NOT trivial) and you cannot run it in Eclipse when you do this. The registry allows you to get and manage almost all your configuration settings, subtypes and profile information.

If I were in a hurry, I would just do 1, If ​​you want to spend time and learn more about RSE and are not afraid to break it, I would do 2.

One more thing. There is a “theoretical” way to get and change / reset your personal profile in the ISystemProfile RSE interface, there are two methods that CAN do this, but so that you know even the best eclipse gurus that I know, I don’t know if this is possible or will be work, however here is the info:

isDefaultPrivate to find a unique developer profile (returns boolean), and setDefaultPrivate can let you inactivate a unique developer profile and set another.

Why can I say because even eclipse API documents end this statement with a question mark ... see here

0
source share

I found this on

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

I already figured out the problem:

After looking at the details, I see that everything goes wrong when I try to save some data related to the connection.

I am a suction cup for consistency, so I dumped the Eclipse folder in Program Files. I assume that RSE did not have the proper permissions to write there, so it just failed. Eclipse is now on my desktop, and RSE works great!

Now, why the hell is Eclipse not having a suitable installer so that it can live with the rest of my programs ?! cool

I do not know if this helps.

0
source share

All Articles