mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Error With JaxB when working with libTiled #3278

independence106 posted onGitHub

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.

posted by khasanovbi almost 3 years ago

@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!

posted by bjorn almost 3 years ago

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.

posted by khasanovbi almost 3 years ago

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?

posted by bjorn almost 3 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests