I changed setModifier(). Now it accepts "static" modifier if the class is already a nested static class. Thanks! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963430#3963430 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963430