9

In my previous version of Eclipse, I could launch my JBoss server from the same run or debug configurations menu that I use for launching all my other programs, and if I launched the server while "build workspace" was going on, the launch would block until build workspace was complete.

Now that I have upgraded to Luna, if I want to launch JBoss , I have to go to the servers tab because JBoss is no longer listed in the run/debug menus with my other programs, and also, if I launch the server while "build workspace" is going on, the server launches immediately. Usually this causes a problem because after the build finishes, classes are replaced in the running server JVM, and I get a notice that the hot replace was not successful.

How can I get back to the old behavior for my server? Is it still possible to have the server launch wait for build workspace to complete?

skiphoppy
  • 97,646
  • 72
  • 174
  • 218
  • have you installed JBoss tools? – Paizo Jun 17 '15 at 12:03
  • Is your JBoss server launch in the **Run Configurations...** dialog (I'm not talking about the list that shows under the toolbar button)? – E-Riz Jun 17 '15 at 16:12
  • When you upgraded to Eclipse Luna, did you re-install the JBoss server adapter? I'm not sure if it's included when you just install the JBoss developer tools plugins. – E-Riz Jun 18 '15 at 20:11
  • @E-Riz can you clarify the distinction for me between the JBoss server adapter and the JBoss developer tools plugins? – skiphoppy Jun 19 '15 at 15:17
  • @Paizo I don't think I installed anything beyond what came with the Luna JEE Eclipse download. – skiphoppy Jun 19 '15 at 15:17
  • please try to install jboss tools from the marketplace, then create the server run configuration on the server view and see if it solves the issue – Paizo Jun 19 '15 at 16:54
  • @skiphoppy: I updated my answer below with some information about server adapters. – E-Riz Jun 19 '15 at 18:03

3 Answers3

3

Launch configurations are stored in the workspace directory, under the ${workspace_dir}/.metadata/.plugins/org.eclipse.debug.core/.launches directory. You should be able to find the file corresponding to the launch that used to work there (unless it was deleted during the upgrade to Luna). The name of the file is the same name of the run configuration, e.g. LaunchServer.launch.

It could be that the workspace was somehow corrupted after upgrading Eclipse. If you locate the launch configuration file, you can import it by selecting File --> Import --> Launch Configurations and browsing the location of the .launch file.

A launch configuration can also be shared if you don't want to store it in the .metadata folder. From the configuration dialog, under the Common tab, select the Shared file radio button to point to the .launch file.

See How do I save Eclipse launch profiles across workspaces and How can I clean up Eclipse “run configurations”.

EDIT:

Based on the comments, the workspace seems to already contain the launch configuration file, but it's not showing in the menu. This could possibly be due to some corrupted metadata. You can try to do the following:

  1. Copy the existing .launch file from ${workspace_dir}/.metadata/.plugins/org.eclipse.debug.core/.launches to a backup file.

  2. Delete the .launch file.

  3. Restart Eclipse.

  4. Import the copied launch config file using File --> Import --> Launch Configurations.

Community
  • 1
  • 1
M A
  • 71,713
  • 13
  • 134
  • 174
  • Looks like my JBoss launch configuration is there. But it still does not show up in the menu. Starting to wonder if it has to do with the newer JBoss support I'm using. – skiphoppy Jun 16 '15 at 14:44
  • I did try importing the JBoss launch configuration that is there, but it asks me if I want to overwrite it. – skiphoppy Jun 16 '15 at 14:45
  • @skiphoppy Normally it should appear in the menu after launching it from the Run Configurations dialog (at least once). The menu shows recently launched runs. – M A Jun 16 '15 at 15:29
  • my problem is that when I upgraded to Luna JBoss quit showing up in that menu. I'm looking to figure out how to get it back. – skiphoppy Jun 17 '15 at 15:44
  • The weird thing is that it asks if the launch configuration should be overwritten although it does not show up in the list of launch configurations, which leads me to think it is due to a corrupted workspace... – M A Jun 17 '15 at 17:50
  • Maybe [this answer](http://stackoverflow.com/questions/9247089/how-can-i-clean-up-eclipse-run-configurations) and [this answer](http://stackoverflow.com/questions/15322663/how-to-remove-launch-configuration-histories-in-eclipse) can help deleting the existing configuration (try to restart Eclipse after deleting). But make sure you backup the already existing file under `${workspace_dir}/.metadata/.plugins/org.eclipse.debug.core/.launches` in case you want to import it. – M A Jun 17 '15 at 18:00
  • I tried deleting the existing JBoss launch configuration file, starting Eclipse, and importing from a copy. No luck. Strangely enough, it gave me an error message that "export" of launch configurations failed. – skiphoppy Jun 18 '15 at 20:11
  • @skiphoppy What does the failed export say? If you open the "Error Log" view (Window -> Show View -> Error Log), does it show an error message or exception (you can double click on a message in the Error Log to see the exception stacktrace, if any)? – M A Jun 18 '15 at 20:28
2

See Run/Debug > Launching in Preferences. Also see "Launch Groups" that allow you to daisy chain run config launches. More on Launch Groups here.

enter image description here

Community
  • 1
  • 1
martinez314
  • 12,162
  • 5
  • 36
  • 63
  • I already have that set to Always. But it has no effect because my server is no longer listed as a launch configuration. – skiphoppy Jun 11 '15 at 22:08
2

If your JBoss server launch isn't showing up in the Run Configurations (or Debug Configurations) dialog, it could be that it's being filtered out of the view. Look under Preferences > Run/Debug > Launching > Launch Configurations and see the Filter checked launch types option, checking if any of the filters might be hiding your server launch. enter image description here


Another possibility is that you don't have the JBoss tools plugins installed that populate JBoss server launches into the Run Configurations list. Make sure you have installed the JBoss Developer Studio or JBoss Tools plugins from Eclipse Marketplace (Help > Eclipse Marketplace then search for "jboss" (without quotes) in the Marketplace dialog).

Among the things that the JBoss plugins provide is an Eclipse WTP Server Adapter, which enables configuring and launching of JBoss servers in Eclipse Web Tools (see What are JST and WST server adapters? for some info on WST/JST adapters in Eclipse Web Tools). The JBoss tools provide other features to the IDE, among them might be UI enhancment to list JBoss launches; that's what I suspect you are missing in your Luna installation.

Community
  • 1
  • 1
E-Riz
  • 31,431
  • 9
  • 97
  • 134
  • Thanks, that was good to check, but "filter checked launch configuration types" is turned off. – skiphoppy Jun 18 '15 at 20:06
  • @skiphoppy: When you upgraded to Eclipse Luna, did you re-install the JBoss server adapter? I'm not sure if it's included when you just install the JBoss developer tools plugins. – E-Riz Jun 19 '15 at 13:22