tiled
tiled copied to clipboard
Error With JaxB when working with libTiled
Feb 18, 2022 1:32:03 PM org.mapeditor.io.MapReader unmarshal SEVERE: null javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
I'm using the libTiled TMXViewer Example and getting this error.
What's happening ?'
[EDIT] Ok, I fixed some errors with dependencies but I still get "Implementation of JAXB-API has not been found on module path or classpath."
I am using 'javax.xml.bind', and 'org.glassfish.jaxb'
[More EDITS] when running with maven, " Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.14.0:generate (default) on project libtiled: Execution default of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.14.0:generate failed: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "com.sun.xml.bind.v2.runtime.reflect.opt.Injector.defineClass" is null "
I have the same problem after migration to new hibernate version 6.
@khasanovbi A few people have tried to find a solution for this but no solution has been found so far as far as I know. There is a bit more information at issue #3284. Any help resolving this would be really appreciated!
My problem is dependency conflicts. hibernate 6 has jaxb version 3. libtiled has jaxb version 2. Maven implicitly takes a new one. I tried to fixate jaxb 2 in my pom.xml, but this break hibernate) Maybe we could migrate just for new version of jaxb? But this is not a perfect solution, because it could break some other packages that use old jaxb. I'm not a big java expert, but maybe this can still be solved somehow through ClassLoaders and a multiple jaxb dependencies.
Maybe we could migrate just for new version of jaxb? But this is not a perfect solution, because it could break some other packages that use old jaxb.
I don't know what it could break, but first of all, what would be required to migratie libtiled-java to a newer jaxb?