Eclipse java build slower after moving project to GIT - java

I'm new to GIT and recently moved over one of my eclipse java projects.
I noticed a significant delay in the auto build of my project after moving it to GIT. Seems to be some GIT update that happens on every save.
"Updating GIT status for repository GIT"
I'd appreciate any insights.
Eclipse version: Luna RC3 Release (4.4.0RC3)

I'm not sure if this is the culprit but almost every time in the last couple of Eclipse releases I have had issues with the Remote System Explorer which often for some reason gets called when you have source control plugins or aspectj on a project.
For a git project on Luna I turned it off by following:
"Remote System Explorer Operation" causing freeze for couple of seconds
Yes the answer is for a different problem but again I have found the Remote System Explorer to be the culprit (or maybe indirectly I don't know for sure but I do know when I turn it off things get faster). There is also some git specific answers to that referenced SO question but I found I had to turn RSE completely off.

Related

How to fix corrupted Eclipse Indigo JEE?

I installed following plugins in eclipse indigo in following order to start spring development
Spring Tools Suite
M2E (Maven)
after these two installations, it was giving error
jira connector not installed, so I installed the following plugin.
Atlassian Jira Connector
After installing Jira Connector, Eclipse Started showing the following error :
Uninstalled Jira Connector. Still Showing these Problems.
Any help would be appreciated.
Eclipse has major structural problems with uninstalls, which aren't really fixed even the latest luna. But don't worry, there are a lot of workarounds.
What you can do now and in similar situations:
1.
If you can even uninstall something, you won't get back its previous state before the install.
Because of it I use Eclipse normally with a trick: I store my main Eclipse install directory in a git repository, and so I can always switch back with a single command. But it is only a trick.
2.
There is a big chance, that only your workspace directory is damaged, and not your Eclipse. In this case you can solve this problem by reinitializing your workspace: make a backup, delete everything, recreate your workspace directory and finally import again your projects.
(For similar reasons it is also an useful trick to save your workspace metadata in a git repository as well.)
3.
In Eclipse, the menu items are created by modules. If an eclipse module is installed, it creates the changes in its internal configurations which create the menu items.
After a restart, Eclipse tries to restore your gui, and thus re-open its panels. But if a module uninstall is also happened, then its panels aren't restorable, resulting exactly your problem.
So, simply close the bad panels and try to reopen them. Sometimes it also works.
In short: recreate your workspace, it will probably help. And next time, use Eclipse with some good and frequent backup (I suggest git).

Getting rid of org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 that cannot be casted to String

I have just run into the Apache Ivy bug java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String (link) when performing Ant task ivy:config
This morning I tried to install LibraryFolder ClasspathContainer plugin into my Eclipse (STS 3.6.1): installing it caused the above error every time I tried to perform ivy:retrieve.
Even worse, I tried to install IvyDE plugin from Eclipse Marketplace and Eclipse started to crash at a multitude of errors, including JVM crash. Uninstalling both plugins didn't fix. I tried with a new workspace and a blank Eclipse installation, but I eventually had to install my previous Eclipse plugins.
I spent the entire morning trying to fix the mess but I had to restore the previous uncommitted workspace and Eclipse installation, so now I get everything working except for the above error. Ivy worked fine until this morning.
Every Ant task of mine runs in the same JRE as Eclipse (C:\Program Files\Java\jdk1.7.0_60\jre\bin\server\jvm.dll as per sts.ini) because I use a lot the eclipse.refreshLocal task. While I can workaround the problem by removing/commenting eclipse.refreshLocal task and run Ant-Ivy tasks in a standard JRE, I'm asking if there is a workaround to get rid of the error, perhaps by deleting a key file in the workspace's metadata.
As I can read, an Ivy method is passed an object that, guessing from its name, is part of Eclipse configuration. While I'll be waiting for a bugfix, my question is how do I investigate more about the nature of this org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 parameter?
This looks related to Error at building model of new Gradle project for libgdx - which includes a workaround that works for Gradle IDE, so maybe it will work for you.
The relevant Eclipse bug is https://bugs.eclipse.org/bugs/show_bug.cgi?id=445122
[Edit by OP] to simplify life to people having the same problem I'll post the contents of the link and accept the answer
Just add the following lines to eclipse.ini
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dosgi.configuration.area.default=null
-Dosgi.user.area.default=null
-Dosgi.user.area=#user.home
-Dosgi.instance.area.default=null

Eclipse: "Update SVN cache" hangs and locks up

Every time I start eclipse, the program begins doing this "Update SVN cache" thing but it will sit at 0% forever. I cannot perform any operations (such as checking out my projects, building them, or even running them) until this operation is completed (which never happens). Also, whenever I try to type anything in the editor, the whole program freezes and I have to kill the process.
I have been searching google for the answer to this problem for days and have yet to come up with an answer. Has anyone else had a similar problem and found a solution?
I'd like to add that I've tried re installing eclipse, all its plugins, and the jdk from scratch. Nothing seems to be working.
I faced the same issue and I tried to get out of this by disable most of performance setting for SVN in Eclipse:
Windows > Preferences > Team > SVN > Performance
OR (for latest versions): Windows > Preferences > Version Control (Team) > SVN > Performance
Disable: Computing deep outgoing state, Cache, persistent SSH
I just ran into this issue and was able to rescue it. This was with Zend Studio 10.5 which sits on Juno. I have about five projects in my workspace, one of which was open. I couldn't close the project because it was waiting for "Update SVN Cache" to complete.
With Eclipse closed, I went to my open project and via the command line ran "svn cleanup."
In workspace/.metadata/.plugins/org.eclipse.team.svn.core, I had a bunch of temp directories. I created a backup tarball, and then blew them all away.
That didn't fix anything. Finally I tried this:
With Eclipse closed, I went to my project directory and renamed .project to project.xml.
Reopened Eclipse, projects were closed. No SVN Update messages.
Restarted Eclipse.
Opened the project, but Eclipse balked at the missing .project file.
Closed Eclipse.
Went to my project directory and renamed project.xml back to .project.
Restarted Eclipse.
Opened the project. Smooth sailing. Was just able to commit a change without incident.
So far my workspace/.metadata/.plugins/org.eclipse.team.svn.core directory is still empty.
I don't know if the first two things I tried helped out at all, or if just renaming the .project file to force-close the project was all it took. Next time it happens (and there will be a next time) I'll try just force-closing the project and report back.
In my case I realized that a tortoise SVN explorer related windows was somewhere open. It probably locked the cache and eclipse was waiting for the unlock.
Not a direct answer to the question, but this might help for somebody making a similar mistake.
You're not the only one (see this bug report or this forum thread) but it's probably not a bug in Eclipse itself. Next steps:
Get a thread dump to see whether this is a deadlock or a thread is waiting for something that never happens (in the bug report, it hangs in System.loadLibrary()). You can use jconsole for this, it comes with the SDK.
Check all open projects in your workspace (that use SVN) with another SVN tool (command line svn or TurtoiseSVN if you're on windows) to make sure the data structures aren't corrupt.
Get the latest version of Eclipse and/or the SVN plugin
Try a different connector. Some people fare better with the JNI solution javahl, others with the pure-Java SVNKit.
Windows > Preferences > Team > SVN > Performance
Disable: Computing deep outgoing state, Cache, persistent SSH
Go to Preference -> General
Enable : Always run in background
Enable : Show heap status
Workbench Save interval (in minutes):9999
This will show your memory usage in eclipse.
Then edit your eclipse.ini file and change Xms and Xmx values to these:
-launcher.XXMaxPermSize 512m
-Xms1024m
-Xmx1024m
I faced this problem when having the same project in the workspace twice. Make sure you have only one copy of it in the workspace, maybe it helps.
It could be eclipse memory issue. I had similar problem until I did these steps:
Go to Preference -> General and put these values:
This will show your memory usage in eclipse.
Then edit your eclipse.ini file and change Xms and Xmx values to these:
-Xms1024m
-Xmx1024m
Look at the memory status. Hope it will help.
I was also facing similar issue and I got it resolved this by unchecking "Compute deep outgoing state for folders" under Windows->Preferences->Team->SVN->Label Decorations
This topic helped me for solving the problem about my eclipse svn update block.
I am using eclipse mars where this case came.
First I have deleted two projects which I don't needed - to reduce the project number in the workspace.
Changing parameter in eclipse.ini has not helped too.
I had the -clean argument on my eclipse set so I have deleted that too in hope it will work better. It helped a bit so the eclispe was running much longer but not much more. rockfarkas hint here.
What really helped at the end was to mark very fast all projects CtrlA from the project view and close them via the context menu while the SVN cache was still running. The half of them did that the others couldn't but after that I could see that the SVN cache was changing its state and so I could work again. The next step was to close the rest of the projects and open one by one. To this idea I came reading the post of user3096856.
I solved doing this:
-Select the project (or all projects) on your workspace (in eclipse), right click, select from the menu Team > Cleanup
I found an index error in eclipse which blocking the svn. Another project resources and svn repo were in .metadata\.plugins\org.eclipse.core.resources\.projects\ProjectName\4.tree
and other resources.
svn cleanup with the previous answer with 'Team > SVN > Performance' doesn't solve my problem.
'eclipse.exe -clean' will make eclipse unresponsible with 100% cpu.
The only solution was after exit eclipse the manual deleting of org.eclipse.core.resources\.projects\* files.
In my case, for 30 odd minutes it showed just 0 percent completed. I patiently waited since I tried restarting eclipse/machine still was getting the same thing. After 30 minutes, it continued with my svn update operation and completed it successfully.
Patience at times, helps :)
If there is duplicate project from SVN.
Force close eclipse.
Delete the duplicate project from filespace. (Eg: C:\Users\XXX\Workspace\DuplicateProject)
Restarting the eclipse
fixed.
I used Subversive - SVN Team Provider 3.0.0 with SVNKit 1.8.10 as SVN Connctor.
I updated the SVN Connctor to the latest version 1.8.11,and fixed it.
Do you use Maven SCM connector ? Try uninstalling it if you dont need it.
SCM connector is required for Maven SCM checkout, I do not use Maven SCM project checkout, instead I use SubEclipse checkout and convert project to maven using import existing project or convert to Maven project option from the context menu in Eclipse.

Eclipse Plugin Error

A ways back I had tried to install the M2E plugin to experiment with Maven. The installation did not go as planned and it left me feeling like I only "half-installed" it. My reasons for this were numerous, but for instance Maven features that should have been present upon restart were simply not there.
I am now trying to download a plugin called EclEmma which is a code coverage analysis tool. The official website has the installation instructions very well spelled out, and I have followed these instructions verbatim.
In the Help >> Install New Software window, I am able to visit the EclEmma update site and select the plugin I want to install. I then click the Next button, whereby I get the following error:
The operation cannot be completed.
Cannot complete the install because one or more required
items could not be found.
Software currently installed: Shared profile 1.0.0.1320083707332
(SharedProfile_SDKProfile 1.0.0.1320083707332)
Missing requirement: Shared profile 1.0.0.1320083707332
(SharedProfile_SDKProfile 1.0.0.1320083707332) requires 'org.maven.ide.eclipse
[1.0.100.20110804-1717]' but it could not be found
According to EclEmma's site, there are no dependencies or prerequisites for this download, and certainly nothing from Maven.
I think I must have mis-installed M2E all those months ago, and somehow it is causing EclEmma to tweak out during installation.
I have now spent an hour trying to figure out how to un-install M2E, but: (a) when I go to the list of installed plugins, the "Uninstall" button remains disabled and I am unable to get it to become enabled, and (b) most of the documentation I've found online seems to suggest that uninstalling plugins is discouraged and possibly even impossible!
How do uninstall M2E? Or at least disable/deactivate all its features so that I can get EclEmma to install? Of course, I could be misinterpreting the error message above...
Thanks for any help!
You might be able to revert Eclipse to a previous configuration of plugins/features, see Reverting to a previous install configuration

Error with Restlet sample project

I downloaded the sample Restlet project and opened it in Eclipse. I instantly get this error:
Errors occurred during the build.
Errors running builder 'Google WebApp Project Validator' on project 'org.restlet.example.serialization.gae-gwt'.
java.lang.NullPointerException
What am I doing wrong?
I had this same error with my own project. In the Eclipse Project Explorer I right-clicked the project and chose Refresh. That cleared up the error for me.
This is a temporary, but repeatable solution someone on my team found...
Close project
Close Eclipse
Open Eclipse
Open project
I continually had this problem in combination with git. My git repository was in my eclipse workspace ( even though eclipse warns you not to do this ). Deleting the old repository, and creating a new git repository outside of the eclipse workspace, then cloning a fresh copy of my gwt project solved this problem for me. Hope this helps.
I'm also experiencing this error, but thanks to git comparing .classpath I noticed that I had removed a couple of variables from the "Configure Variables" list, but not from the Java Build Path. Once I removed it from the second list, the error was gone.
I got this error when I was using a workspace that was on an NFS and I had the same workspace open on two different vnc sessions. I closed out Eclipse on one vnc session and then restarted eclipse on the other. Then I went to the java build path and editted the gwt sdk and had it use the gwt sdk it was already pointed to and it stopped giving me that error. I didn't actually change the gwt sdk, just went through the motions of doing so. Hope this helps.
The problem was miss configuration of JRE, I just did the following:
Go to Build path configuration, select add Library, JRE System Library, select your JRE.
And there you go...
For me this error seemed to occur after a compile had failed due to lack of memory and eclipse had been restarted. However, after increasing memory (in the eclipse.ini) the problem still persisted. None of the above solutions worked for me.
The bizarre solution I found: our project here uses GWT 2.4, so I switched to 2.5 (which comes with the plugin - window>preferences>google>Web Tookit), re-compiled, switched back to 2.4 and, hey presto, it worked again!
(Another hour of my life I'll never get back!)

Categories

Resources