I failed to install XWiki on GlassFish 3 exactly because of
this bug. It looks like bug in Java 6, not XWiki.
So, currently I use Java 5, GlassFish 2 (but look straight on
Caucho Resin), and everything goes fine.
--
If you want to get to the top, you have to start at the bottom