Problems with JAR Integration in MPS

Technical Problem:

Are you implementing an application based on MPS and integrating your own Java Sourcecode as a JAR file? Do you have unforeseen problems or exceptions that are difficult to debug during runtime? 

Your JAR file works fine outside of MPS, but causes incomprehensible runtime exceptions while running in an MPS environment? 

java.util.ServiceConfigurationError: jakarta.xml.bind.JAXBContextFactory: org.glassfish.jaxb.runtime.v2.JAXBContextFactory not a subtype

Troubleshooting:

Check the contents of your JAR file. Does your JAR file contain other packed and / or unpacked JAR files in the form of supplied dependencies or other libraries (e.g. JAXB, Log4J etc.)? 

Is it possible that your JAR bundle is colliding with the JAR files already supplied by MPS and used internally? These can be found, for example, in the "lib" directory as shown in the image and in the "plugins" directory. 

These MPS-internal JAR files must never be integrated into MPS via their own JAR files, otherwise very unpredictable behavior can result. Removing these libraries from your own JAR file can be the immediate solution to such MPS runtime problems. 

MPS Application Plugin does not Start