JAXBContext not applicable arguments Class

JAXBContext not applicable arguments Class

If you have already added jaxb-api.jar in your class path but still see compilation error as below in your class:

The method newInstance(String) in the type JAXBContext is not applicable for the arguments (Class)

JAXBContext not applicable arguments Class

  • 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 *