Closed BenjaminKlatt closed 10 years ago
The issue resulted from a race condition in accessing a shared JavaClasspath. It is necessary to configure the ResourceSet to use a local JavaClasspath
ResourceSet rs = new ResourceSetImpl();
// further resource set enhancement for the extraction specific needs
Map<Object, Object> options = rs.getLoadOptions();
options.put(JavaClasspath.OPTION_USE_LOCAL_CLASSPATH, Boolean.TRUE);
...
From time to time, I receive a NullpointerException during JavaClasspath initialization (See stack trace below).
I use the following code to initialize a ResourceSet and an assigned JavaClasspath:
with setUpRessourceSet() implemented as
The code is part of an Eclipse plugin. I run it within an Eclipse instance. Unfortunately, it does not occure everytime and restarting the Eclipse test instance solves the issue in most cases.
Is there anything wrong in how the RessourceSet and the classpath are initialized?
Thanks Benjamin
Stacktrace: