Gary,
I took your java and threw it in a quick test and confirmed that it worked exactly as expected. My SR was converted to a workorder without any errors.
I would suggest you double check the user permissions who is trying to execute this to see if the user has the rights to convert the SR to a WO.
--Bill