Logic

#
I know affirming the consequent is a fallacy, so that any argument with that pattern is invalid. But what what about analytically true premises, or causal premises? Are these not really instances of the fallacy? They seem to take its form, but they don't seem wrong. For example:
1. If John is a bachelor, he is an unmarried man.
2. John’s an unmarried man.
3. Therefore he’s a bachelor.
How can 1 and 2 be true, and 3 be false? Yet it looks like affirming the consequent.
1. X is needed to cause Y.
2. We’ve got Y.
3. Therefore there must have been X.
Again, it seems like the truth of 1 and 2 guarantee the truth of 3.
What am I missing?
Accepted:January 31, 2013

Accepted:

January 31, 2013