I have the feeling that this John J Coffey is the brother of Andrew Jackson Coffey, who came to San Francisco from New York in the mid-1870s. John Joseph Coffey was born around 1855 in New York City to Charles Coffey and Ann Evers, Irish immigrants. He was an attorney and if he did have a bad divorce in his history, it would not surprise me. Andrew Coffey was the husband of Margaret Gegan of Orange, New Jersey.
I have a history on the Coffey - Gegan family for their time in New York/New Jersey and in San Francisco.