Problem with Rational Application Developer and ClearCase Plugin
The Problem: Java project will not compile in Rational Application Developer due to a Internal error – the selected file is a system file that cannot be modified. It will be hidden.
All software has bugs in it but some can drive you crazy and create extra frustration and lose more of your valuable time. After moving all my source code into a new project in RAD I imported all my projects and added them to ClearCase. Next I tried to compile them getting a 3 similar errors. (Note: First lesson read the error carefully. Often while rushing through something to get it complete I don’t read the full error which would save me time.) Anyway when trying to compile I kept on getting this error.
The project was not built due to “Internal error – the selected file is a system file that cannot be modified. It will be hidden.”. Fix the problem, then try refreshing this project and building it since it may be inconsistent.
After about 30 mins of frustration and almost ready to shutdown for the night I found a little file in the directory where the java class files were suppose to be named copyarea.db which was put there by ClearCase. ClearCase makes this file ReadOnly thus not allowing RAD to delete it when it tries to compile my java code.
The Fix: Simple delete the file and refresh the project.
The Reason This Happened: I am not 100% certain but when I dumped all my code into the new project in RAD, ClearCase wanted to add all the code to the source repository so I let it the problem was it selected all the files which included the compiled class files. Since I didn’t want or need those files in ClearCase I chose to remove them from the repository by deleting the classes directory but it left the copyarea.db file in the parent directory. I am no expert on ClearCase but I couldn’t find a real easy way to remove the class files from the ClearCase server so I deleted the files through the ClearCase prospective view in RAD. This unloaded the files from ClearCase but also deletes the files on the local filesystem. If anyone knows a better way to remove them from ClearCase without deleting the files on the local system let me know. Of course like always I made a copy of the files before deleting so I could restore them.
Suggestion: At least name the file that RAD is having problems deleting then I can go straight to the file the error never mentions the name of the file or the directory.
Thanks a lot. It helped me
Under RAD 7 Preferences > Java > Compiler > Building, Filtered Resources has *.launch by default you can add .copyarea.db, this way RAD will not attempt to copy resources it is not allowed to manage.