Eclipse: The SVN synchronization information for 'Project' has become corrupt or does not exist - eclipse

For some days now Ecplise (Oxygen 4.7.1a) shows me question marker icons at all folders and files in the project explorer.
I figured out that this is caused by a broken SVN synchronization. Eclipse error log shows The SVN synchronization information for 'Project' has become corrupt or does not exist.
I use Subclipse (latest version) from Eclipse market place.
I tried:
removing and reinstalling Subclipse
removing workspace and check out SVN repo again
Still the same problem.
The curious thing is that SVN connection is ok. I can use Tortoise SVN in Windows explorer and SVN command line, but Subclipse in Eclipse does not work.
Any solutions to this?

I had the same. I tried the one thing in the link recommended by howlger, namely:
"Close Eclipse. Open your workspace folder and then navigate to:
.metadata\.plugins\org.eclipse.core.resources\.projects
There will be a folder for each project, each will have a file named .syncinfo
in it. Delete all of these files and restart Eclipse."
It did not help. But then I tried "Add to Version Control". It complained that the project is already under Version Control, but the question mark is gone and everything seems to work OK now.

Related

How can I prevent TortoiseSVN database locking up?

I have a Windows 7 PC with the latest TortoiseSVN version (1.11.0 x64). Almost every time I want to commit changes to the server, I get the following error:
Commit failed (details follow):
Failed to load properties: sqlite[S5]: database is locked
Error unlocking locked dirs (details follow): sqlite[S5]: database is locked
Another process is blocking the working copy database, or the underlying filesystem does
not support file locking; if the working copy is on a network filesystem, make sure file
locking has been enabled on the file server.
It's easy to fix - I just go to the project root folder, do an SVN cleanup, and then the commit works fine. However, if I want to commit again a few minutes after that, it will most likely fail again and force me to do another cleanup. It gets really annoying.
Is there any way I can prevent these locks from happening? Any settings I can change on TortoiseSVN, or something?
A few more details:
Both my SVN projects and TortoiseSVN itself are placed in my local HDD (no network filesystem), and their folders are excluded from the antivirus software.
The working copy folder is not network shared (nor locally, I'm the only user on that PC).
I don't have Dropbox, Google Drive or any other cloud software sync'ing the folder, either.
It's specific to TortoiseSVN, I never get this error when I commit my changes from Eclipse.
I really don't think it's a TortoiseSVN bug though, I recently updated from version 1.9.6 to 1.11.0 and both had the same issue, if this really was a bug it surely would have been fixed... right? :)
I'm the only developer currently working with the projects (it's not an issue of my local database being out of date, or existing conflicts).
I also think the lock is caused by eclipse plugin. Here some more details about my setup and how I got rid of the problem:
Tortoise: TortoiseSVN 1.12.2, Build 28653 - 64 Bit , 2019/08/04 13:03:09
Subversion: Subversion 1.12.2, -release
Eclipse: Spring Tool Suite Version: 3.9.6.RELEASE (eclipse Eclipse 2018-09 (4.9.0))
SVN-Plugins in eclipse:
Subversive Revision Graph (Optional) 4.0.0.I20160226-1700
Subversive SVN Connectors 6.0.4.I20161211-1700
Subversive SVN Team Provider 4.0.5.I20170425-1700
SVNKit 1.8.14 Implementation (Optional) 6.0.4.I20161211-1700
Subversive SVN Integration for the M2E Project (Optional) 4.0.0.I20160226-1700
After de-installing the last (optional) plugin ("Subversive SVN Integration for the M2E Project") the lock on explorer's tortoise didn't occure anymore.
So I am happy because all functionality I use within eclipse still works, and tortoise in explorer works also. Usually I only use the "team/show annotation" context menu in eclipse, all other SVN stuff I do in explorer through tortoise.
Edit: the problem wasn't actually caused by Eclipse itself. It was either the Subversive plugin, or the SVNKit connector. I've switched to Subclipse and JavaHL, and the problem has completely disappeared. I haven't tried with Subclipse+SVNKit, nor Subversive+JavaHL, I guess one of these combinations will solve the problem too, and the other won't.
It seems that the problem is caused by Eclipse. We usually structure our SVN projects like this:
/trunk
/docs
/etc
/scripts
/source
/pom.xml
/src/main/...
I checkout the whole trunk (or some branch), and then import the source projects into Eclipse.
To manage code changes, I use the SVN sync view in Eclipse, which is more user-friendly (just my opinion) than TortoiseSVN. For changes outside the /source folder I have to use TortoiseSVN, since the files aren't in Eclipse.
The problem is that apparently, Eclipse has some background process which "updates the SVN cache" every few minutes, even if you didn't change anything on that project, just by having it open in the workspace. And it messes up TortoiseSVN, hence the errors unless I perform a cleanup.
There is an option in Eclipse, under Team > SVN > Performance, which allows to disable the SVN status cache... but the last time I tried, it didn't prevent the issue, it only made Eclipse SVN sync slower.
I guess my only choices here are to use different checkout folders for Eclipse and TortoiseSVN (ugh...), or to disable SVN in Eclipse and use always TortoiseSVN (ugh...).

How do I resolve SVN error "E200030: There are unfinished transactions detected in '<CHECKOUT_DIRECTORY>'"?

I have installed a virtual box with Windows 10, Eclipse Mars, Subversive Plugin, SVNKit 1.8.11 and tried to set up some repositories in a configuration I already did successfully in several other environments. The SVN server is a Debian 7 system with Subversion 1.6.17. The following problem occurs only since I set up the above mentioned system:
Check-out: e. g. SVN-Repositories -> expand Repository X -> right-click on trunk -> check-out -> Error occurs: "Checkout operation for 'svn://host/X/trunk' failed. svn: E200030: There are unfinished transactions detected in 'C:\PathToWorkspace\X'"
After this the Subversive plugin stops working, apparently.
Export: same result as check-out
Further investigation got me to a specific file in the repository, which fails loading with "invalid handle" error. It is not in a "strange" path (not too long, no spaces or special characters) and the file itself contains no suspicious characters, just Unix line breaks. Permissions and space on disk are OK. Other respositories with the same properties DO work as expected.
I found posts with similar problems, but none of them applied to mine, apparently. They told me to wipe my workspace directory (which I did), but I just lost all of my settings without solving the problem. After this, I investigated the program directory of Eclipse, whicht didn't bring any more success.
Additionally, the ".svn\wc.db" file is still locked after the failure. Deleting the repository is therefore not possible until closing Eclipse. The directory is not listed in any project list/tree in eclipse like the package explorer, but the directory exists on the disk.
The same repository X still works in every of the other configurations I have. How can I reset these "transactions" in order to repair this? I really would like to avoid completely reinstalling Eclipse or even Windows.
EDIT
I istalled TortoiseSVN 1.16.16.21511 (x64), which perfectly fits to the SVN service version. Same problem.
First, try:
Right-click the project -> Team -> Cleanup.
If that didn't help:
Restart Eclipse -> Team -> Cleanup
I got the same error in my case but in different situation, I was working on the shared folder using both Eclipse and Tortoise SVN, and Eclipse was not able to clean up or do any commit, so I tried to close Eclipse and do clean up from outside using tortoise. it worked.
I finally got it: creating the files "con.cpp" and "con.h" from the project had apparently been rejected by Windows. As far as I remember, "con" is kind of a reserved command or sub command in Windows. Renaming it to something else right in the repository solved the problem.
When you are performing any team operations in eclipse ( such as
commit, update, replace ) and if you cancel the operation in between.
The files involved in the operation are locked.
This is one of the possibilities for the error to appear.
To resolve this in Eclipse.
Right Click on the project -> Team -> Cleanup
If the above process doesn't work
Restart eclipse -> Right Click on the project -> Team -> Cleanup
If this didn't resolve the issue.
Remove these locks explicitly.
Ubuntu
Install svn if you haven't installed.
sudo apt-get install subversion
Then clean the project folder.
svn cleanup /path/to/working-copy
Windows
Get Tortise SVN from this link.
After installing, Right-click on the project folder which is linked to SVN.
There will be an option do SVN cleanup. Click on it. It takes some time to clean up.
Then you are good to go.
This solution worked for me.
i had an error also on the command 'cleanup' on a project, and restarting the eclipse didn't solve.
i had to disconnect the project from svn and re-connect later
I had the same issue, unfortunately, the issue with the device storage running out of memory.
Free up the memory and able to proceed further from the mentioned issue
I have Eclipse Luna with Subversive, and I had two problems to syncronize with the Repository in a Server, E170001 and E20030 (sometines one and sometimes both). My solution was:
1.- In Eclipse: go to to "Window" - "Preferences".
2.- Go to "General" - "Network Connections".
Down, at Proxy Bypass, add de IP of the server where you has the Repository of SVN.

Why does Eclipse Mars not read the project location correctly?

I have a project that has lived in my workspace for some time. It is a git project and I use Egit and cygwin git to manage it. Not sure if that's relevant.
I'm not sure what's messing up eclipse but, in the last day, I have noticed that when I start eclipse, my project is marked as closed. When I looked at the project properties, I saw that eclipse is using the wrong path. Instead of:
C:\cygwin64\home\rcoe\git\projectname
it is now pointing at:
C:\cygwin64\home\rcoe\.gitconfig\projectname
However, my .metadata .location file (which is binary) shows that the location is correct. This file is buried in my workspace, which is located in my Windows home directory.
I tried deleting my project and re-importing it, both as a git project and as a general project, and it opens no problem. I can even close and open eclipse right away and the project stays open. However, give it a few minutes and re-open eclipse and the project now thinks it lives under a non-existent .gitconfig directory. I even tried creating a new workspace and importing my project. Same behaviour.
So, I'm not sure whether this is an Eclipse Mars bug, or Egit, or something else. Has anyone seen this kind of behaviour before?
Edit:
I hit new snags trying to share my project using Eclipse 4.4. The Luna git plugin threw errors about the plugin. So I went back to Mars (4.5) and created a new workspace. The .location file looks like this
#±‹#¼ %–磓¾ 2URI//file:/C:/cygwin64/home/rcoe/git/logprocessing ÀXûó#¼ QóŒ{»wÆ
but when I open Eclipse, the properties of the project looks like:
C:\cygwin64\home\rcoe\.gitconfig\logprocessing
I have no idea what Eclipse is using for its location, if not the .location file.
I found what looks to be a solution. I moved the .gitconfig file from my cygwin home, which is where Eclipse was configured to look for it. On starting Eclipse, I was able to import my project without error. And even though Eclipse's previous error messages implied it wanted to write to the project directory beneath a .gitconfig directory (cf. https://bugs.eclipse.org/bugs/show_bug.cgi?id=473782), Eclipse did nothing of the sort.
I am now able to restart Eclipse, run my unit tests, etc., without error. I am also able to interact with my Git repo using Eclipse, even though Eclipse no longer points at my .gitconfig and so does not know my user.name or user.email properties.
On Windows, it would be best to use git for Windows instead of git in Cygwin. It comes with Git 2.4.6 released 5 days ago.
That way, Eclipse doesn't have to manage two different filesystem, and two different HOME (C:\cygwin64\home\rcoe vs. %USERPROFILE%)

Subclipse complains "Path is not a working copy" after moving workspace

I recently moved my Eclipse workspace directory and now Subclipse complains every time I open a file, dumping to the console something like:
Path is not a working copy directory
svn: '[original (pre-move) directory path]' is not a working copy
No such file or directory
This also happens when I explicitly try to view the history of a file. This persists across SVN cleanups, closing and re-opening Eclipse, etc.
Update, checkin, checkout and so on all seem to work fine, and Tortoise doesn't complain at all, so clearly it's not the SVN metadata that's screwed up, it's some Subclipse-specific metadata. Can anyone tell me how to blow this broken metadata away?
Edited to add: "Team > Disconnect" followed by "Team > Share" doesn't solve the problem.
Edited again to add: I've grepped through the whole .metadata directory and one of the project directories for a unique element of the old path and can't find it anywhere except in .metadata/.log (the error message itself) and some old Findbugs warnings. Very nice.
You need to delete the .syncinfo files. This is easily done (in most cases) by closing and opening Eclipse, however you can also do so manually as in the following:
To delete the cache, close Eclipse. The cache is stored in:
[workspace]/.metadat​a/.plugins/org.eclip​se.core.resources/.p​rojects/PROJECTNAME/​.syncinfo
So you can just find and delete all files named .syncinfo in
[workspace]/.metadat​a/.plugins/org.eclip​se.core.resources/.p​rojects
Quoted from this article: http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=868799
I just did a "Team -> Cleanup" and this exact error went away! I also got this error because I moved between machines and the path wasn't the same.
Using Eclipse 3.6 and the Subversion 1.6 plugin.
Update in 2016: Still works perfectly with Eclipse 4.5.2 and Subclipse 1.10.
Edited to add: Nope, spoke too soon. This doesn't fix it. Some files just seem not to exhibit the problem.
The following seems to solve the problem:
Team > Disconnect.
Quit Eclipse.
Blow away .metadata/.plugins/org.tigris.subversion.subclipse.*.
Restart Eclipse.
Team > Share.
Not sure how the old path was actually being stored in the plugin prefs, but it must have been in there somehwere. It's kind of pathetic of Subclipse to store absolute paths, but apparently it is.
There's a bug filed on this, or at least on the same error message. No context. Fifty cents says it gets rejected.
I'm sure there are many causes with different solutions, but I found the one that worked for me at Dan Wilson's blog. Simply remove the offending folders from the workspace (probably saving them if they have new content), update (letting Subversion recreate the folders), then move the contents back into the fresh folders in your workspace.
I got the error when I tried to rename a class by changing the case from DAO to Dao in Eclipse.
I had to rename it to something like Dao2 and then was able to rename it to Dao.
What worked for me:
Do a "refactor - rename" on the project => after that do it again to rename it back to the original name.
I was having the same error message using subclipse with javahl on a project that is out of the workspace directory. Changing to svnKit has resolved my problem.
Hard to say without further information.
Did you move the whole workspace or just the content?
Also, you can try creating new workspace from scratch and check out the whole project again.
Alternatively, you may try deleting the .metadata directory and relink the project again using File -> import -> existing project into workspace and then relink the SVN data through Team -> Share projects (with an 's'), or maybe just do this last bit after first disconnecting the project from SVN.
Right click the project folder : Team -> Update to Head
This will bring back the directory. Delete it again and Commit
In my case I had the folders of the projects in the Project Explorer and just had to reopen the project
For me, this error message was caused by an out-of-date installation of Subclipse, and the underlying SVNKit and JahaHL libraries. I have been using TortoiseSVN outside of Eclipse to manage my project directories, and my recent upgrade to the 1.8.x series of (Tortoise)SVN tools broke my working copies for Subclipse.
All I had to do to fix, was go to Help->"Install New Software..." and click "Add..." to add a new update site. I picked the latest update site for the latest release on http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA and upgraded Subclipse from there.
Then all my existing projects just worked, and I could reconnect to the one I had already tried disconnecting from without problems.
I have the same problem
I had a new project, added it to SVN. Then everything works as normal, until I try and refactor-rename any java file, I get:
move D:/dev/sk_ws/ge-parent/ge-core/src/main/java/com/skillkash/ge/beans/Skbean.java D:/dev/sk_ws/ge-parent/ge-core/src/main/java/com/skillkash/ge/beans/SkBean.java
Path is not a working copy directory
svn: Path 'D:\dev\sk_ws\ge-parent\ge-core\src\main\java\com\skillkash\ge\beans\SkBean.java' is not a directory
Now the SVN URL is:
svn://qnap/share/MD0_DATA/svn/sk/ge-core/trunk
and the repository root is:
svn://qnap/share/MD0_DATA/svn/sk
Obviously just sharing the project then trying to move a file using subclipe does not work - it must be a bug. I have to do all my refactoring outside eclipse, and hand edit all the files which are affected.
checkout the whole project to a temp dir, then I copied the first level .svn directory and replaced my working copy .svn folder with this.
http://blog.itopia.de/directory-svn-containing-working-copy-admin-area-is-missing/275
It woks for me.
I had added a png file to my project, but I got this error trying to rename or delete it. Cleaning and refreshing the project didn't do anything.
I went into the svn Team Synchronizing perspective, right clicked on the file and deleted it. That solved my problem.
Right click on the project and select Teams -> Switch to another Branch/Tag/Revision.
Select the appropriate Branch/Tag/Revision that the project should be tied to and click OK.
Give Eclipse some time to process the changes.
Restart Eclipse for the changes to take affect.
I just got this error when I was trying to update some .java files. The problem was I was trying to update the files but the folder that contains that files didn't exist in the path so when I sync and update the folder it works at the first try.
So, dont try to sync files, try to sync the folder.
Sometime ago I had a similar issue. Seems that Subclipse (or Eclipse) stores the absolute path of your working copies. The cleanest solution is to export again your repository to the new path.
If you have non-committed code, then you can copy it on top of the clean export (without the .svn folder)
I too had this issue and I simply deleted the project from the workspace (leaving the files on the files system in tact).
I then imported an svn project into the workspace.
Import->SVN->Checkout Project From SVN.
I used my existing repository location to pull the files in.
This issue was caused when I changed Eclipse editions and used a Subclipse plug-in that was a version ahead of what I should have used.
I uninstalled the newer version and installed the correct older version and all worked well.

How do you make eclipse use an existing svn working copy?

I've got a working copy checked out with svn; furthermore, I've created a new project in Eclipse that has the root of the working copy as the project's location. I want to be able to do stuff like compare versions from Eclipse. I have Subclipse 1.4.8, but that doesn't seem to give me what I want. Am I doing something wrong?
i have an svn working copy that also is a project in eclipse. after installing the subclipse plugin i had the same problem, the working copy was not recognized as such.
i just managed by chance to get it recognized as an svn working copy by renaming the project in question and then renaming it back to its old name. not very nice, but it did the trick :-)
There is an option when creating a new project, to use an existing source directory:
New project/ new Java Project / Create project from existing source.
Use that, tell it where your source lives, and it should automatically detect if it's a SVN working copy.
I guess this is not possible with Subclipse as it's given in its documentation that, you can only import an existing svn-managed folder under one condition, according to the doc:
"The only requirement is that your
working copy has to also be a valid
Eclipse project."
So, if you have a working copy that is not a complete eclipse project, Subclipse will not connect it to SVN.
You can right click on the root node of your project and select: Team / Share project
Then you choose SVN, let the default settings and it should work fine!
I am answering this after a long time of the question being asked. I ended up here because I was facing the same problem.
My solution was to create an empty .svn folder at the root folder of the project (in the latest version of svn client tortoise all meta-data is at the root folder). Then did an eclipse refresh and voila it did the trick. I am running subclipse core - 1.8.4.
One step that seemed to work for me, that no one has explicitly mentioned yet: I closed and then re-opened the project. I tried the "rename" trick, above, and that didn't work, but perhaps the poster of that answer also closed the project - they didn't detail exactly what steps they went thru to rename it. (I found you don't have to close the project to rename it, but perhaps they did.)
< /rob>
In my case, I couldn't use an existing copy because I checked out the code using a newer version of Subversion on the command-line and Subclipse 1.4 couldn't recognize it. Upgrading and going through the improved "Share Project" menu resolved the problem.
I got this tip from the forums here:
http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=2380064
I had the same issue and here are the details of the fix.
My Eclipse is "Helios Service Release 1".
I had an SVN checkout on my filesystem, I went to New Java Project, unchecked Use default location, chose the location, went to next step, chose the source folder and said Finish.
The project came up with no disk icon on it. As per few forum posts, right-clicked on the project, went to Team > Share Project, chose SVN, clicked Next, and the option was only to share the files to the SVN Repository for the first time.
I said Cancel, and the option is to make changes to the SVN plug-in settings. Went to Window menu, chose Preferences, browsed Team> SVN. Chose the SVN Connector tab, changed the SVNKit 1.2.3 to SVNKit 1.3.5 and said OK.
Then, right clicked on the project, said Team> SVN, on the next screen, chose the option Use Project Settings and clicked Finish. The disk button came to the project and the SVN URL got displayed on it.
Add the repository to your list of repositories in subclipse by choosing Window->Show View->Other... and choose SVN->SVN Repositories. Put in all the necessary info to connect to the repository.
Next, right click the repository and choose "checkout". If the project doesn't already have an eclipse .project file, you can create a new project from the source. If it already has a .project file, it will import that .project and use that as your eclipse project locally.
It will definitively not work if you use a different version of svn to checkout, that the one that is supported by Eclipse. I had this problem as I used svn 1.6 to checkout but I had an older eclipse version that had only 1.5. Subclipse has its own build-in svn client (Actually, in two flavors if I am not mistaken).
Check that the subclipse version matches the svn client that you used to checkout. You can check the plugin version number for subclipse (Help -> About -> Click on subversion logo) and match it against svn --version
This worked for me:
1) Go to the 'SVN Repository Exploring' perspective and add a folder somewhere above your working copy
2) Close and open the Eclipse projects.
This should then be enough to get them recognized by Subclipse.
I have encountered a similar situation were existing projects would not get associated with the Subversive plugin. Unfortunately, none of the previous suggestions helped (renaming projects etc.). What has helped is removing projects from Eclipse by deleting them -- just the projects from Package Explorer and not the actual directories and files on disc (the deletion prompt has a special checkbox for that, which is unchecked by default) -- and reimporting the deleted projects as existing projects back.
Of course, as mentioned in some of the answers here, the relevant SVN repositories need to be registered with Eclipse before reimporting the projects. Otherwise, there would no repositories to re-associate the projects with.
When you open a versioned project (i.e., a project in SVN working copy) in Eclipse, that was never previously used with Subclipse, you need to perform these steps:
Right-click the project in Project Explorer.
Select Team | Share Project.
At this point Subclipse will tell you that "The project is already configured with SVN repository information". Click Next.
Subclipse automatically recognizes this project as versioned and all the features of the SVN plug-in should become available.