You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Plugin is executed on a Java 9+ JVM a ClassCastException is thrown:
[ERROR] Could not add schema location to classpath
java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at com.phoenixnap.oss.ramlplugin.raml2code.plugin.SpringMvcEndpointGeneratorMojo.getSchemaLocation (SpringMvcEndpointGeneratorMojo.java:477)
at com.phoenixnap.oss.ramlplugin.raml2code.plugin.SpringMvcEndpointGeneratorMojo.generateEndpoints (SpringMvcEndpointGeneratorMojo.java:261)
at com.phoenixnap.oss.ramlplugin.raml2code.plugin.SpringMvcEndpointGeneratorMojo.execute (SpringMvcEndpointGeneratorMojo.java:521)
[...]
The Plugin currently adds the Schema Location to the Classpath by getting the SystemClassLoader as an URLClassLoader, but because the underlying SystemClassLoader is no longer a URLClassLoader this results in an Error:
return"classpath:/"; // since we have added this folder to
// the classpath this
// should be used by the plugin
Several threads about this issue describe a workaround by further specifying the Class#forName usage, but as far as I understand this is not feasible for the current impl where it is assumed that the default classloader knowns the schema files.
The text was updated successfully, but these errors were encountered:
When the Plugin is executed on a Java 9+ JVM a ClassCastException is thrown:
The Plugin currently adds the Schema Location to the Classpath by getting the SystemClassLoader as an URLClassLoader, but because the underlying SystemClassLoader is no longer a URLClassLoader this results in an Error:
springmvc-raml-plugin/src/main/java/com/phoenixnap/oss/ramlplugin/raml2code/plugin/SpringMvcEndpointGeneratorMojo.java
Lines 492 to 499 in 6387072
Several threads about this issue describe a workaround by further specifying the
Class#forName
usage, but as far as I understand this is not feasible for the current impl where it is assumed that the default classloader knowns the schema files.The text was updated successfully, but these errors were encountered: