Hi, I have an application build on the Netbeans Platform that uses some netbeans modules. These netbeans modules import some subprojects (that are not Netbeans modules). In one of the subproject, I need to call the org.apache.configuration.Configuration (from "commons-configuration" Apache project) class to check that a parameter is true (if it is, I display some field on a HMI). To set the Configuration install, I do it like this : VariableSelectorGuiManager.setConfiguration(myInstance) ==> this is passed as static. Then, The VariableSelectorGui class gets the configuration instance an display the fields depending on the parameters of the configuration instance.
The problem is the following : - We have a standard Java HMI (not integrated in Netbeans) in which everything works fine. - With the Netbeans platform, the "VariableSelectorGuiManager.setConfiguration(myInstance)" is done in the register method of our "ModuleInstall" class. When we try to display the VariableSelectorGui, this error is thrown : java.lang.LinkageError: loader constraint violation: loader (instance of org/netbeans/StandardModule$OneModuleClassLoader) previously initiated loading for a different type with name "org/apache/commons/configuration/Configuration" at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at org.netbeans.JarClassLoader.doLoadClass(JarClassLoader.java:311) at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:259) at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:217) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at fr.variable.selector.component.VariableSelectorGui.getCenterPane(VariableSelectorGui.java:562) at fr.variable.selector.component.VariableSelectorGui.createComponent(VariableSelectorGui.java:821) at fr.variable.selector.component.VariableSelectorGui.lambda$getComponent$1(VariableSelectorGui.java:181) at fr.variable.selector.component.VariableSelectorGui$$Lambda$116/700934246.run(Unknown Source) at com.sun.javafx.application.PlatformImpl.lambda$null$164(PlatformImpl.java:292) at com.sun.javafx.application.PlatformImpl$$Lambda$64/1862576770.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(PlatformImpl.java:291) at com.sun.javafx.application.PlatformImpl$$Lambda$63/2029243975.run(Unknown Source) [catch] at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102) at com.sun.glass.ui.win.WinApplication$$Lambda$54/1859224790.run(Unknown Source) at java.lang.Thread.run(Thread.java:745) The error is thrown when trying to access a method of the Configuration interface. I already tried to add "<publicPackage>org.apache.commons.configuration</publicPackage>" but it does not work. I also tried to add exclusions but it does not work too. When I remove the code from the ModuleInstall>>register, the error is not thrown. All the modules/projects inherit from the same version of the "commons-configuration" project. Thanks, Bastien [http://www.eiffage.com/signature/image.jpg] Cet e-mail et ses éventuelles pièces jointes peuvent contenir des informations confidentielles et sont exclusivement adressés au(x) destinataire(s) mentionné(s) ci-dessus. Toute diffusion, exploitation ou copie sans autorisation de cet e-mail et de ses pièces jointes est strictement interdite. Si vous recevez ce message par erreur, merci de le détruire et d' avertir immédiatement l'expéditeur. EIFFAGE décline toute responsabilité si ce message a été modifié ou falsifié. This message and any attachments may contain confidential information and are established exclusively for his or its recipients. Any use of this message, for which it was not intended, any distribution or any total or partial publication is prohibited unless previously approved. If you receive this message in error, please destroy it and immediately notify the sender thereof. The EIFFAGE Group declines all responsibility concerning this message if it has been altered or tampered with.