Coffee does NOT cause ulcers. 
More Info: Though it was once believed that coffee, spicy foods and other dietary factors caused an ulcer, the actual culprit may be a simple bacterial infection.
What Causes Ulcers?
Ulcers are open sores that appear in the stomach and the duodenum and occur as a result of an imbalance between stomach acid and the mucous that lines the stomach. Though it was once thought that spicy foods, stress, caffeinated beverages, and alcohol consumption caused an ulcer, nine out of ten ulcers are caused by an infection caused from the bacterium Helicobacter pylori. The good news is that this infection is treatable with a simple regimen of antibiotics.  The use of certain medications can also contribute to an ulcer such as aspirin and ibuprofen. 
The Correlation between Coffee Consumption and Ulcers
That is not to say that there is no correlation between coffee consumption and ulcers. The first issue with coffee is its caffeine content. Several studies have indicated that caffeine increases stomach acid production as well as decreases the pressure in the lower esophageal sphincter contributing to gastric reflux. So caffeine in any form whether it is present in coffee or other caffeinated beverages is likely to exacerbate an already present ulcer. But caffeine is not the only component of contention present in coffee. Coffee is unique in that both caffeinated and decaffeinated coffee possess strong acid secretagogue properties. In fact, when tested against caffeine, both caffeinated and decaffeinated coffee produced a much higher acid response. 
The Components in Coffee Responsible for the Strong Acid Secretagogue Properties.
Experts have long recognized that some people are more sensitive to coffee than others and that it seems to increase stomach acid production, which can exacerbate the symptoms of an ulcer. Researchers from the University of Vienna, Austria believe that they have identified the chemical components responsible. During their study, the researchers exposed human stomach cells to various chemical components in coffee. The researchers found that caffeine, catechols, and N-alkanoly-5-hydroxytryptamides all trigger chemical changes in the stomach cells that increase acid production. Interestingly, they also found that darker coffees may have the opposite effect. Darker brews such as espresso, dark roast, and French roast contain, N-methylpyridium (NMP) a substance that blocks the stomach cell’s ability to produce hydrochloric acid. 
If You Already Have Ulcers
So though the answer to the question of whether or not coffee causes an ulcer is no, it can exacerbate one. Thos suffering from an ulcer should avoid anything that increases stomach acid such as coffee, spicy foods, and alcohol to avoid irritating the ulcer further. 
 Scandinavian Journal of Gastroenterolgy, Ostensen, H.
Smoking, alcohol, coffee, and familial factors: any associations with peptic ulcer disease? A clinically and radiologically prospective study.
1985, Volume: 20, No: 10, pages: 1227-1235
 Centers for Disease Control
Helicobacter pylori and Peptic Ulcer Disease
 Mayo Clinic
Peptic Ulcer Causes
 New England Journal of Medicine, Cohen, S.
Gastric acid secretion and lower-esophageal-sphincter pressure in response to coffee and caffeine.
1975, Volume: 293, No: 18, pages: 897-899
American Chemical Society
Brewing up a gentler java: Dark-roasted coffee contains stomach-friendly ingredient.
2010, March 22, San Francisco Annual Meeting American Chemical Society
 The Medical Clinics of North America, Marotta, RB
Diet and Nutrition in Ulcer Disease
1991, Volume: 75, No: 4, pages: 967-979