You may see the following errors while executing a Job in ESB runtime:
Caused by: java.lang.Error: java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.validation.Validator.setErrorHandler(Lorg/xml/sax/ErrorHandler; )V" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, esb_import/createcustomerjob_0_1/CreateCustomerJob, and the class loader (instance of <bootloader>) for resolved class, javax/xml/validation/Validator, have different Class objects for the type org/xml/sax/ErrorHandler used in the signature
The job runs in the Studio successfully, but fails in ESB Runtime.
You get the error java.lang.Error: java.lang.LinkageError while executing the job in ESB runtime, but the Job runs in Studio successfully.
You need to figure out the violation jar which contains javax/xml/validation/Validator in the output .kar file, then remove the jar file from the bundle's MANIFEST.MF file Bundle-ClassPath:
Note: Remember there is a 70 byte limit while modifying the MANIFEST.MF Bundle-ClassPath.
For more information about the OSGI class loading algorithm, refer to the bundle class loader page on the RedHat site.