Thursday, July 19, 2012

Subversion and Shell Script : ^M character

The next assignment was to put all shell scripts, perl scripts and data files under source control and obviously subversion was my choice as we are using the same for source control of application code base.

Everything went smooth initially but we ran into issues while executing shell scripts post svn update on UNIX box. It was quite clear that EOL character introduced while editing our files in Windows development environment converts into the infamous ^M character.

Removing these characters using dos2unix or stripping the character via VI editor using find and replace were not functional solutions in the long run; so I started searching again for something which might be of help in this case and eventually got to the Solution

The subversion properties are a neat solution to such issues; just set the repository property svn:eol-style as native and let subversion maintain the EOF characters by itself.

The newlines of Windows will never be ^M of UNIX.

Java Web Start Issue: Unable to load resource


So the problem here is you are trying to load a java web start application piece and it aborts every time; and the error which is shown
com.sun.deploy.net.FailedDownloadException: Unable to load resource: at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source) at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
clearly indicates that the issue is occurring due to network connection settings...

This one kept me guessing for a couple of days as I thought Google won't be of big help (I know, my bad!!!)
I tried with almost every possible combination of network connection settings but no joy :(

Finally an old friend Stack Overflow came to rescue... and the solution was simple enough...

Modify the way java connects to internet... and that is not what is defined in your internet settings... 
what you need to do is 
A. Locate javacpl.exe in JRE_HOME ( trust me this is the way, if you are Windows 7)
B. Modify the network connection as direct connection and try again!!! 

You won't need to google for the solution again ( i hope...)!!!