java.nio.file.InvalidPathException: Illegal char <:>

7,507 views
Skip to first unread message

Mihai Cazacu

unread,
Mar 5, 2013, 6:36:53 AM3/5/13
to ve...@googlegroups.com
Hi,

I'm trying to update my app to vertx 2.0.0-SNAPSHOT and I have this error:

Downloading 100%
Disconnected from the target VM, address: '127.0.0.1:59343', transport: 'socket'
13:28:50.502 ERROR - Failed to move module
java.nio.file.InvalidPathException: Illegal char <:> at index 55: C:\path\to\my\project\src\main\groovy\mods\maven:io.vertx:lang-groovy:1.0.0-SNAPSHOT
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) ~[na:1.8.0-ea]
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) ~[na:1.8.0-ea]
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) ~[na:1.8.0-ea]
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94) ~[na:1.8.0-ea]
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255) ~[na:1.8.0-ea]
at java.nio.file.Paths.get(Paths.java:84) ~[na:1.8.0-ea]
at org.vertx.java.core.file.impl.DefaultFileSystem.moveInternal(DefaultFileSystem.java:349) ~[vertx-core-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.core.file.impl.DefaultFileSystem.moveSync(DefaultFileSystem.java:75) ~[vertx-core-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.platform.impl.DefaultPlatformManager.unzipModule(DefaultPlatformManager.java:913) [vertx-platform-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.platform.impl.DefaultPlatformManager.doInstallMod(DefaultPlatformManager.java:814) [vertx-platform-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.platform.impl.DefaultPlatformManager.loadIncludedModules(DefaultPlatformManager.java:690) [vertx-platform-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.platform.impl.DefaultPlatformManager.doDeploy(DefaultPlatformManager.java:1059) [vertx-platform-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.platform.impl.DefaultPlatformManager.doDeployVerticle(DefaultPlatformManager.java:470) [vertx-platform-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.platform.impl.DefaultPlatformManager.access$600(DefaultPlatformManager.java:53) [vertx-platform-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.platform.impl.DefaultPlatformManager$7.action(DefaultPlatformManager.java:319) [vertx-platform-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.platform.impl.DefaultPlatformManager$7.action(DefaultPlatformManager.java:316) [vertx-platform-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.core.impl.BlockingAction$1.run(BlockingAction.java:51) [vertx-core-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.core.impl.Context$1.run(Context.java:126) [vertx-core-2.0.0-SNAPSHOT.jar:na]
at org.vertx.java.core.impl.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:90) [vertx-core-2.0.0-SNAPSHOT.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.8.0-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.8.0-ea]
at java.lang.Thread.run(Thread.java:722) [na:1.8.0-ea]
13:28:50.503 ERROR - Failed to load module: maven:io.vertx:lang-groovy:1.0.0-SNAPSHOT


This is my langs  file:

# Language run-times
# <runtime_name>=[implementing module name:]<FQCN of verticle factory>
groovy=maven:io.vertx:lang-groovy:1.0.0-SNAPSHOT:org.vertx.groovy.platform.impl.GroovyVerticleFactory
# Mapping of file extension to language runtime
# If the main is specified without a runtime prefix the file extension will be used to determine
# which runtime to use
# If a prefix is used e.g. 'groovy:org.foo.MyMainClass' then the prefix will be used to determine the
# runtime instead
.groovy=groovy
.class=java
.java=java
# The default runtime - if no prefix is specified and the main does not match any of the file extensions above
# then the default will be used
.=groovy
 
It is clear that vertx cannot create a file (in Windows) that contains colon in its name. Is there a workaround?

Thanks,
Mihai


Christian Essl

unread,
Mar 5, 2013, 7:03:43 AM3/5/13
to ve...@googlegroups.com
I've just reported the same issue

Mihai Cazacu

unread,
Mar 5, 2013, 3:24:41 PM3/5/13
to ve...@googlegroups.com
Any help would be most welcome.

Christian Essl

unread,
Mar 6, 2013, 1:42:46 AM3/6/13
to ve...@googlegroups.com
That is indeed a showstopper. Should I go ahead and try to fix it, because I can not work on otherwise witht that? I'll try to replace all colons with File#pathSeparator for the module's file-name (not the module name) in DefaultPlatformManager. Hopefully this fixes it.

Tim Fox

unread,
Mar 6, 2013, 2:31:01 AM3/6/13
to ve...@googlegroups.com
Well, it shouldn't be a show stopper since no-one one's "show" should be relying on a development branch which is very much WIP :)

This is on my list of things to look at. I'll probably get around to it today.

Christian Essl

unread,
Mar 6, 2013, 2:42:02 AM3/6/13
to ve...@googlegroups.com
You are right Tim. Sorry. I ment show-stopper for me to goon with the lang-module (and things which depend on it). Thanks that is in your list.

Tim Fox

unread,
Mar 6, 2013, 3:20:03 AM3/6/13
to ve...@googlegroups.com
On 06/03/13 07:42, Christian Essl wrote:
You are right Tim. Sorry. I ment show-stopper for me to goon with the lang-module (and things which depend on it). Thanks that is in your list.

Np!

So.. we need to find another character to use in module names which is not an illegal Windows file name char. The ones that spring to mind are hash and tilda

What do you prefer:

org.foo#my-mod#1.0-SNAPSHOT

or

org.foo~my-mod~1.0-SNAPSHOT

or

Or something else perhaps?


On Wednesday, March 6, 2013 8:31:01 AM UTC+1, Tim Fox wrote:
Well, it shouldn't be a show stopper since no-one one's "show" should be relying on a development branch which is very much WIP :)

This is on my list of things to look at. I'll probably get around to it today.

On Wednesday, 6 March 2013 06:42:46 UTC, Christian Essl wrote:
That is indeed a showstopper. Should I go ahead and try to fix it, because I can not work on otherwise witht that? I'll try to replace all colons with File#pathSeparator for the module's file-name (not the module name) in DefaultPlatformManager. Hopefully this fixes it.



On Tuesday, March 5, 2013 9:24:41 PM UTC+1, Mihai Cazacu wrote:
Any help would be most welcome.
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Christian Essl

unread,
Mar 6, 2013, 3:41:34 AM3/6/13
to ve...@googlegroups.com
Actually I have just send a pull-request, where I replace : with File.pathSeparatorChar but only when Files are generated - otherwise the module-name stays the same.

I think two helper functions moduleNameToFile and fileNameToModuleName would be enough.

Otherwise # looks good for me.

Christian Essl

unread,
Mar 6, 2013, 10:37:04 AM3/6/13
to ve...@googlegroups.com
Hi Tim, 

Thanks for fixing that so fast.
Christian

Tim Fox

unread,
Mar 6, 2013, 10:41:03 AM3/6/13
to ve...@googlegroups.com
On 06/03/13 15:37, Christian Essl wrote:
Hi Tim, 

Thanks for fixing that so fast.

Np, it was a bit more complex than I thought...

The new module naming is

owner#modname#version, e.g.

com.mycompany#my-mod#1.0.0

the "type" prefix has now disappeared (i.e. the maven: or bintray or old:)

With a maven repo owner maps to groupid, modname maps to artifactid and version to version.

Mihai Cazacu

unread,
Mar 6, 2013, 3:19:44 PM3/6/13
to ve...@googlegroups.com
Thanks, Tim!

Christian Essl

unread,
Mar 7, 2013, 5:43:42 AM3/7/13
to ve...@googlegroups.com

The new module naming is

owner#modname#version, e.g.

com.mycompany#my-mod#1.0.0

the "type" prefix has now disappeared (i.e. the maven: or bintray or old:)

With a maven repo owner maps to groupid, modname maps to artifactid and version to version.

Thanks for this info.
 
How are "local-modules" - those which are in the same mods dir but not in any repo - named? 

Tim Fox

unread,
Mar 7, 2013, 5:45:54 AM3/7/13
to ve...@googlegroups.com
On 07/03/13 10:43, Christian Essl wrote:

The new module naming is

owner#modname#version, e.g.

com.mycompany#my-mod#1.0.0

the "type" prefix has now disappeared (i.e. the maven: or bintray or old:)

With a maven repo owner maps to groupid, modname maps to artifactid and version to version.

Thanks for this info.
 
How are "local-modules" - those which are in the same mods dir but not in any repo - named?

Exactly the same. The repo information is not present on the module name any more.

Christian Essl

unread,
Mar 7, 2013, 6:53:56 AM3/7/13
to ve...@googlegroups.com
Thanks

Tim Fox

unread,
Mar 7, 2013, 2:13:38 PM3/7/13
to ve...@googlegroups.com
Sigh. It appears that JRuby doesn't decode file URLs properly (in several places in the Jruby code) which means that paths with '#' in the name don't work with JRuby :(

So we're probably going to have change the module name separator character _again_. Not sure we have any other option.

We need a character that doesn't get URLencoded (# goes to %23)

How about '~' ?

Martijn Verburg

unread,
Mar 7, 2013, 2:16:57 PM3/7/13
to ve...@googlegroups.com
Or you can ping Charlie Nutter to fix it in JRuby :-)

Cheers,
Martijn

Christian Essl

unread,
Mar 7, 2013, 2:18:57 PM3/7/13
to ve...@googlegroups.com
How about using something that is certainly supported like underscore (_). Than just vertx-modules may not contain _ in any part of their name. IMO this wouldn't be a big problem.

froz3n

unread,
Mar 7, 2013, 3:09:04 PM3/7/13
to ve...@googlegroups.com
And why not treat it as a repository (maven or otherwise) and just create directory structure instead of actually saving it with the same name that we provide to resolve it?

com.mycompany:my-mod:1.0.0   

should translate to the following in the mods directory:  

com/mycompany/my-mod-1.0.0

or something similar.

Mihai Cazacu

unread,
Mar 7, 2013, 3:15:30 PM3/7/13
to ve...@googlegroups.com
+1 for directory structure

Tim Fox

unread,
Mar 7, 2013, 3:49:45 PM3/7/13
to ve...@googlegroups.com
On 07/03/13 19:16, Martijn Verburg wrote:
Or you can ping Charlie Nutter to fix it in JRuby :-)

I already work in the same team as Charlie and Tom :) But any fix will require a release, I think the easiest option is to change the delimiter

Tim Fox

unread,
Mar 7, 2013, 3:50:57 PM3/7/13
to ve...@googlegroups.com
On 07/03/13 19:18, Christian Essl wrote:
How about using something that is certainly supported like underscore (_). Than just vertx-modules may not contain _ in any part of their name. IMO this wouldn't be a big problem.

Yes, that's what I was suggesting with tilda (which doesn't require any special encoding, aiui)

Tim Fox

unread,
Mar 7, 2013, 3:51:44 PM3/7/13
to ve...@googlegroups.com
On 07/03/13 20:09, froz3n wrote:
And why not treat it as a repository (maven or otherwise) and just create directory structure instead of actually saving it with the same name that we provide to resolve it?

And cd 15 times to figure out what's in a directory? No thanks

Christian Essl

unread,
Mar 7, 2013, 3:54:04 PM3/7/13
to ve...@googlegroups.com
Tilda is fine for me as well.

(And yes I also prefer a flat namespace)

Tim Fox

unread,
Mar 7, 2013, 4:04:53 PM3/7/13
to ve...@googlegroups.com
Ok here are the options:

urls can contain

._~:/?[]@!$&'()*+,;

illegal on windows:

 < > : " / \ | ? *

which leaves:

._~[]@!$&'()+,;=


I think [](),; would be ugly as delimiters

leaving

._~@!$&=

. is commonly used in module names or versions so exclude that

leaving

_~@!$&=

Take your pick!

Pid

unread,
Mar 7, 2013, 4:59:26 PM3/7/13
to ve...@googlegroups.com
On 07/03/2013 21:04, Tim Fox wrote:
> Ok here are the options:
>
> urls can contain
>
> ._~:/?[]@!$&'()*+,;
>
> illegal on windows:
>
> < > : " / \ | ? *
>
> which leaves:
>
> ._~[]@!$&'()+,;=
>
>
> I think [](),; would be ugly as delimiters
>
> leaving
>
> ._~@!$&=
>
> . is commonly used in module names or versions so exclude that
>
> leaving
>
> _~@!$&=

~ usually has a specific meaning in HTTP URLs.

> Take your pick!

Did + disappear? Either way, +~@&= all are valid but have common use in
HTTP URLs, leaving, IMHO:


org.pidster_foo-bar_1.0.0

org.pidster!foo-bar!1.0.0

org.pidster$foo-bar$1.0.0


p
>>>>>> <https://groups.google.com/groups/opt_out>.
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> You received this message because you are
>>>>> subscribed to the Google Groups "vert.x" group.
>>>>> To unsubscribe from this group and stop
>>>>> receiving emails from it, send an email to
>>>>> vertx+un...@googlegroups.com.
>>>>> For more options, visit
>>>>> https://groups.google.com/groups/opt_out
>>>>> <https://groups.google.com/groups/opt_out>.
>>>>>
>>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed
>>>> to the Google Groups "vert.x" group.
>>>> To unsubscribe from this group and stop receiving
>>>> emails from it, send an email to
>>>> vertx+un...@googlegroups.com.
>>>> For more options, visit
>>>> https://groups.google.com/groups/opt_out
>>>> <https://groups.google.com/groups/opt_out>.
>>>>
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to
>>> the Google Groups "vert.x" group.
>>> To unsubscribe from this group and stop receiving emails
>>> from it, send an email to vertx+un...@googlegroups.com.
>>> For more options, visit
>>> https://groups.google.com/groups/opt_out
>>> <https://groups.google.com/groups/opt_out>.
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the
>> Google Groups "vert.x" group.
>> To unsubscribe from this group and stop receiving emails from
>> it, send an email to vertx+un...@googlegroups.com.
>> For more options, visit
>> https://groups.google.com/groups/opt_out
>> <https://groups.google.com/groups/opt_out>.
>>
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "vert.x" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to vertx+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>


--

[key:62590808]

Tim Fox

unread,
Mar 8, 2013, 2:08:16 AM3/8/13
to ve...@googlegroups.com
On 07/03/13 21:59, Pid wrote:
> On 07/03/2013 21:04, Tim Fox wrote:
>> Ok here are the options:
>>
>> urls can contain
>>
>> ._~:/?[]@!$&'()*+,;
>>
>> illegal on windows:
>>
>> < > : " / \ | ? *
>>
>> which leaves:
>>
>> ._~[]@!$&'()+,;=
>>
>>
>> I think [](),; would be ugly as delimiters
>>
>> leaving
>>
>> ._~@!$&=
>>
>> . is commonly used in module names or versions so exclude that
>>
>> leaving
>>
>> _~@!$&=
> ~ usually has a specific meaning in HTTP URLs.
>
>> Take your pick!
> Did + disappear? Either way, +~@&= all are valid but have common use in
> HTTP URLs, leaving, IMHO:

It shouldn't matter - the question is whether the char gets escaped in a
file URL or not.

However, I am edging towards $ as my favourite now...

Tim Fox

unread,
Mar 8, 2013, 3:00:31 AM3/8/13
to ve...@googlegroups.com


On Friday, 8 March 2013 07:08:16 UTC, Tim Fox wrote:


However, I am edging towards $ as my favourite now...

On second thoughts, fuck $ - it's a symbol of US economic repression (and makes module names look like inner class names)

~ looks much nicer

p...@pidster.com

unread,
Mar 8, 2013, 4:01:32 AM3/8/13
to ve...@googlegroups.com
Can someone with Windows check that behaves nicely please?


p
Reply all
Reply to author
Forward
0 new messages