On 10/04/2017 22:49, Rahman USTA wrote:
:
1) Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for
\.m2\repository\net\java\dev\jna\jna-platform\4.4.0\jna-platform-4.4.0.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Main-Class
com.sun.jna.Native not in module
I don't know why this JAR file has a Main-Class attribute but I assume
that `java -jar jna-platform-4.4.0.jar` doesn't work or only works when
the JAR file containing the entry point is brought into the environment.
I see Mandy's note about this JAR file seems to have code that using the
AWT peer API so I assume this library is going to need work anyway.
2) Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for
\.m2\repository\org\apache\xmlgraphics\batik-script\1.8\batik-script-1.8.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider
class org.apache.batik.bridge.RhinoInterpreterFactory not in module
3) Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for
\.m2\repository\xalan\xalan\2.7.2\xalan-2.7.2.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider
class org.apache.bsf.BSFManager not in module
The class path is leaky in that a JAR file can name a class in its
META-INF/services configuration file and the class is loaded from
another JAR file. It would be interesting to see if that is the case
with these two projects. I assume if deployed in isolation on the class
path that ServiceConfigurationError is throw when the providers cannot
be loaded.
As regards moving forward then do you have direct dependences on these
libraries? If the dependences not direct then you could leave these JAR
files on the class path (assuming they actually work there). When
migrating to modules then it's okay to do this, esp. with legacy
libraries with issues that prevent them being used as modules.
-Alan