Tuesday, July 6, 2010

Two trivial Issues

Today I stumbled upon two "insignificant" issues which I have faced before but it took reasonable amount of time to "re-discover" the solution. One good way of "not forgetting" quick solution to known problems is blogging about them.

Issue #1
After generating the JAX RPC client artifacts for consuming a service I was getting an error: java.lang.UnsupportedClassVersionError. This exception can occur when the source is built targeting a JDK(in my case JDK 1.5) that is not supported by the JDK(JDK 1.4) attempting to run it.
I simply added one attribute 'source = "1.4"' in the <javac> tag of the ant script which is used to generate and compile the artifacts and that solved the problem.

Issue #2
I am using CCRC 7.1 as the source control tool for my project.
I was having a perfect eclipse workspace and suddenly one of the project module started complaining :
'Internal error - the selected file is a system file that cannot be modified. It will be hidden.'
It does appear because it automatically copies the CCRC internal file .copyarea.db in the bin (build target) directory which confuses the build process.
The solution:
1. In Window-> Preferences menu, go to Java -> Compiler -> Building item.
2. Expand the Output folder and add .copyarea.db to the Filtered Resources of the output folder. My edit field looked like this: *.launch, .copyarea.db
3. Remove the .copyarea.db files from your java build output directories such as /<project>/bin/ and /<project>/build.
4. Refresh and rebuild each project that is displaying this error.

Now we can talk about productivity :)