Sauce in a sealed jar smells off, has it gone bad? I just finished eating a lasagne that I cooked for my family with a glass jar of tomato with ricotta, I have to say my family was not impressed. I went back to check the jar and it did not smell good, at first I thought this was just a natural ricotta smell but now I think it was off!

The jar was sealed and with another year to go before expiry so I am wondering if I have cooked with off ricotta or not?
It is far more likely that the ricotta has gone bad. If your nose picks up off smells, you should generally trust it.  The best time to take a sniff is right when you pop the jar open. We change ricotta's water everyday and try to finish it within a couple of days. I've also seen many freshly openned ricotta (well inside the expiry date) that had gone bad, and didn't look bad. 

Another thing you can do when you cook for others is to taste your food in small samples along the way. That way you get feedback and don't surprise yourself (or others).  Use two spoons (one to pull food sample and dollop on the second spoon that you taste). That way you don't contaminate the food.