We came across a JaxB class loading issue as highlighted by Jaxb classCastException.
To fix that I added com.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true and that actually FIXED the issue.
However, I read that this will disable Jaxb's ability to directly interact with bytecode and go through Java Reflection API and so might have a slight performance hit while initilazation of new Jaxb Contexts via "JAXBContext.newInstance".
To test the performance I added a simple method which invokes JAXBContext.newInstance in a for loop some 500 times. And I ran this with the flag=true and =false.
In the worst case, I saw a performance hit of only about 3.5 ms on an average per invocation.
Has anyone had a similar issue and tried the above fix? What were your findings? I couldn't find much information on the com.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize. Can you share more info on its behavior and impact?