Eclipse JBoss Plugin has wrong PATH to JBoss Home Dir - eclipse

Basically, I installed the JBoss plugin, then moved my JBoss install directory and changed my Windows environment variable to the new, correct path. However, Eclipse seems to still have the old path so every time I try to run the server it can't find it. How can I change this URL? Should I just reinstall? I'm sure there's a simple answer!
Thanks for your time.
Cheers,
Lindsay

You can adjust eclipse variables by going to window->preferences and then type in the filter "classpath" or "variables" or both. Then go to the classpath variables and you should be able to see and change the eclipse JBOSS_HOME.
EDIT : If your JBoss runtime does not use the workspace settings, you can change the properties of your server runtime by selecting it in the servers view and Alt-Enter for a properties view where you can adjust the server location by clicking the Switch Location button. You can also double-click on the server for the big properties view in the editor.

Related

Eclipse modifies server.xml each time run the project (Run-->Run on Server)

I'm using Tomcat 7 on Eclipse Juno. I use workspace metadata as server location (Please see my tomcat configurations below).
Also I got a Server project in eclipse [please see the image below] with separate server.xml and other configuration files.
Normally it works fine. The issue came across after I changed the server.xml (in eclipse project) for SSL configurations.
Configurations are working fine. But each time I run the project (Run-->Run on Server) server.xml get modified to the default version. My customized SSL changes are missing.
Also I tried to change server.xml in tomcat installation location (C:\apache-tomcat-7.0.35\conf), but it didn't pick from eclipse.
Can anyone please help me on this?
Thanks
In {workspace}/Servers you will find a folder for every Tomcat configuration, containing several configuration files, including the server.xml. There you then can edit the file directly.
To get changes taken into account restart Eclipse. That is imho better than removing and adding the configuration back all the time. Tested using Eclipse Mars and Tomcat 7.
(the solution is from: Eclipse with tomcat - eclipse modifies server.xml)
I found an applicable solution but not a perfect one.
What I have done is;
1.Changed server.xml file in installation location (In my case C:\apache-tomcat-7.0.35\conf)
2.Remove tomcat server from eclipse server panel (please see the image below)
3.Create a new server in eclipse server panel.
4.Then Server project will be generated new server.xml with my customized changes.
5.The trick is, initially eclipse picks server.xml from installation location when create a new server in panel.
Thanks
Make sure you are editing the files right beneath the tomcat server folder, not the ones beneath the config folder. Check the attached screenshot for the files I'm referring to.
I had this problem too, and the solution worked (I don't have enough reputation points to vote up the answer).
On a similar note, I had to make configuration changes to a port number and that also required me to delete and re-add my tomcat instance from STS (spring tool suite).
On Eclipse, double click on Server to view properties.
check "publish module contexts to separate XML files", and save it.
Run Tomcat server.
Eclipse will be create conf/[enginename]/[hostname]/[appname].xml without touching server.xml
Make sure that the path in the server.xml is same as in the Web project Settings.
To see the Web Project Settings: Right click on the project >> Properties >> Web Project Settings.
Always give the project path over here. The path in server.xml will automatically updated.
Clean Tomcat Work Directory & Republish the project.

Where does Eclipse store the info about which workspace to start up with?

When I launch Eclipse it starts with one of the workspaces I created and selected "don't ask again" (standardly, Eclipse asks about which workspace to start with during the startup).
So it must store somewhere which workspace to use. Where does it store this piece of information?
In
$HOME/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/.settings
there is a file
org.eclipse.ui.ide.prefs
where it is stored.
With Eclipse Juno, I can see this information in:
eclipse\configuration\.settings file.
I guess you are looking for RECENT_WORKSPACES and SHOW_WORKSPACE_SELECTION_DIALOG vars.
The settings have changed since this question was posted, as newer versions of Eclipse have been released.
With Eclipse Luna, navigate to $ECLIPSE_HOME/eclipse/configuration/.settings and the file org.eclipse.ui.ide.prefs contains settings like this (Windows file configuration shown):
MAX_RECENT_WORKSPACES=5
RECENT_WORKSPACES=C\:\\src\\eclipse-workspaces\\luna\\MyApp\nC\:\\src\\eclipse-workspaces\\luna\\MyOtherApp
RECENT_WORKSPACES_PROTOCOL=3
SHOW_WORKSPACE_SELECTION_DIALOG=true
eclipse.preferences.version=1
Each entry in RECENT_WORKSPACES appears to be delimited by \n with no spaces. Whenever I manually shuffle my workspaces around (which is rare, but it happens), I've had great success hand-editing this file, saving it, and having the new paths show up just fine in the Workspace Lancher/Select a Workspace dialog.
You have eclipse configuration files in "eclipse_home"/configuration and the one you may looking for is in settings directory : org.eclipse.ui.ide.prefs
I was facing an issue with Spring Tool Suite 4. The workspace used to give an error and I wasn't able to select other workspace also. With the help of some answers already given, I could locate the configuration in $ECLIPSE_HOME\sts-4.7.1.RELEASE\configuration.settings\org.eclipse.epp.mpc.ui.prefs
I removed RECENT_WORKSPACES property (after you try to restart, it adds default entry again) and changed
SHOW_WORKSPACE_SELECTION_DIALOG=true
STS started showing workspace selection dialog again.
If Eclipse has been installed with ubuntu-make, the file location is ~/.local/share/umake/ide/eclipse-jee/configuration/.settings/org.eclipse.ui.ide.prefs.

How do I configure the server deploy directory in eclipse?

I have 2 workspaces. I can't configure the server deploy directory in the 2nd workspace.
Eclipse indigo. JBoss server 5.x.
The deploy directory is D:\Development2\projects2.metadata.plugins\org.jboss.ide.eclipse.as.core\JBoss_EAP_5.x_Runtime_Server1324558380698\deploy
I want it to be D:\Development\jboss-eap-5.1\jboss-as\server\default\deploy as it is for the server in the 1st workspace.
I have tried every preference and property related to this server, and I can't change it. I'm all for editing an .xml file, I just can't find the one that has this information.
Any ideas?
When you doubleclick the server name, the window that opens has TWO TABS. Look at THE BOTTOM OF THE WINDOW. This information is changed in that window.
Sorry for the noise. Hope this helps someone as dense as I am.
I got this option in readonly mode.
So before making any change you have to undeploy/remove deployebles from jboss and then you can modify deployment directory operation

Server configuration is missing in Eclipse

Im using Eclipse Galileo, and have configured it for Apache Tomcat . I have added Apache Tomcat 6.0 to Windows->Server->Runtime Environments, with the following settings:
Tomcat Installation Directory - C:\apache-tomcat-6.0.24\apache-tomcat-6.0.24
JRE - Workbench Default JRE (This points to C:\Program Files\Java\jre6)
Now, I create a Dynamic Web Project, and add a JSP file to it. But, when I run the project I get the following error:
The Tomcat server configuration at \Servers\Tomcat v6.0 Server at localhost-config is missing. Check the server for errors.
Any way to fix this?
Probably, you have some problems with your server's configuration.
Follow these steps to remove and create a new one, it might help you.
In Eclipse
1. Window -> Show view -> Servers (If you cannot see it, you might need to choose Others -> Server)
2. From Server view -> Delete the server which has problems.
3. Right click -> New -> Server : to create a new one
In my case, after new server was created, I get rid of this "localhost-config is missing"
I faced the same problem once. THe reason for this is that even though the server is available, the config files are missing. You can see the server at Windows -> Show view -> Servers. Their configuration files can be seen at Project Explorer -> Servers. For some reason this second mentioned config files were missing.
I simply deleted the existing server and created a new one with this the config files were also created and the problem was solved!
Similar solution is given at here by Emertana EM
java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
In Eclipse Neo
1. Window -> Show view -> Servers
2. Right click on server -> choose Properties
3. From General Tab -> Switch Location
As Yoni already mentioned, you probably deleted the project named "Servers" from your Project Explorer. If config files for the server still present on a file system, the quickest way to restore it will be Right Click in Project Explorer->Import->General->Existing Projects into Workspace, then select the root dir where Servers dir located, set checkbox near "Servers" and finally click Finish. If everything works as expected, you should see the 'Servers' project added to the Project Explorer view and your old config files will be there. Finally, save the tomcat configuration which you had open. You can startup your Tomcat server without errors now.
From project explorer ,just make sure that Servers is not closed
You need to define the server instance in the Servers view.
In the box at the right bottom, press the Servers tab and add the server there. You by the way don't necessarily need to add it through global IDE preferences. It will be automagically added when you define it in Servers view. The preference you've modified just defines default locations, not the whole server instance itself. If you for instance upgrade/move the server, you can change the physical location there.
Once defining the server in the Servers view, you need to add the newly created server instance to the project through its Server and Targeted runtime preference.
If you're not too attached to your current workspace you can create a new workspace, follow BalusC's steps for server creation, and recreate your project in the new workspace.
I got the same error after installing Eclipse Java EE IDE for Web Developers(Juno) but using the workspace of a much older Eclipse installation. When I created a new workspace I was able to get my Tomcat server running without this error.
Did you, by any chance, deleted stuff from your workspace, or moved it around?
When you create a server for the first time, either globally or through the project's "run on server" settings, Eclipse creates a project in the Servers view, as BalusC pointed out. Eclipse stores this server inside your workspace, in a project called Servers. The project needs to be open for tomcat to run.
(If you want, you can store the server settings elsewher. You can right click and open the server instance from the Servers view and configure various parameters and locations)
This happens when Eclipse shuts down incorrectly - delete the server and then re-create it again.
Remove the server from IDE and install again to it.
In my case, the server list was empty for Apache in "Run Configurations" when I opened
Run > Run Configurations
I fixed this by creating a server in the Servers Panel as in other answers:
Window -> Show view -> Servers
Right click -> New -> Server : to create a new one
this worked for me
In the Server's tab in Eclipse, Stop the Tomcat server
Right-click the server and select "Clean..."
Right-click the server again and select "Clean Tomcat Work Directory..."
In the Eclipse, select the top-level menu option, Project > Clean ...
Be sure your project is selected and click Ok
Restart Eclipse
4th Step is most important.
Go to Servers remove the existing server by clicking delete.
Click the blue link to launch the server.
Set a new runtime environment.
Close the Eclipse and launch it again.
Boom it works!

Stop Eclipse restarting my web app on file save

I'm creating a JSF/Facelets web app in Eclipse. I've configured my project to use a Tomcat (6.0) server that is started/stopped by Eclipse.
Whenever I save a file (eg .xhtml) Eclipse restarts the app, trashing my HTTP session. This is annoying, because I'm frequently updating my .xhtml files, and the app doesn't need restarting to detect the changes.
Is there a way to stop Eclipse restarting the app? Specifically, can I configure Eclipse to only restart the app when I save files of a certain type?
In the server View, double click on your Tomcat instance.
This will open the properties of your Tomcat server.
As I am not sure of which parameter will help you to solve your problem, check the following options in the latter view:
Automatic Publishing, option "Override default settings" selected, 1 second for the publishing interval.
In server options, uncheck options "Server modules without publishing" and "publish module contexts to separate XML files".
In the modules tab, for each modules deployed, check that Auto Reload is enabled.
Hope this will help you.
I have always used this and it works fine for me. The context is reloaded only when you change classes or the web descriptor.
In your project structure where you keep .xhtml files which makes eclipse reload the context on changing?
This can happen if you have a builder in Eclipse set to deploy on save. Right click on your project -> properties -> builders
Turn off "Build Automatically"