Pages

Friday, December 2, 2011

SSL Certificate err

{http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1649) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1612) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1595) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1172) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149) at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)


Comments:
  1. Check the truststore path in a .properties file it should be on correct location?
  2. You can try (double escape \) in that path for windows machine.

Thursday, October 20, 2011

Detecting an undefined object in JavaScript


typeof allows the identifier to never been declared before
if (typeof obj == "undefined")
instead of
if(obj == null) // will throw an error due to never declared


Wednesday, August 31, 2011

How to stop caching with jQuery ($.get(), $.ajax() etc) and javascript



To make it unique for each passes, we can place in a random number behind the url as shown below
$.get('remoteUrl.do?'+Math.random()+, function(data){
	$('#msg'+id).html(data);
}, 'html');


Set cache:false 
$.ajax({
	url: 'remoteUrl.do',
	cache: false,
	success: function(data){
		$('#resultDiv').append(data);
	} }); 
$.ajaxSetup({
	cache: false
});
Disable caching using html meta tag:

org.hibernate.PropertyAccessException

nested exception is org.hibernate.PropertyAccessException: Exception occurred inside getter of Hibernate Object

Reason:
  • Nullable database column was mapped to a primitive type property
  • The Hibernate type is not castable to the property type (or vice-versa)

  • Wednesday, July 13, 2011

    Tomcat - JDBC driver unregisted when the web application stops

    SEVERE: A web application registered the JBDC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stoppe

    Solution:
    Google
     

    Java-Struts