Suppose that a physicist has discovered that the presence of X causes Y in a certain kind of systems. So he goes a step ahead and tries to work on a similar idea of X being the cause of Y in a little different kind of physical systems. Let us suppose that it takes him months to arrive at the results and lo! That relation does not hold here.

Is this result publishable? In general, what kind of failures in research are not failures from the point of view of writing papers about them? For example, if someone starts off hoping to prove the Riemann Hypothesis and discovers that it is not true, that is 100% publishable since a lot is riding on the RH.

Is a lot riding on it the only thing at work in such situations?