I was looking for a solution on google without any success and I decide to post it here. I want to import a library which is a jar (JmDNS) . This library has already a dependency with the module org.apache.log4j which is imported as well as stub. MPS internally use also log4j for logging. Now, when i want to write "message warn "something" " , I got this message:
java.lang.LinkageError: loader constraint violation: when resolving method "jetbrains.mps.baseLanguage.logging.runtime.model.LoggingRuntime.logMsgView(Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Class;Ljava/lang/Throwable;Lorg/jetbrains/mps/openapi/project/Project;)V" the class loader (instance of jetbrains/mps/classloading/ModuleClassLoader) of the current class, FishDeviceTools/plugin/DetectFishDevices_Action$1$2, and the class loader (instance of jetbrains/mps/classloading/ModuleClassLoader) for the method's defining class, jetbrains/mps/baseLanguage/logging/runtime/model/LoggingRuntime, have different Class objects for the type org/apache/log4j/Level used in the signature
I don'n know how to solve the conflicts. If somebody know I will be grateful.
Thanks in advance,