Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 9 ClassCastException with URLClassLoader #61

Open
IanDCarroll opened this issue Nov 6, 2017 · 0 comments
Open

Java 9 ClassCastException with URLClassLoader #61

IanDCarroll opened this issue Nov 6, 2017 · 0 comments

Comments

@IanDCarroll
Copy link

IanDCarroll commented Nov 6, 2017

cob_spec is having trouble with Java 9's module system. ClassLoaders can no longer be cast as URLClassLoaders.

Given: Using Java 9 and having added two lines to the pom.xml properties to allow mvn package to compile:

    <properties>
       ...
        <maven.compiler.source>9.0</maven.compiler.source>
        <maven.compiler.target>9.0</maven.compiler.target>
    </properties>

When: $ java -jar fitnesse.jar -p 9090

Then:

Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
	at util.FileUtil.addUrlToClasspath(FileUtil.java:216)
	at util.FileUtil.addFileToClassPath(FileUtil.java:212)
	at util.FileUtil.addItemsToClasspath(FileUtil.java:207)
	at fitnesse.components.PluginsClassLoader.addPluginsToClassLoader(PluginsClassLoader.java:15)
	at fitnesseMain.FitNesseMain.loadPlugins(FitNesseMain.java:47)
	at fitnesseMain.FitNesseMain.launchFitNesse(FitNesseMain.java:35)
	at fitnesseMain.FitNesseMain.main(FitNesseMain.java:27)

Something I found online about the issue:

screen shot 2017-11-06 at 10 29 51 am

Also there's this link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant