You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "fionamahon (JIRA)" <ji...@apache.org> on 2009/06/12 13:32:08 UTC

[jira] Created: (FELIX-1228) Felix File Install - Spaces in File Names

Felix File Install - Spaces in File Names
-----------------------------------------

                 Key: FELIX-1228
                 URL: https://issues.apache.org/jira/browse/FELIX-1228
             Project: Felix
          Issue Type: Bug
          Components: File Install
    Affects Versions:  fileinstall-1.0.0
            Reporter: fionamahon


Note: In terms of creating a patch for this issue - there was already a patch created yesterday for a different issue relating to felix install. I don't think the patch has been released yet - so just to make sure there are not overwrites.

Issue is below....

Just in terms of the issue with the spaces, Guido suggested I put quotes around the directory. However this causes the system to go into an endless loop!

Behaviour is as follows:
When I define felix.fileinstall.dir=watchedDir (i.e. without quotes), and when 'watchedDir' actually resolves to E:\Documents and Settings\some\path\watchedDir, then I get the following error when I drop a bundle into that directory:

ERROR    20090612 10:01:28 bid#11       - Failed to install bundle: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar (java.net.URISyntaxException: Illegal character in path at index 13: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar)
java.net.URISyntaxException: Illegal character in path at index 13: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar
       at java.net.URI$Parser.fail(Unknown Source)
       at java.net.URI$Parser.checkChars(Unknown Source)
       at java.net.URI$Parser.parseHierarchical(Unknown Source)
       at java.net.URI$Parser.parse(Unknown Source)
       at java.net.URI.<init>(Unknown Source)
       at org.apache.felix.fileinstall.Jar.<init>(Jar.java:58)
       at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
r.java:686)
       at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
r.java:587)
       at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWa
tcher.java:351)
       at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
va:121)

When I define felix.fileinstall.dir="watchedDir" (i.e. with quotes around the directory) I get the endless loop, when I start up the container. here's a bit of the output:
ERROR    20090612 10:08:33 bid#11       - In main loop, we have serious trouble
(java.lang.NullPointerException)
java.lang.NullPointerException
       at org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
er.java:439)
       at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
va:120)
ERROR    20090612 10:08:33 bid#11       - In main loop, we have serious trouble
(java.lang.NullPointerException)
java.lang.NullPointerException
       at org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
er.java:439)
       at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
va:120)

(this is an endless loop of output)

If I do the same things in a directory that doesn't contain spaces i.e. if I move the whole set up to directly under the E: directory, this doesn't happen.

This is actually an issue since I can't guarantee that anyone else who will checkout and use this code will not be also on Windows and in their home directory (i.e. C:/Documents and Settings/${username}. Really it becomes useless to me as a project solution.

Thanks,
Fiona. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1228) Felix File Install - Spaces in File Names

Posted by "Sahoo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sahoo updated FELIX-1228:
-------------------------

    Attachment: Felix-1228.patch

We should try to treat the bundle location as a file path when it can't be converted to a URI. Attached patch addresses the issue. I tested it on Unix with watchedDir having space as well as watchedDir with files having space char in their name. 
e.g., watchedDir=/tmp/foo bar/, where /tmp/foo bar/ contains "foo baz.jar."

Please test it on Windows and let us know.

This patch does not affect files touched by patch uploaded for issue #1216. So, if you need to test both patches for 1216 and this issue, then you can apply both the patches.

> Felix File Install - Spaces in File Names
> -----------------------------------------
>
>                 Key: FELIX-1228
>                 URL: https://issues.apache.org/jira/browse/FELIX-1228
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions:  fileinstall-1.0.0
>            Reporter: fionamahon
>         Attachments: Felix-1228.patch
>
>
> Note: In terms of creating a patch for this issue - there was already a patch created yesterday for a different issue relating to felix install. I don't think the patch has been released yet - so just to make sure there are not overwrites.
> Issue is below....
> Just in terms of the issue with the spaces, Guido suggested I put quotes around the directory. However this causes the system to go into an endless loop!
> Behaviour is as follows:
> When I define felix.fileinstall.dir=watchedDir (i.e. without quotes), and when 'watchedDir' actually resolves to E:\Documents and Settings\some\path\watchedDir, then I get the following error when I drop a bundle into that directory:
> ERROR    20090612 10:01:28 bid#11       - Failed to install bundle: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar (java.net.URISyntaxException: Illegal character in path at index 13: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar)
> java.net.URISyntaxException: Illegal character in path at index 13: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar
>        at java.net.URI$Parser.fail(Unknown Source)
>        at java.net.URI$Parser.checkChars(Unknown Source)
>        at java.net.URI$Parser.parseHierarchical(Unknown Source)
>        at java.net.URI$Parser.parse(Unknown Source)
>        at java.net.URI.<init>(Unknown Source)
>        at org.apache.felix.fileinstall.Jar.<init>(Jar.java:58)
>        at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
> r.java:686)
>        at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
> r.java:587)
>        at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWa
> tcher.java:351)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:121)
> When I define felix.fileinstall.dir="watchedDir" (i.e. with quotes around the directory) I get the endless loop, when I start up the container. here's a bit of the output:
> ERROR    20090612 10:08:33 bid#11       - In main loop, we have serious trouble
> (java.lang.NullPointerException)
> java.lang.NullPointerException
>        at org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
> er.java:439)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:120)
> ERROR    20090612 10:08:33 bid#11       - In main loop, we have serious trouble
> (java.lang.NullPointerException)
> java.lang.NullPointerException
>        at org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
> er.java:439)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:120)
> (this is an endless loop of output)
> If I do the same things in a directory that doesn't contain spaces i.e. if I move the whole set up to directly under the E: directory, this doesn't happen.
> This is actually an issue since I can't guarantee that anyone else who will checkout and use this code will not be also on Windows and in their home directory (i.e. C:/Documents and Settings/${username}. Really it becomes useless to me as a project solution.
> Thanks,
> Fiona. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-1228) Felix File Install - Spaces in File Names

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall closed FELIX-1228.
----------------------------------

       Resolution: Fixed
    Fix Version/s: fileinstall-1.2.0
         Assignee: Richard S. Hall

Patch confirmed. Committed. Issue closed. Thanks.

> Felix File Install - Spaces in File Names
> -----------------------------------------
>
>                 Key: FELIX-1228
>                 URL: https://issues.apache.org/jira/browse/FELIX-1228
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions:  fileinstall-1.0.0
>            Reporter: fionamahon
>            Assignee: Richard S. Hall
>             Fix For: fileinstall-1.2.0
>
>         Attachments: Felix-1228.patch
>
>
> Note: In terms of creating a patch for this issue - there was already a patch created yesterday for a different issue relating to felix install. I don't think the patch has been released yet - so just to make sure there are not overwrites.
> Issue is below....
> Just in terms of the issue with the spaces, Guido suggested I put quotes around the directory. However this causes the system to go into an endless loop!
> Behaviour is as follows:
> When I define felix.fileinstall.dir=watchedDir (i.e. without quotes), and when 'watchedDir' actually resolves to E:\Documents and Settings\some\path\watchedDir, then I get the following error when I drop a bundle into that directory:
> ERROR    20090612 10:01:28 bid#11       - Failed to install bundle: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar (java.net.URISyntaxException: Illegal character in path at index 13: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar)
> java.net.URISyntaxException: Illegal character in path at index 13: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar
>        at java.net.URI$Parser.fail(Unknown Source)
>        at java.net.URI$Parser.checkChars(Unknown Source)
>        at java.net.URI$Parser.parseHierarchical(Unknown Source)
>        at java.net.URI$Parser.parse(Unknown Source)
>        at java.net.URI.<init>(Unknown Source)
>        at org.apache.felix.fileinstall.Jar.<init>(Jar.java:58)
>        at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
> r.java:686)
>        at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
> r.java:587)
>        at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWa
> tcher.java:351)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:121)
> When I define felix.fileinstall.dir="watchedDir" (i.e. with quotes around the directory) I get the endless loop, when I start up the container. here's a bit of the output:
> ERROR    20090612 10:08:33 bid#11       - In main loop, we have serious trouble
> (java.lang.NullPointerException)
> java.lang.NullPointerException
>        at org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
> er.java:439)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:120)
> ERROR    20090612 10:08:33 bid#11       - In main loop, we have serious trouble
> (java.lang.NullPointerException)
> java.lang.NullPointerException
>        at org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
> er.java:439)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:120)
> (this is an endless loop of output)
> If I do the same things in a directory that doesn't contain spaces i.e. if I move the whole set up to directly under the E: directory, this doesn't happen.
> This is actually an issue since I can't guarantee that anyone else who will checkout and use this code will not be also on Windows and in their home directory (i.e. C:/Documents and Settings/${username}. Really it becomes useless to me as a project solution.
> Thanks,
> Fiona. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1228) Felix File Install - Spaces in File Names

Posted by "Sahoo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720625#action_12720625 ] 

Sahoo commented on FELIX-1228:
------------------------------

In users@ alias, submitter has confirmed the patch to be working. SO, someone, please integrate it in workspace.

> Felix File Install - Spaces in File Names
> -----------------------------------------
>
>                 Key: FELIX-1228
>                 URL: https://issues.apache.org/jira/browse/FELIX-1228
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions:  fileinstall-1.0.0
>            Reporter: fionamahon
>         Attachments: Felix-1228.patch
>
>
> Note: In terms of creating a patch for this issue - there was already a patch created yesterday for a different issue relating to felix install. I don't think the patch has been released yet - so just to make sure there are not overwrites.
> Issue is below....
> Just in terms of the issue with the spaces, Guido suggested I put quotes around the directory. However this causes the system to go into an endless loop!
> Behaviour is as follows:
> When I define felix.fileinstall.dir=watchedDir (i.e. without quotes), and when 'watchedDir' actually resolves to E:\Documents and Settings\some\path\watchedDir, then I get the following error when I drop a bundle into that directory:
> ERROR    20090612 10:01:28 bid#11       - Failed to install bundle: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar (java.net.URISyntaxException: Illegal character in path at index 13: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar)
> java.net.URISyntaxException: Illegal character in path at index 13: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar
>        at java.net.URI$Parser.fail(Unknown Source)
>        at java.net.URI$Parser.checkChars(Unknown Source)
>        at java.net.URI$Parser.parseHierarchical(Unknown Source)
>        at java.net.URI$Parser.parse(Unknown Source)
>        at java.net.URI.<init>(Unknown Source)
>        at org.apache.felix.fileinstall.Jar.<init>(Jar.java:58)
>        at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
> r.java:686)
>        at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
> r.java:587)
>        at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWa
> tcher.java:351)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:121)
> When I define felix.fileinstall.dir="watchedDir" (i.e. with quotes around the directory) I get the endless loop, when I start up the container. here's a bit of the output:
> ERROR    20090612 10:08:33 bid#11       - In main loop, we have serious trouble
> (java.lang.NullPointerException)
> java.lang.NullPointerException
>        at org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
> er.java:439)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:120)
> ERROR    20090612 10:08:33 bid#11       - In main loop, we have serious trouble
> (java.lang.NullPointerException)
> java.lang.NullPointerException
>        at org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
> er.java:439)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:120)
> (this is an endless loop of output)
> If I do the same things in a directory that doesn't contain spaces i.e. if I move the whole set up to directly under the E: directory, this doesn't happen.
> This is actually an issue since I can't guarantee that anyone else who will checkout and use this code will not be also on Windows and in their home directory (i.e. C:/Documents and Settings/${username}. Really it becomes useless to me as a project solution.
> Thanks,
> Fiona. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1228) Felix File Install - Spaces in File Names

Posted by "Sahoo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719618#action_12719618 ] 

Sahoo commented on FELIX-1228:
------------------------------

Fiona,

Did you get a chance to test it on Windows? We are waiting for your feedback about the patch before integrating it. The sooner you do it, the better, else this bug may miss the next maintenance release.

Sahoo

> Felix File Install - Spaces in File Names
> -----------------------------------------
>
>                 Key: FELIX-1228
>                 URL: https://issues.apache.org/jira/browse/FELIX-1228
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions:  fileinstall-1.0.0
>            Reporter: fionamahon
>         Attachments: Felix-1228.patch
>
>
> Note: In terms of creating a patch for this issue - there was already a patch created yesterday for a different issue relating to felix install. I don't think the patch has been released yet - so just to make sure there are not overwrites.
> Issue is below....
> Just in terms of the issue with the spaces, Guido suggested I put quotes around the directory. However this causes the system to go into an endless loop!
> Behaviour is as follows:
> When I define felix.fileinstall.dir=watchedDir (i.e. without quotes), and when 'watchedDir' actually resolves to E:\Documents and Settings\some\path\watchedDir, then I get the following error when I drop a bundle into that directory:
> ERROR    20090612 10:01:28 bid#11       - Failed to install bundle: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar (java.net.URISyntaxException: Illegal character in path at index 13: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar)
> java.net.URISyntaxException: Illegal character in path at index 13: /E:/Documents and Settings/some/path/watchedDir/print-service-0.0.2.jar
>        at java.net.URI$Parser.fail(Unknown Source)
>        at java.net.URI$Parser.checkChars(Unknown Source)
>        at java.net.URI$Parser.parseHierarchical(Unknown Source)
>        at java.net.URI$Parser.parse(Unknown Source)
>        at java.net.URI.<init>(Unknown Source)
>        at org.apache.felix.fileinstall.Jar.<init>(Jar.java:58)
>        at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
> r.java:686)
>        at org.apache.felix.fileinstall.DirectoryWatcher.install(DirectoryWatche
> r.java:587)
>        at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWa
> tcher.java:351)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:121)
> When I define felix.fileinstall.dir="watchedDir" (i.e. with quotes around the directory) I get the endless loop, when I start up the container. here's a bit of the output:
> ERROR    20090612 10:08:33 bid#11       - In main loop, we have serious trouble
> (java.lang.NullPointerException)
> java.lang.NullPointerException
>        at org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
> er.java:439)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:120)
> ERROR    20090612 10:08:33 bid#11       - In main loop, we have serious trouble
> (java.lang.NullPointerException)
> java.lang.NullPointerException
>        at org.apache.felix.fileinstall.DirectoryWatcher.traverse(DirectoryWatch
> er.java:439)
>        at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.ja
> va:120)
> (this is an endless loop of output)
> If I do the same things in a directory that doesn't contain spaces i.e. if I move the whole set up to directly under the E: directory, this doesn't happen.
> This is actually an issue since I can't guarantee that anyone else who will checkout and use this code will not be also on Windows and in their home directory (i.e. C:/Documents and Settings/${username}. Really it becomes useless to me as a project solution.
> Thanks,
> Fiona. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.