Hi guys, I've been having an issue running the PMD plugin I've been working on and Archnemesis. When I try to run them in the same eclipse instance eclipse will through an exception and not allow PMD to load. The problem seems to have something to do with how log4j is used in both projects. Log4j is a logging framework used by both plugins. The error message seems to indicate that there is some sort of conflict in how both plugins use the framework.
Here is the manifest for Archnemesis > Manifest-Version: 1.0 > > Bundle-ManifestVersion: 2 > > Bundle-Name: de.fu_berlin.inf.archnemesis > > Bundle-Vendor: My Company > > Bundle-Version: 1.0.0.qualifier > > Bundle-SymbolicName: de.fu_berlin.inf.archnemesis; singleton:=true > > Bundle-ActivationPolicy: lazy > > Require-Bundle: org.eclipse.xtext;visibility:=reexport, > > org.eclipse.xtext.xbase;resolution:=optional;visibility:=reexport, > > org.eclipse.xtext.generator;resolution:=optional, > > org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional, > > org.eclipse.emf.codegen.ecore;resolution:=optional, > > org.eclipse.emf.mwe.utils;resolution:=optional, > > org.eclipse.emf.mwe2.launch;resolution:=optional, > > org.eclipse.xtext.util, > > org.eclipse.emf.ecore, > > org.eclipse.emf.common, > > org.eclipse.xtext.xbase.lib, > > org.antlr.runtime, > > org.eclipse.xtext.common.types, > > org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional > > Import-Package: org.apache.log4j > > Bundle-RequiredExecutionEnvironment: JavaSE-1.7 > > Export-Package: de.fu_berlin.inf.archnemesis, > > de.fu_berlin.inf.archnemesis.services, > > de.fu_berlin.inf.archnemesis.archnemesis, > > de.fu_berlin.inf.archnemesis.archnemesis.impl, > > de.fu_berlin.inf.archnemesis.archnemesis.util, > > de.fu_berlin.inf.archnemesis.serializer, > > de.fu_berlin.inf.archnemesis.parser.antlr, > > de.fu_berlin.inf.archnemesis.parser.antlr.internal, > > de.fu_berlin.inf.archnemesis.validation, > > de.fu_berlin.inf.archnemesis.scoping, > > de.fu_berlin.inf.archnemesis.generator, > > de.fu_berlin.inf.archnemesis.formatting > > >> Strangely enough, when you remove the "Import-Package: org.apache.log4j" line from this manifest the error goes away for that instance. If you try to run the instance again, it will throw the same error and you have to add it back in. I've asked a question about this on stackoverflow[1], the only response I got was that the Archnemesis project imports this framework at the same time that PMD (who has this framework in it's classpath) is exporting the framework. This causes a two log4j's to be created which then triggers this error. I don't know enough about the OSGI-Bundle framework to know how to fix this. I was wondering if anybody had any ideas about how to resolve this error? [1] http://stackoverflow.com/questions/30897485/osgi-bundle-exception-caused-by-a-uses-constraint-violation
------------------------------------------------------------------------------
_______________________________________________ DPP-Devel mailing list DPP-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dpp-devel