An error has occurred ,See the log file Eclipse? [duplicate] - eclipse

When ever I try to launch my eclipse I am getting the following exception an its not coming up.
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Need help.
Thanks.

The /configuration/config.ini file should contain org.eclipse.core.runtime#start in the commaseparated osgi.bundles property. Here is the default osgi.bundles property, maybe it was (accidently) changed during some upgrade:
osgi.bundles=org.eclipse.equinox.common#2:start,org.eclipse.update.configurator#3:start,org.eclipse.core.runtime#start
You can if necessary override it by setting it as VM argument in /eclipse.ini:
-Dosgi.bundles=org.eclipse.equinox.common#2:start,org.eclipse.update.configurator#3:start,org.eclipse.core.runtime#start

I have had the same problem, and here's how I solved it: I added the plugin "org.eclipse.core.runtime" in the "plugins" section on the "configuration" tab of the .product editor. I set it's start level to default and auto-start to true. I removed other plugins. My reasoning was this: Eclipse is complaining that the org.eclipse.core.runtime isn't started, so let's make sure that it does start, and that it's the only plugin that's starting.
My application ran fine after I did this. I then inspected the config.ini to see what changed, and saw that org.eclipse.core.runtime was now changed to org.eclipse.core.runtime#start. This is consistent with BalusC's suggestion, I just did it from the .product editor.

Adding my two cents for those searching for "Ensure that the org.eclipse.core.runtime bundle is resolved and started":
Adding "arbitrary" bundles to the list of bundles just because it seems that they are missing is not always the best solution. Sometimes it can get quite frustrating, because those new plugins might depend on other missing bundles, which need even more bundles and so on...
So, before adding a new dependency to the list of required bundles, make sure you understand why the bundle is needed (the debugger is your friend!).
This question here doesn't provide enough information to make this a valid answer in all cases, but if you encounter the message that the org.eclipse.core.runtime is missing, try setting the eclipse.application.launchDefault system property to false, especially if you try to run an application which is not an "eclipse application" (but maybe just a headless runtime on top of equinox).
This link might come in handy: http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html, look for the eclipse.application.launchDefault system property.

try running it from the Command Line as:
>eclipse -clean
Or, you could run it using java instead of the default javaw, here:
>eclipse -vm c:\jdks\java_1.5\jre\bin\java.exe

I got this problem with Mac OS Lion, after transfer OS/Data from an older machine to a new one.
Solved deleting the old eclipse folder (which I have in Applications folder) and copy eclipse folder again (same version, same unpacked zip file, no changes).

The accepted answer above is correct, except for it's not completely clear.
You need to add the following line to the bottom of the eclipse.ini file:
-Dosgi.bundles=org.eclipse.equinox.common#2:start,org.eclipse.update.configurator#3:start,org.eclipse.core.runtime#

For me installing the jdk 1.8 solved the issue.

This error happen cause you deleted the config.ini file while you deleted the plugins. So, when it can not find configuration in config.ini when eclipse lauching, then it use default configuration which is not fit with your os. The following steps solve you problem:
Delete setting in configuration folder.
create a new config.ini file.
copy following setting and save:
osgi.splashPath = platform:/base/plugins/org.eclipse.platform
osgi.bundles=org.eclipse.equinox.common#2:start, org.eclipse.update.configurator#3:start, org.eclipse.core.runtime#start
eclipse.product=org.eclipse.sdk.ide
osgi.instance.area.default=#user.home/workspace
eof=eof
restart eclipse.

For me, what eventually did the trick was adding -clean at the start of eclipse.ini

In the Windows environment, running Eclipse as Administrator solved the issue. (Right click>Run as Administrator)

if you face this in 2021 or later better check that you have jdk 11 installed and is configured correctly. I downloaded the latest eclipse-jee-2021-06-R-win32-x86_64 and on running i got this issue. I checked the java version on my system and it was: 1.8 I downloaded the latest OpenJDK 11 configured it (JAVA_HOME in an environment variable and <JAVAHOME/bin entry in PATH environment varaible>) and the issue is gone.

I've been downloaded the "SDK ADT Bundle for Windows" adt-bundle-windows-x86.zip to "Documents and settings\myusername\My Documents\Downloads" and tried to unzip to a folder c:\Android
When all seems to be decompressed I saw some files where missing in the destination folder including the eclipse.ini.
I solved this by renaming adt-bundle-windows-x86.zip to a short name adt.zip, moving it to c:\ and repeating the decompression.
All is due to bad treatment of long file-names in windows

For those coming here having tried to run the application from a Windows command line, or batch file, and possibly those receiving the stated error message in a Rational Clear Case log file:
The PATH is very important to the processing of config files, and the following was required for me:
START "Clear Case" /D"C:\Program Files (x86)\Rational\ClearQuest\rcp\" "C:\Program Files (x86)\Rational\ClearQuest\rcp\clearquest.exe"
note the /D option.

Adding to a well-populated page:
I had this come up when I tried to move the eclipse installation to a different location on my drive. I tried grepping for the old directory path in the package, thinking perhaps I could fix it with sed, but the path was written in multiple formats and even found in binary files. I gave up, made a fresh install, and re-installed my plugins.
(Here's a question about moving an eclipse installation, but it didn't give me enough to make it work.)

I tried all the methods proposed here. I finally deleted the eclipse folder, extracted it again and now everything works perfectly.

I received this message trying to run STS 3.7.0 on java 6 jdk, after pointing to java jdk 7 (-vm param in STS.ini) the issue disappeared.

I got this problem somewhere on the logs and I saw that my java version was not 1.8 somehow. Upgrading it again to 1.8 solved my problem.

Download new eclipse or spring suite and open old workspace into new eclipse or STS

shawn: My eclipse have started when I extended bundles:
osgi.bundles=org.eclipse.equinox.common#2:start, org.eclipse.update.configurator#3:start, org.eclipse.core.runtime#start, org.eclipse.equinox.ds#start, org.eclipse.equinox.event#start

If none of the above answers works for you, try the following:
Get the "org.eclipse.equinox.simpleconfigurator" and the "org.eclipse.update" folders found under the "eclipse\configuration" from a working Eclipse instance (can be the stock Eclipse downloaded from their website) and replace them in your Eclipse installation directory.
This fixed it for me.

I tried all the answers above, but none of them worked for me, so I was forced to try something else. I just removed the whole package with settings org.eclipse.Java and it worked fine, starts again like before and even keeps all settings like color themes and others. Worked like charm.
On Linux or Mac go to /home/{your_user_name}/.var/app and run the following command:
rm -r org.eclipse.Java
On Windows just find the same directory and move it to Trash.
After this is done, the settings and the errors are deleted, so Eclipse will start and re-create them with the proper settings.
When Eclipse starts it will ask for the workspace directory. When specified, everything works like before.

The only thing that worked for me was to run Eclipse using JAVA from the command line.
C:\Development_Tools\eclipse\java-2021-092\eclipse>java -jar plugins/org.eclipse.equinox.launcher_1.6.300.v20210813-1054.jar
This was executed from the folder where eclipse.exe resides.
I made my own shortcut for this and now use that shortcut instead of the one produced when installing Eclipse from their website.

in my opinion, if after trying all solution nothing wors then simply delete eclipse folder from your C://use/{pc}/eclipse and then again install the same eclipse . You will get all your data no need to worry.
This happens because of unexpected shutdown of your eclipse

delete processcenter.ini at location similar to:
C:\IBM\IntegrationDesigner\v8.5\iid
and then once IDE comes up, go to windows preference and put in the correct URL.

Related

Plugins won't install on Eclipse

I am trying to install subversive and checkstyle onto Eclipse IDE for Java Developers however the following message appears:
"Cannot complete the install because one or more required items could not be found.
Software currently installed: Shared profile 1.0.0.1316138460759 (SharedProfile_epp.package.java 1.0.0.1316138460759)
Missing requirement: Shared profile 1.0.0.1316138460759 (SharedProfile_epp.package.java 1.0.0.1316138460759) requires 'org.maven.ide.eclipse [1.0.100.20110804-1717]' but it could not be found"
What does it mean? Is there another way to install them as I need both plugins for my course.
Please help and thank you :)
Try running Eclipse as administrator, I just had the same issue and this worked for me.
There's an alternative to running Eclipse as an administrator: you can manually give write permissions to your "eclipse" folder for all users (or just your current user).
This way Windows/UAC won't pop up the security question that you see when you run programs as admin.
Hi I had the same problem just yesterday.
I was uploading SDK for android and found your question in a google search.
I reverted back to an older version of eclipse. Link to older version of eclipse
This solved it for me.
Remember to delete eclips from your program files. You do this by just physically deleting the file from program files (not through uninstall). Then also make sure you delete your workbench. This is a file called workbench in your docs. Well mine was in my docs, it could be somewhere else on your system.
I am using windows 7.
Best of luck.
I had this problem, but I had to dig harder to fix it.
The source of my problem was the shortcut to launch Eclipse had this in the Target field:
"C:\Program Files\eclipse\eclipse.exe" -configuration C:\Program
Files\eclipse\configuration
The problem with this is that without double quotes around the "-configuration C:\Program Files\eclipse\configuration" section it would hit that space in 'Program Files' and use C:\Program for storing configuration some of the time. Generally, if you have C:\Program you should make sure programs didn't put random files in there by mistake.
To fix this I had to move the configuration files from C:\Program to C:\Program Files\eclipse\configuration, picking and choosing along the way. Change the Target field to:
"C:\Program Files\eclipse\eclipse.exe" "-configuration C:\Program
Files\eclipse\configuration"
and I was good to go.
I had the same problem, and I solved it by setting
"Contact all update sites during install to find required software"
to true.
(I used the Eclipse install manager, in
Eclipse IDE for Java Developers,
Version: Indigo Service Release 1
)
In my case, updating to the latest version of Eclipse (Juno) did the trick. Perhaps your add-on won't run on your version?
I think you need the maven plugin in order to install your plugin. If that's the case, you can follow this this instruction to install it.
Use eclipse update manager to install the plugins.. Then it will automatically select dependent plugins..You dont need to bother about dependent plugins in that case
All I had to do was completely open up full permissions for all users to the directory. This is dangerous if you have a multi-user system but Windows 7 seems to default to giving processes not very high permission levels; some processes (such as Eclipse Updated) don't know how to deal with this and request user permission, so they just bomb out. Easy fix: full control to all users and processes for the Eclipse Directory.

Eclipse is not starting

Eclipse starts from terminal but when i try to start it from gui then it says java runtime environment don't found.
Environment variables are:
JAVA_HOME="/opt/jdk1.6.0_20"
PATH=$PATH:"/opt/jdk1.6.0_20/bin"
And one more thing so far i normally copy jre folder from jdk to eclipse directory, which works fine but what is actual way. i mean this won't be standard way to do that.
Thanks in advance
And one more thing so far i normally
copy jre folder from jdk to eclipse
directory, which works fine
No, this is not necessary or desirable. You should not have to do any such thing.
If you open up a command shell and type "java -version", what comes back?
Edit eclipse.ini (from the Eclipse folder) and add the following at the beginning:
-vm
C:/Java/jdk1.6.0_22/bin
where C:/Java/jdk1.6.0_22/bin should be your path to the java bin directory.
Keep it on two lines.
Well the reason eclipse won't start from GUI despite of the fact that environment variables are set, is:
You have set the variable in bashrc or bash_profile, these two are for the specific logged in user, but you also need to set in etc/profile which is for all the users.
So once you set the PATH and JAVA_HOME in etc/profile it will launch from GUI.
Worked for me! ;)
Faced the same problem and the suggestion addressed my problem!
After setting /etc/profile as indicated in the link below, I logged out and logged back in for GUI based Eclipse to work.
http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/

Eclipse doesn't load plugins in the dropins folder

I just downloaded Eclipse SDK 3.5.1 and want to install some add ons such as GEF, EMF, etc.
I downloaded all the zip files for everything I needed and decided to install them in the dropins folder. I read http://wiki.eclipse.org/Equinox_p2_Getting_Started and structured my dropin folder as specified:
eclipse/
dropins/
emf/
eclipse/
features/
plugins/
gef/
eclipse/
features/
plugins/
... etc ...
When I start up Eclipse it does not recognize any of the features or plugins I have put into the structure above. Any ideas?
This is probably a bit late to help you, but maybe it will help somebody else. I had a similar problem, so I posted a question to the Eclipse Community Forums asking about how to get a report about missing dependencies. Mickael Istria's helpful reply is shown below for those who aren't members of that forum:
You can start or diag the OSGi Console and try to start the bundle manually. The console will print you some warnings. See http://eclipse.org/equinox/documents/quickstart.php and for more details.
shell> eclipse -console
[...Eclipse starts up...]
osgi> diag your.unresolved.bundle
[...shows you unresolved constraints...]
In my case, I tried several directory structures that I thought should work, before I found one that did:
dropins/
myPlugin
plugins/
depPluginDir1/*
depPluginDir2/*
Coming back years later to solve a similar problem..., I found the following web pages to be helpful: Where is My Bundle, Plug-ins are not picked up from the dropins/ folder.
First of all, run eclipse with -clean to ensure p2 fully rescans the dropins directory and sees your plugins.
If it still doesn't load you can use p2 debugging to see what the problem is also. For some strange reason p2 doesn't log dropins issues unless you explicitly turn it on with the following steps:
Create an .options file in the eclipse folder where you start up Eclipse with the following content:
org.eclipse.equinox.p2.core/debug=true
org.eclipse.equinox.p2.core/reconciler=true
Then run eclipse with the following arguments (last argument is the path to the .options file you just created):
eclipse -clean -console -consoleLog -debug /path/to/.options
PS, I have created this bugzilla to request it be turned on as a default. You can vote/track making this logging the default there.
PPS, #kc2001's suggestion is a good one also once you have narrowed down on what plugin has the issue and you want to troubleshoot it more.
Some relevant links:
http://wiki.eclipse.org/Equinox_p2_Getting_Started
http://www.eclipse.org/forums/index.php/m/116635/
http://www-01.ibm.com/support/docview.wss?uid=swg21428463
I suggest that you try to install those features via the update manager. EMF and GEF are standard features from Eclipse.org, there's no reason not to install them in Eclipse's main p2 repository folder (it is easy to uninstall them, in case that is your concern).
Have a look at the error log view (Window -> Show View -> Error Log) to see why they didn't load. My guess is that they are missing a dependency, but without more information it is difficult to answer your question. I also suggest looking at Help -> About Eclipse -> Installation Details to see what exactly is installed.
Something that has just solved this very same issue for me: start eclipse with the command line parameters -clean -console -consoleLog. The weird thing: with -clean -console, it didn't work. Only after I added -consoleLog, the bundles were recognized.
This ended up being an issue with Eclipse for me. Placing the plugin jar in each of the folders suggested, running as admin, etc. didn't work.
What did solve it was downgrading from a Juno package to Indigo. You can find older versions of Eclipse here.
The local archive plug-ins work if you have downloaded an update site plug-in. In that case the dropins might not work.
About the dropin structure, it always worked for me, but I never use the eclipse folder inside my own ones, only the plugins and features. Did you extract the zip file to that structure?
If yes, it should be worth checking the Error log after Eclipse started, there might be some unresolved dependecies listed.
Don't place the zip files manually like that.
Use the wizard within Eclipse to install a local archive plug-in.

eclipse stuck when building workspace

I am using eclipse 3.4.1 Java EE under Vista. It seems to like getting stuck when building my workspace. Canceling the build doesn't seem to do anything as well.
Why is this happening and how do I fix the problem?
I was able to fix this with the following:
First, exit Eclipse. Then temporarily move the following .projects folder to a safe location:
mv .metadata\.plugins\org.eclipse.core.resources\.projects projects
Start and exit Eclipse, then move the .projects folder back to where it was originally:
mv projects .metadata\.plugins\org.eclipse.core.resources\.projects
Use at your own risk, of course.
Some time it's very helpful to execute eclipse from command line with "-clean" parameter to enforce it produce clean up for workspace.
eclipse -clean did not work but following did
eclipse -clean -clearPersistedState
Eclipse often freezes for me at 44% if I'm debugging Android over USB.
When disconnecting the device, Eclipse starts.
The accepted answer allowed me to get Eclipse started again, but it seems that the projects lost their metadata. (E.g., all the Git/Gradle/Spring icons disappeared from the project names.) I have a lot of projects in there, and I didn't want to have to import them all over again.
So here's what worked for me under Kepler. YMMV but I wanted to record this just in case it helps somebody.
Step 1. Temporarily move the .projects file out of the way:
$ cd .metadata/.plugins/org.eclipse.core.resources
$ mv .projects .projects.bak
Step 2. Then start Eclipse. The metadata will be missing, but at least Eclipse starts without getting stuck.
Step 3. Close Eclipse.
Step 4. Revert the .projects.bak file to its original name:
$ mv .projects.bak .projects
Step 5. Restart Eclipse. It may build some stuff, but this time it should get through. (At least it did for me.)
Step1:
Open project directory and edit .project file, remove following lines to disable java script validation.
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
Save file.
Step 2:
Go to Eclipse installed directory and open eclipse.ini(or sts.in if you have STS), change xms and xmx value based on your RAM size of your computer.
-Xms512m
-Xmx1024m
-XX:MaxPermSize=256m
OR: in windows, go to eclipse shortcut in desktop, right click->properties-> add following:
C:\software\eclipse\sts-3.6.2.RELEASE\STS.exe -clean -Xms512m -Xmx1024m
Run Eclipse.
Go to Eclipse->windows->preference->Validation, enable Suspend all validators. Do this if you don't want do any validation listed in the list given in Validator panel.
I have this problem whe I have too much maven projects open at once. What I tend to do is:
Restart eclipse (sometimes I need to kill eclipse)
Disable automatic build immediatly (project > uncheck Build automatically)
Right click the project(s) I want to have rebuild
Close unrelated projects
Re-enable automatic build
This enables a functioning rebuild in 99% off the cases in my workspace.
You may want to take a look at How to report a deadlock. You may also want to check the Error view and/or the error log ([workspace]/.metadata/.log). If that doesn't help, you'll probably need to include more info about which plugins you have installed and which projects you have. Can you create a minimal workspace which reproduces the problem?
I faced Similar issue in Eclipse Indigo. I changed the HeapSize it started working correctly. I just added following eclipse.ini file
-vmargs
-Xms1024m
-Xmx1024m
It worked fine after increasing the VM size
The only solution for me (Luna 4.4.1) was this:
Go to Project Properties > Builders and then uncheck the Javascript Validator.
I had same issue with my Eclipse and as a solution, I created new project, copied all resources manually (using windows copy/paste) to new project, deleted old project and that's it.
Sometimes, this happens due to improper System shutdown and Eclipse workspace started facing similar issues.
Hope it will work.
Unselect automatic build using Eclipse-> Windows->Preferences helps fixing this issue.
Deleting some of the JDT indexes (in .metadata.plugins\org.eclipse.jdt.core), particularly the big files, often fix or ease the problem for me.
I just had the same problem.
By using Task Manager to kill the build process and exiting Eclipse with no projects open, I was able to get back into Eclipse and clean the project without opening it. I then restarted Eclipse again,loaded my project and all OK.
I've found that this might also happen if you rebuild a workspace with a project containing a lot of image data (such as a dedicated images project). Might be best to put something like that into its own workspace and handle it separately to the rest of the projects you deal with.
If you can't, then don't clean that project when you clean and rebuild. Only rebuild when necessary.
In my case problem arise after importing downloaded project - stuck at 80% build. Solved by adding write permissions for group to project's files (Ubuntu 12.04).
In my case it helped to remove the source folders from my favorites in the Windows Explorer (Windows 8.0). It seems that the build was not actually stuck, but triggered in some kind of infinite loop (as mentioned here - Bug 342931).
Sometimes the problem seems to be fixed by killing other programs which have files open from the project folder.
Looking at the logs in [workspace]/.metadata/.log provided useful information for me.
Turned out there was a java.lang.OutOfMemoryError: PermGen space error when the workspace build would hang.
This can be edited in the eclipse.ini or sts.ini(If you are using SpringSource Tool Suite) file.
I faced the same problem when I tried to install Angular.js with bower in my project. I seems bower has lots of javascript files it downloaded automatically which caused my IDE to stuck in validation process for a long time. So, I solved this problem this way,
I first installed tern.js 0.9.0.
Then I went to the project properties, selected tern script path
included only the path I needed for validation, My project's
javascript folder. I excluded other path like placeholders,
Angular.js files, Jquery files.
I selected the Javascript from the properties again and did the same
things in include path's source.
My IDE currently working without freezing. I took help from there. Tern
I guess it can be helpful, where any IDE stuck due to lots of Javascript file.
I tried lots of these suggestions, but the only thing that finally worked for me was creating a new workspace, and freshly checking out all my projects into that folder. Then it worked fine ;-)
I just restarted eclipse and it started working the next time.
Refresh all the projects u want to build.
Worked
Restart eclipse.
It worked for me several times.
I was able to solve this by removing extra folder that Eclipse had created in my eclipse installation folder. I didn't install and I was using Eclilpse Neon 3 with Spring Tool suite also installed. But, when I looked into extracted eclipse installation, I had C: folder which had some folder structure. It was mirror image of my Downloads folder. I removed it and restarted.
It worked for me!
None of the the answers here worked for me. What worked was to delete the following folder
C:\Users\your username\workspace\project
name.metadata.plugins\org.eclipse.core.resources.projects\project
name\.indexes
Rather than debug and find the exact root cause(s) for this, I just deleted the projects and the metadata folder. Eclipse will rebuild the .metadata file the next time it's launched.
I then pulled in the latest project code and the problem was solved. It was more work as I had to reconfigure everything, including my servers, but build workspace had been stopping at 50% for anywhere from 3 to 5 minutes before it would completely finish, so it was worth the effort.
Also, I've found that with Eclipse, if you stop the build workspace before it completes and shut down Eclipse if that hangs up everything, you can really mess up your configuration and waste lots of time trying to get it stable again. I'm using Eclipse Oxygen, but I've had this happen in all the versions of Eclipse I've used, so I really try to avoid it, if possible.
Inside the project folder open .project file. There is a bad entry and it might help
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
If you are using Maven as a build tool you might want to:
Close eclipse
Delete dependency directories located in .m2/repository/ - in
Linux
it's located under Home directory and in Windows it should be in c:\Users<YourUsername>.m2 (replace '' with your
username)
Start Eclipse and enjoy normal work :)
That helped me resolve this issue and I hope it helps you too. :)
Cheers!
P.S. I've edited my answer (as #howlger asked) where it was also suggested to delete .eclipse and .p2 folders as it can do harm (although it did NOT in my case + I had to reinstall some of plugins I'm using).
In case there is a problem on start when building your project disable the build automatically from menu. Project -> Build Automatically. This solved my problem while more sophisticated solutions could not.

Can't add server to a moved workspace

I have this workspace downloaded off the web and I try running it on a tomcat server from a fresh installation of Eclipse Ganymede. This particular project came with its own workspace.
When I select Tomcat v6.0 I get a message
Cannot create a server using the selected type
Older tomcat versions are available, though.
I guess I have to recreate some configuration setting. The question is which one? This seems to be some odd error as creating a new dynamic web project lets me configure tomcat for both of them
I had a similar problem, but my solution is a little simpler. The problem was causesd by renaming the original folder that was referenced by the server definition.
Go to Window/Preferences/Server/Runtime Environments, remove the broken reference. Then, click 'Add' to create a new reference, select the appropriate tomcat version, click next and you'll see the incorrect path reference. Fix it. Move on.
I had this same problem on Ubuntu 8.10 with Ganymede and Tomcat6. This appears to be some sort of bug with Eclipse. If you try and create a server, and it barfs, you can't create another tomcat6 server. To correct this problem, do the following:
close eclipse
go to the {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings directory and remove a file called org.eclipse.wst.server.core.prefs.
start eclipse
add your tomcat6 server in the server tab
kotfu
#id thanks for the solution but something is also hidden in org.eclipse.jst.server.tomcat.core.prefs
So in order to solve the problem
close eclipse
go to {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings
remove the files org.eclipse.wst.server.core.prefs and org.eclipse.jst.server.tomcat.core.prefs
Tomcat 5.5
I order to be able to use the tomcat5.5 server you need to have a writeable catalina.policy file as mentioned in
http://dev.eclipse.org/newslists/news.eclipse.webtools/msg16795.html (= add a READ and WRITE permissions to the files in directory "{$tomcat.home}/conf" (chmod -vR a+rw {$tomcat.home}/conf/*). To be more specific, on the file "catalina.policy". After that, the Tomcat server can be added in the Eclipse servers)
(dead link) http://webui.sourcelabs.com/eclipse/issues/239179
and to have the tomcat5.5 stopped before entering eclipse and started afterwards.
Tomcat 6
In order to be able to use the tomcat6 server the proper solution is to have a user instance of the tomcat6 server as described in
/usr/share/doc/tomcat6-common/RUNNING.txt.gz
RUNNING.txt (on the WEB)
My configuration is Debian/Sid, Eclipse 3.4.1. Ganymede
The error view really is key. There is a lot of detail in there -- if necessary, right-click on the entries and copy their contents into your favorite text editor. One problem that can come up, for instance, is that if you have a server configuration already in place, and one of the configuration XML files is unparseable, the server can't be added. This happened to me this evening -- my <Context> element had a linebreak in it, so it was <C(linebreak)ontext>. This prevented Eclipse from recreating the server configuration.
i finally got mine to work with the default Ubuntu 8.10 tomcat. (the debug command-line on eclipse is a wonderful thing) First i had to make a couple of symbolic links and then change the permissions to a file. (you might want to think twice about changing the permissions depending on your configuration, but if eclipse can't read the file it throws and exception and the gui won't let you continue)
sudo ln -s /etc/tomcat6 /usr/share/tomcat6/conf
sudo ln -s /etc/tomcat6/policy.d/03catalina.policy /usr/share/tomcat6/conf/catalina.policy
sudo chmod a+r /usr/share/tomcat6/conf/tomcat-users.xml
Hum it can tricky. Bring the "server" view. If your project has already been deployed, remove it from the server to clean the binding between your project and the server.
Or you can right-click on your project in the project explorer and choose debug on the server. If you don't done it already, Eclipse should ask you to create a server runtime and here you can specify Tomcat 6 and specify the location of your server installation.
You can also see the "problems" view to see any problm in the project imported like the JDK etc...
Look in the error view. If you tried to set one up once and failed, Eclipse seems to try and look there again later just before allowing you to create a new one. If you've deleted the folder or its not there any more, you need to replace it so that you can proceed.
The only way I found to use the Tomcat 6 is changing the ownership of the Tomcat directory to my user. It seems that is not enough to have r/w permissions.
BTW, removing org.eclipse.wst.server.core.prefs erases you workspace configuration.
I had had same problem until I went to tomcat6 configuration directory and added ownership to my user in addition to root:
cd /usr/share/tomcat6/conf
chown root:myusername ./*
chmod 777 ./*
You can choose some better chmod for security, 777 is just a quick brutal fix.
I have Eclipse 3.5 (Galileo) + Fedora 12 + Tomcat 6 extracted from tar(which is why Eclipse could not access it). Eclipse had been complaining "Cannot create a server using the selected type".
What version of Eclipse? Europa? Ganymede?
What do you mean by workspace? An Eclipse workspace is not something you deploy, it holds your projects.
You will need to generate a WAR file (or the folder of files that would comprise the WAR file), a project would typically include an ANT or Maven build script to do this, or if the project used Eclipse's Dynamic Web Project type there might be a 'generate WAR' option somewhere. Without further details I can't help any more.
Adding a new dynamic web project to the workspace seems to 'unlock' the feature.
Changing the ownership to my user worked for me.
In my case, it was the corrupted Tomcat configuration files. Eclipse log was saying:
org.eclipse.core.runtime.CoreException:
Could not load the Tomcat server configuration at
C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.14\conf.
The configuration may be corrupt or incomplete.
Got a new Tomcat distribution, removed the old one and all good now.
Finally got this problem solved on my system.
1) got rid of the apt-gotten tomcats
2) installed a typical tomcat from bins at tomcat.apache.org
3) got rid of my openjdk
4) installed the sun jdk (apt-get)
5) removed my web projects in eclipse
6) noticed that when adding a web project you can set "Target Runtime" - I tried setting it to Tomcat 6 and it let me know there was a problem
Maybe none of the above mattered, but here's what might have mattered:
7) KICKER: Window -> Preferences -> Server - Runtime Environments. Removed any crappy runtime environments here, and added the path to my newly installed tomcat.
This Question is maybe old. But I just ran into this problem. My project was not recognized as a web project (no globe icon in Eclipse ).
Suppose you use maven plugin , it failed to convert to web project with command
mvn eclipse:eclipse -Dwtpversion=1.5
In package Explorer, right-click on the project / configure / Convert to Java Facets project/ Dynamic Web project in Eclipse
Et Voilà
Check the .project file at the root before and after the convert.
You will see new natures.
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
Instead of deleting config settings files, just go to Preferences -> Server -> Runtime Environments and remove the "forgotten" environment....
Thanks a lot this answer working for me..
I had a similar problem, but my solution is a little simpler. The problem was causesd by renaming the original folder that was referenced by the server definition.
Go to Window/Preferences/Server/Runtime Environments, remove the broken reference. Then, click 'Add' to create a new reference, select the appropriate tomcat version, click next and you'll see the incorrect path reference. Fix it. Move on.