Unmarshaller not applicable arguments StringReader

Unmarshaller not applicable arguments StringReader

Sometime surprisingly you see below exception after adding jaxb-api.jar in your class path:

The method unmarshal(File) in the type Unmarshaller is not applicable for the arguments (StringReader)

Unmarshaller not applicable arguments StringReader

  • Solution: It means your order and export of JDK not configured properly. This error occures if your JDK configuration ordering is after jaxb-api.jar as below you see JDK ordering is in the bottom. To fix this please move JDK on the top:

JAXBContext not applicable arguments Class

  • Once JDK move on the top click OK and build project again you won’t see compilation issue.

JAXBContext not applicable arguments Class

  •  Issue resolved:

JAXBContext not applicable arguments Class

For more information about order and export eclipse please refer this tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *