Although the pain in stomach ulcers is caused by H. pylori, there are several other risk factors that can be called causes of stomach ulcers.
For instance, those with heavy smoking and drinking habits are much more at risk for ulcers than those who drink moderately and don't smoke.
Long-term usage of painkillers can also irritate your stomach lining, leaving you susceptible to ulcers.
Additionally, some chronic diseases can increase the likelihood of having an ulcer.
Finally, although stress is not the cause of stomach ulcers, it is often a contributing factor.