How to fix error: Cannot retrieve item MySw for widget org.openhab.model.sitemap.Switch

I’m trying to make a switch and when I access the webpage it just gives me an error and resets it. Is this by design?

From Items:
Switch MySw

From sitemap:
Switch item=MySw

The full error:
2015-09-26 15:15:00.475 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item MySw for widget org.openhab.model.sitemap.Switch

I don’t see any reason why this should not work. Do the demo items work for you? Try figuring out the difference then.

I finally gave up and started over. I think there was a syntax error somewhere in the files that was maybe the cause.

Is there a syntax for single line comments on than /* */ ?

Yes, //