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.nio.file.InvalidPathException: Illegal char <:> at index 2: while starting GWT-Unit tests on windows machine #9564

Open
TabakMann opened this issue Oct 27, 2017 · 2 comments

Comments

@TabakMann
Copy link

Hello,

i have tried to start a gwt unit tests in Eclipse (with launch configuration) on windows machine. It results with an exception (The problem is an leading slash in a path.):

Exception in thread "Thread-1" java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/eclipse-neon/configuration/org.eclipse.osgi/390/0/.cp/
	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 com.google.gwt.dev.cfg.ResourceLoaders$ContextClassLoaderAdapter.getClassPath(ResourceLoaders.java:62)
	at com.google.gwt.dev.resource.impl.ResourceOracleImpl.addAllClassPathEntries(ResourceOracleImpl.java:315)
	at com.google.gwt.dev.resource.impl.ResourceOracleImpl.getAllClassPathEntries(ResourceOracleImpl.java:353)
	at com.google.gwt.dev.resource.impl.ResourceOracleImpl.preload(ResourceOracleImpl.java:216)
	at com.google.gwt.dev.resource.impl.ResourceOracleImpl.preload(ResourceOracleImpl.java:207)
	at com.google.gwt.dev.DevMode$1.run(DevMode.java:539)
	at java.lang.Thread.run(Thread.java:745)

Version: GWT 2.8.2
IDE: Eclipse neon for windows

I hope for fast fix for this problem or any suggestion how to avoid it.

thanks

@niloc132
Copy link
Contributor

It appears that this only happens when running the tests from inside of eclipse - the IDE (or the gwt eclipse plugin) erroneously adds the /C:/... directory, not GWT.

This might be more appropriately filed at https://github.com/gwt-plugins/gwt-eclipse-plugin - @branflake2267 can you offer any perspective here?

@abika
Copy link

abika commented Aug 13, 2019

I have the same issue not when running a test in Eclipse but when executing a gwt-test-utils test as a gradle task with
./gradlew.bat :cleanTest :test --tests "com.company.gwt.GWTTestUtilsTest"

and only with GWT 2.8.2 not with 2.8.1 (and only on Windows).

Stack trace (upper part is identical to stack trace in OPs post):

java.nio.file.InvalidPathException: Illegal char <:> at index 2: /F:/.gradle/caches/4.10.1/workerMain/gradle-worker.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 com.google.gwt.dev.cfg.ResourceLoaders$ContextClassLoaderAdapter.getClassPath(ResourceLoaders.java:62)
	at com.google.gwt.dev.resource.impl.ResourceOracleImpl.addAllClassPathEntries(ResourceOracleImpl.java:315)
	at com.google.gwt.dev.resource.impl.ResourceOracleImpl.getAllClassPathEntries(ResourceOracleImpl.java:353)
	at com.google.gwt.dev.resource.impl.ResourceOracleImpl.<init>(ResourceOracleImpl.java:387)
	at com.google.gwt.dev.cfg.ModuleDef.normalize(ModuleDef.java:678)
	at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:200)
	at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:170)
	at com.google.gwt.dev.cfg.ModuleDefLoader.createSyntheticModule(ModuleDefLoader.java:100)
	at com.googlecode.gwt.test.internal.GwtFactory.createModuleDef(GwtFactory.java:165)
	at com.googlecode.gwt.test.internal.GwtFactory.<init>(GwtFactory.java:118)
	at com.googlecode.gwt.test.internal.GwtFactory.initializeIfNeeded(GwtFactory.java:54)
	at com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.<init>(AbstractGwtRunner.java:27)
	at com.googlecode.gwt.test.GwtRunner.<init>(GwtRunner.java:18)
	at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
	at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
	at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
	at java.lang.Thread.run(Thread.java:748)

See gwt-test-utils/gwt-test-utils#87 already linked above.

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

3 participants