Invalid path exception

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Invalid path exception

Mohit Anchlia
I am using flink 1.3.1 and getting this exception. Is there a workaround?

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/m/default/flink-example/pom.xml

at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)

Reply | Threaded
Open this post in threaded view
|

Re: Invalid path exception

Chesnay Schepler
Did the path by chance start with file://C:/... ?

If so, please try file:///C: ...

On 30.07.2017 22:28, Mohit Anchlia wrote:
I am using flink 1.3.1 and getting this exception. Is there a workaround?

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/m/default/flink-example/pom.xml

at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)


Reply | Threaded
Open this post in threaded view
|

Re: Invalid path exception

Mohit Anchlia
This is what I tired and it doesn't work. Is this a bug?

format.setFilePath("file:///c:/proj/test/a.txt.txt");


On Sun, Jul 30, 2017 at 2:10 PM, Chesnay Schepler <[hidden email]> wrote:
Did the path by chance start with file://C:/... ?

If so, please try file:///C: ...


On 30.07.2017 22:28, Mohit Anchlia wrote:
I am using flink 1.3.1 and getting this exception. Is there a workaround?

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/m/default/flink-example/pom.xml

at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)



Reply | Threaded
Open this post in threaded view
|

Re: Invalid path exception

Stephan Ewen
I think that on Windows, you need to use "file:/c:/proj/..." with just one slash after the scheme.



On Mon, Jul 31, 2017 at 1:24 AM, Mohit Anchlia <[hidden email]> wrote:
This is what I tired and it doesn't work. Is this a bug?

format.setFilePath("file:///c:/proj/test/a.txt.txt");


On Sun, Jul 30, 2017 at 2:10 PM, Chesnay Schepler <[hidden email]> wrote:
Did the path by chance start with file://C:/... ?

If so, please try file:///C: ...


On 30.07.2017 22:28, Mohit Anchlia wrote:
I am using flink 1.3.1 and getting this exception. Is there a workaround?

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/m/default/flink-example/pom.xml

at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)




Reply | Threaded
Open this post in threaded view
|

Re: Invalid path exception

Mohit Anchlia
I tried that as well but same result

format.setFilePath("file:/c:/proj/test/a.txt.txt");


Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /c:/proj/test/a.txt.txt





On Mon, Jul 31, 2017 at 6:04 AM, Stephan Ewen <[hidden email]> wrote:
I think that on Windows, you need to use "file:/c:/proj/..." with just one slash after the scheme.



On Mon, Jul 31, 2017 at 1:24 AM, Mohit Anchlia <[hidden email]> wrote:
This is what I tired and it doesn't work. Is this a bug?

format.setFilePath("file:///c:/proj/test/a.txt.txt");


On Sun, Jul 30, 2017 at 2:10 PM, Chesnay Schepler <[hidden email]> wrote:
Did the path by chance start with file://C:/... ?

If so, please try file:///C: ...


On 30.07.2017 22:28, Mohit Anchlia wrote:
I am using flink 1.3.1 and getting this exception. Is there a workaround?

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/m/default/flink-example/pom.xml

at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)





Reply | Threaded
Open this post in threaded view
|

Re: Invalid path exception

Stephan Ewen
Hmm, looks like a bug then... Could you open a JIRA issue for that?

@Chesnay are you aware of Path issues on Windows?

On Mon, Jul 31, 2017 at 8:01 PM, Mohit Anchlia <[hidden email]> wrote:
I tried that as well but same result

format.setFilePath("file:/c:/proj/test/a.txt.txt");


Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /c:/proj/test/a.txt.txt





On Mon, Jul 31, 2017 at 6:04 AM, Stephan Ewen <[hidden email]> wrote:
I think that on Windows, you need to use "file:/c:/proj/..." with just one slash after the scheme.



On Mon, Jul 31, 2017 at 1:24 AM, Mohit Anchlia <[hidden email]> wrote:
This is what I tired and it doesn't work. Is this a bug?

format.setFilePath("file:///c:/proj/test/a.txt.txt");


On Sun, Jul 30, 2017 at 2:10 PM, Chesnay Schepler <[hidden email]> wrote:
Did the path by chance start with file://C:/... ?

If so, please try file:///C: ...


On 30.07.2017 22:28, Mohit Anchlia wrote:
I am using flink 1.3.1 and getting this exception. Is there a workaround?

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/m/default/flink-example/pom.xml

at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)






Reply | Threaded
Open this post in threaded view
|

Re: Invalid path exception

geoff halmo
This might be  a problem with /t in the path. It might be interpreting
it as a tab.

On Mon, Jul 31, 2017 at 4:19 PM, Stephan Ewen [via Apache Flink User
Mailing List archive.] <[hidden email]> wrote:

> Hmm, looks like a bug then... Could you open a JIRA issue for that?
>
> @Chesnay are you aware of Path issues on Windows?
>
> On Mon, Jul 31, 2017 at 8:01 PM, Mohit Anchlia <[hidden email]> wrote:
>>
>> I tried that as well but same result
>>
>> format.setFilePath("file:/c:/proj/test/a.txt.txt");
>>
>>
>> Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index
>> 2: /c:/proj/test/a.txt.txt
>>
>>
>>
>>
>>
>> On Mon, Jul 31, 2017 at 6:04 AM, Stephan Ewen <[hidden email]> wrote:
>>>
>>> I think that on Windows, you need to use "file:/c:/proj/..." with just
>>> one slash after the scheme.
>>>
>>>
>>>
>>> On Mon, Jul 31, 2017 at 1:24 AM, Mohit Anchlia <[hidden email]> wrote:
>>>>
>>>> This is what I tired and it doesn't work. Is this a bug?
>>>>
>>>> format.setFilePath("file:///c:/proj/test/a.txt.txt");
>>>>
>>>>
>>>> On Sun, Jul 30, 2017 at 2:10 PM, Chesnay Schepler <[hidden email]>
>>>> wrote:
>>>>>
>>>>> Did the path by chance start with file://C:/... ?
>>>>>
>>>>> If so, please try file:///C: ...
>>>>>
>>>>>
>>>>> On 30.07.2017 22:28, Mohit Anchlia wrote:
>>>>>
>>>>> I am using flink 1.3.1 and getting this exception. Is there a
>>>>> workaround?
>>>>>
>>>>> Caused by: java.nio.file.InvalidPathException: Illegal char <:> at
>>>>> index 2: /C:/Users/m/default/flink-example/pom.xml
>>>>>
>>>>> at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
>>>>>
>>>>> at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
>>>>>
>>>>> at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
>>>>>
>>>>>
>>>>
>>>
>>
>
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Invalid-path-exception-tp14535p14570.html
> To start a new topic under Apache Flink User Mailing List archive., email
> [hidden email]
> To unsubscribe from Apache Flink User Mailing List archive., click here.
> NAML
Reply | Threaded
Open this post in threaded view
|

Re: Invalid path exception

geoff halmo
In reply to this post by Stephan Ewen
This might be a problem with /t in the path. It might be interpreting
it as a tab.

On Mon, Jul 31, 2017 at 4:19 PM, Stephan Ewen [via Apache Flink User
Mailing List archive.] <[hidden email]> wrote:

> Hmm, looks like a bug then... Could you open a JIRA issue for that?
>
> @Chesnay are you aware of Path issues on Windows?
>
> On Mon, Jul 31, 2017 at 8:01 PM, Mohit Anchlia <[hidden email]> wrote:
>>
>> I tried that as well but same result
>>
>> format.setFilePath("file:/c:/proj/test/a.txt.txt");
>>
>>
>> Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index
>> 2: /c:/proj/test/a.txt.txt
>>
>>
>>
>>
>>
>> On Mon, Jul 31, 2017 at 6:04 AM, Stephan Ewen <[hidden email]> wrote:
>>>
>>> I think that on Windows, you need to use "file:/c:/proj/..." with just
>>> one slash after the scheme.
>>>
>>>
>>>
>>> On Mon, Jul 31, 2017 at 1:24 AM, Mohit Anchlia <[hidden email]> wrote:
>>>>
>>>> This is what I tired and it doesn't work. Is this a bug?
>>>>
>>>> format.setFilePath("file:///c:/proj/test/a.txt.txt");
>>>>
>>>>
>>>> On Sun, Jul 30, 2017 at 2:10 PM, Chesnay Schepler <[hidden email]>
>>>> wrote:
>>>>>
>>>>> Did the path by chance start with file://C:/... ?
>>>>>
>>>>> If so, please try file:///C: ...
>>>>>
>>>>>
>>>>> On 30.07.2017 22:28, Mohit Anchlia wrote:
>>>>>
>>>>> I am using flink 1.3.1 and getting this exception. Is there a
>>>>> workaround?
>>>>>
>>>>> Caused by: java.nio.file.InvalidPathException: Illegal char <:> at
>>>>> index 2: /C:/Users/m/default/flink-example/pom.xml
>>>>>
>>>>> at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
>>>>>
>>>>> at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
>>>>>
>>>>> at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
>>>>>
>>>>>
>>>>
>>>
>>
>
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Invalid-path-exception-tp14535p14570.html
> To start a new topic under Apache Flink User Mailing List archive., email
> [hidden email]
> To unsubscribe from Apache Flink User Mailing List archive., click here.
> NAML
Reply | Threaded
Open this post in threaded view
|

Re: Invalid path exception

Chesnay Schepler
In reply to this post by Stephan Ewen
One problem i know of is that windows paths with a scheme are not detected as windows paths, as documented in FLINK-6889.
They generally still work though (maybe by chance).

I just verified that calling FileInputFormat#setFilePath() works for both "file:///" and "file:/" on Windows.
(I'm assuming that we're talking about the FileInputFormat, if I'm wrong please correct me)

@Mohit Could you provide the full stacktrace or a small self-contained example to reproduce the issue?

On 31.07.2017 22:19, Stephan Ewen wrote:
Hmm, looks like a bug then... Could you open a JIRA issue for that?

@Chesnay are you aware of Path issues on Windows?

On Mon, Jul 31, 2017 at 8:01 PM, Mohit Anchlia <[hidden email]> wrote:
I tried that as well but same result

format.setFilePath("file:/c:/proj/test/a.txt.txt");


Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /c:/proj/test/a.txt.txt





On Mon, Jul 31, 2017 at 6:04 AM, Stephan Ewen <[hidden email]> wrote:
I think that on Windows, you need to use "file:/c:/proj/..." with just one slash after the scheme.



On Mon, Jul 31, 2017 at 1:24 AM, Mohit Anchlia <[hidden email]> wrote:
This is what I tired and it doesn't work. Is this a bug?

format.setFilePath("file:///c:/proj/test/a.txt.txt");


On Sun, Jul 30, 2017 at 2:10 PM, Chesnay Schepler <[hidden email]> wrote:
Did the path by chance start with file://C:/... ?

If so, please try file:///C: ...


On 30.07.2017 22:28, Mohit Anchlia wrote:
I am using flink 1.3.1 and getting this exception. Is there a workaround?

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/m/default/flink-example/pom.xml

at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)







Reply | Threaded
Open this post in threaded view
|

Re: Invalid path exception

Chesnay Schepler
Let's move the discussions to FLINK-7330.

On 01.08.2017 13:15, Chesnay Schepler wrote:
One problem i know of is that windows paths with a scheme are not detected as windows paths, as documented in FLINK-6889.
They generally still work though (maybe by chance).

I just verified that calling FileInputFormat#setFilePath() works for both "file:///" and "file:/" on Windows.
(I'm assuming that we're talking about the FileInputFormat, if I'm wrong please correct me)

@Mohit Could you provide the full stacktrace or a small self-contained example to reproduce the issue?

On 31.07.2017 22:19, Stephan Ewen wrote:
Hmm, looks like a bug then... Could you open a JIRA issue for that?

@Chesnay are you aware of Path issues on Windows?

On Mon, Jul 31, 2017 at 8:01 PM, Mohit Anchlia <[hidden email]> wrote:
I tried that as well but same result

format.setFilePath("file:/c:/proj/test/a.txt.txt");


Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /c:/proj/test/a.txt.txt





On Mon, Jul 31, 2017 at 6:04 AM, Stephan Ewen <[hidden email]> wrote:
I think that on Windows, you need to use "file:/c:/proj/..." with just one slash after the scheme.



On Mon, Jul 31, 2017 at 1:24 AM, Mohit Anchlia <[hidden email]> wrote:
This is what I tired and it doesn't work. Is this a bug?

format.setFilePath("file:///c:/proj/test/a.txt.txt");


On Sun, Jul 30, 2017 at 2:10 PM, Chesnay Schepler <[hidden email]> wrote:
Did the path by chance start with file://C:/... ?

If so, please try file:///C: ...


On 30.07.2017 22:28, Mohit Anchlia wrote:
I am using flink 1.3.1 and getting this exception. Is there a workaround?

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/m/default/flink-example/pom.xml

at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)

at sun.nio.fs.WindowsPathParser.parse(Unknown Source)