Thursday, December 15, 2011

ubuntu - apache start problem after reboot

After reboot of the server if you have trouble starting apache and you get the following error message
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80

This is due to password associated with the SSL certificate. After rebooting, system is trying to start apache as it has been configured that way, but unable to start due to required pass phrase.

There are two options, either remove the pass phrase or kill the process that is binding port 80. Following is the command to find that process


> sudo netstat -ltnp | grep ':80'


This will result into something like 



tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1393/apache2

> kill -9 1393

start apache and provide the pass phrase, you are good to go.

Thursday, December 8, 2011

a4j and IE 9 issues with framework.pack.js file

If you get the following error in IE 9


SCRIPT438: Object doesn't support property or method 'dispatchEvent'
framework.pack.js.faces, line 1754 character 26

SCRIPT16386: No such interface supported

framework.pack.js.faces, line 2373 character 3


This is related to the rich faces library 3.3.3.final

Apply the following to resolve this problem

Extract framework.pack.js from richfaces-impl-3.3.3.Final.jar (path - org\ajax4jsf\)

  • insert the following below line number 1914


Sarissa._SARISSA_IS_IE9 = Sarissa._SARISSA_IS_IE && (parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5))) >= 9;


  • After adding this line, change the following content on line number 2062


}}}}if(!window.DOMParser){if(Sarissa._SARISSA_IS_SAFARI){DOMParser=function(){};

to

}}}}if(!window.DOMParser || Sarissa._SARISSA_IS_IE9){if(Sarissa._SARISSA_IS_SAFARI){DOMParser=function(){};


  • Change the following on line number 2116


if(!window.XMLSerializer && Sarissa.getDomDocument && Sarissa.getDomDocument("","foo",null).xml){XMLSerializer=function(){};

to

if((!window.XMLSerializer || Sarissa._SARISSA_IS_IE9)&& Sarissa.getDomDocument && Sarissa.getDomDocument("","foo",null).xml){XMLSerializer=function(){};


Save the file and add the file back into the richfaces-impl-3.3.3.Final.jar replacing the earlier one.

Deploy and Enjoy