Your post leaves a number of questions unanswered. They should be addressed to the attorney that you retain [I agree with Mr. Kaman, especially in San Joaquin or any of the surrounding counties, except, maybe Sacramento].
Those things to discuss are : how did the cops find the weapon, where was the weapon, how did you come into contact with the cops, how did you come into possession of the weapon? List of questions is not in any particular order nor intended to be complete.
The above is not intended as legal advice. The response does not constitute the creation of an attorney client relationship as this forum does not provide for a confidential communication.
You could face three potential felonies, depending on the facts:
Possession of stolen property under Penal Code 496, possession of a stolen loaded firearm (if carried in public) under Penal Code section 12031 or possession of a stolen firearm (if carried concealed on your person) under Penal Code section 12025.
Bottom line? Sit down face to face with a criminal defense attorney that routinely practices in the court where your case will be heard to discuss the situation in greater detail.
You may have factual, legal or other defenses that can only be discovered through a thorough review of the facts with your attorney.