In my ear archive, I switched parent delegation to false, because JBoss would load the wrong JAXB classes otherwise (from the server/lib folder instead from the jars given in the ear).
Now, the correct JAXB classes are loaded, but there is a new kind of problem:
When I try a
JAXBContext jaxbContext = JAXBContext.newInstance("com.foobar.item");
javax.ejb.EJBTransactionRolledbackException: java.lang.RuntimeException: java.lang.LinkageError: loader constraints violated when linking javax/xml/namespace/QName class