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

Tests on Windows fail with: "InvalidPathException: Illegal char <:> at index 2: /C:/Users/..." #11

Closed
jpsacha opened this issue May 23, 2023 · 0 comments
Assignees
Labels

Comments

@jpsacha
Copy link
Member

jpsacha commented May 23, 2023

Constructor of SciJavaScriptEngine fails on Windows creating ReplDriver. The classPath has extra "/" at the beginning resulting in error:

ava.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/...jar

	at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
	at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
	at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
	at java.nio.file.Paths.get(Paths.java:84)
	at dotty.tools.dotc.core.MacroClassLoader$.$anonfun$1(MacroClassLoader.scala:25)
	at scala.collection.immutable.List.map(List.scala:246)
	at dotty.tools.dotc.core.MacroClassLoader$.makeMacroClassLoader(MacroClassLoader.scala:25)
	at dotty.tools.dotc.core.MacroClassLoader$.init(MacroClassLoader.scala:19)
	at dotty.tools.dotc.Driver.setup(Driver.scala:77)
	at dotty.tools.repl.ReplDriver.setupRootCtx(ReplDriver.scala:88)
	at dotty.tools.repl.ReplDriver.initialCtx(ReplDriver.scala:84)
	at dotty.tools.repl.ReplDriver.resetToInitial(ReplDriver.scala:110)
	at dotty.tools.repl.ReplDriver.<init>(ReplDriver.scala:125)
	at dotty.tools.repl.SciJavaScriptEngine.<init>(SciJavaScriptEngine.scala:37)
	at dotty.tools.repl.SciJavaScriptEngine$Factory.getScriptEngine(SciJavaScriptEngine.scala:102)
	at org.scijava.plugins.scripting.scala.ScalaAdaptedScriptEngineFactory.getScriptEngine(ScalaAdaptedScriptEngineFactory.scala:55)
	at org.scijava.plugins.scripting.scala.ScalaAdaptedScriptEngineFactory.getScriptEngine(ScalaAdaptedScriptEngineFactory.scala:55)
	at org.scijava.script.AdaptedScriptLanguage.getScriptEngine(AdaptedScriptLanguage.java:138)
	at org.scijava.plugins.scripting.scala.ScalaTest.issue9(ScalaTest.java:340)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	...
@jpsacha jpsacha added the bug label May 23, 2023
@jpsacha jpsacha self-assigned this May 23, 2023
jpsacha added a commit that referenced this issue May 23, 2023
@jpsacha jpsacha closed this as completed May 23, 2023
@jpsacha jpsacha changed the title Test on Windows fail with: "InvalidPathException: Illegal char <:> at index 2: /C:/Users/..." Tests on Windows fail with: "InvalidPathException: Illegal char <:> at index 2: /C:/Users/..." May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant