1

I wrote a small plugin for the natural language processing tool GATE, https://gate.ac.uk/

The CREOLE plugin is mainly a java bean which extends gate.creole.AbstractLanguageAnalyser. It may use additional JAR files which come together with the plugin. GATE loads to compiled plugin class and the JARs from the plugin directory to the main application classpath of the GATE application.

Now i am faced with the problem, that e.g. the spring.jar in my plugin conflicts with the JAR which comes with the GATE system and which has already been loaded to the classpath:

org.springframework.util.ClassUtils is available via both the system classpath and a plugin; the plugin classes will be ignored

Is it possible to use a separate class loader for the plugin to avoid these conflicts?

Cœur
  • 37,241
  • 25
  • 195
  • 267
rmv
  • 3,195
  • 4
  • 26
  • 29
  • Is it really causing any harm to your application? The message is only a warning... – dedek Oct 03 '16 at 07:01
  • 1
    A simple solution is to replace or delete the jar directly in the GATE's `lib` directory... I don't know any details about the architecture of GATE class loaders... – dedek Oct 03 '16 at 07:02
  • The related source code can be found here: https://sourceforge.net/p/gate/code/HEAD/tree/gate/trunk/src/main/gate/util/GateClassLoader.java#l188 – dedek Oct 03 '16 at 07:11
  • 1
    @dedek: if the plugin libraries are not being loaded, a 'NoSuchMethodError' will occur at plugin's runtime. And i think it may be not a good idea to modify the libraries coming with the Gate application. This may result in unpredictable runtime errors of the base system itself. But i will take a look a the Gate-Classloader... I was just wondering if nobody else faced the problem before. – rmv Oct 04 '16 at 08:04
  • 1
    I know about similar problem here: http://stackoverflow.com/q/38041516/1857897 but I didn't find any better solution than manipulating the others jars. I would be very interested in a better solution, please post your findings here, if you find something. – dedek Oct 04 '16 at 08:13
  • You may also try to describe your issue to the gate-users mailing list, you are likely getting much better answers from there... See https://gate.ac.uk/mail/ – dedek Oct 04 '16 at 08:15

0 Answers0