I have a code snippet like,
try{
Util.getType(Id);
}catch (DataServiceFault e){
log.error(e.getMessage(), e);
%>
<script type="text/javascript">
location.href = 'developer.jsp';
</script>
<%
}
Some times it catches this exception and some times it doesn’t. Why is that? All the times log says that there is a DataServiceFault.
If the exception names are equal and you don’t reach the catch block it could be a class loader problem. In the case two classes have the same package and name are loaded with different class loaders there are not equal for the runtime.