I'm trying to write a Java application that writes an XML/KML file using JAXB. I'm encountering the following error, and can't seem to find a solution. I've tried all the articles on Google I could find, but haven't been able to resolve the issue:
2017-12-06 11:21:17 DEBUG [STDERR] javax.xml.bind.JAXBException: ClassCastExcep
tion: attempting to cast jar:file:/C:/Program%20Files/Java/jre1.8.0_144/lib/rt.j
ar!/javax/xml/bind/JAXBContext.class to jar:file:/C:/Program%20Files/Java/jre1.8
.0_144/lib/rt.jar!/javax/xml/bind/JAXBContext.class. Please make sure that you
are specifying the proper ClassLoader.
Any help would be appreciated.