java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.ElementNSImpl cannot be cast toI tried many different options:
<option>-keep public class my.jaxb.classes.** { public protected private *; }</option>
<option>-keepattributes *Annotation*</option>but nothing helped (btw, you do have to use those two options from above, but they are not enough on their own, and it took me almost an hour to figure out what was happening).
Only after I added
<option>-keepattributes Signature</option>everything started behaving correctly.
Jaxb requires generics to be available to perform xml parsing and without this option ProGuard was not retaining that information after obfuscation. That was causing the exception above.
Hopefully this will save you some time.
ProGuard is a great tool, the only thing I found strange is that there is no official Maven plugin for it and also latest ProGuard releases can not be found in Maven central.