You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Rob Vesse (JIRA)" <ji...@apache.org> on 2012/07/26 01:36:34 UTC

[jira] [Created] (JENA-286) Windows Batch scripts don't handle paths with spaces correctly

Rob Vesse created JENA-286:
------------------------------

             Summary: Windows Batch scripts don't handle paths with spaces correctly
                 Key: JENA-286
                 URL: https://issues.apache.org/jira/browse/JENA-286
             Project: Apache Jena
          Issue Type: Bug
            Reporter: Rob Vesse
            Assignee: Rob Vesse


In tracking down the error reported by a user on the mailing list with running the scripts on Windows I discovered they don't appropriately handle spaces.

While someone clearly wrote them with this in mind as written it doesn't work.  For example consider sparql.bat which is written like so currently:

set JVM_ARGS=-Xmx1024M
set JENA_CP="%JENAROOT%\lib\*;"
set LOGGING=-Dlog4j.configuration=file:%JENAROOT%/jena-log4j.properties

java %JVM_ARGS% %LOGGING% -cp %JENA_CP% arq.sparql %*
exit /B


In order to work correctly it must actually be written like this:

set JVM_ARGS=-Xmx1024M
set JENA_CP=%JENAROOT%\lib\*;

java %JVM_ARGS% -Dlog4j.configuration="file:%JENAROOT%/jena-log4j.properties" -cp "%JENA_CP%" arq.sparql %*
exit /B

The cause of the error is that quotes used when setting a variable do not actually carry through when that variable is accessed

Issue will be closed when all batch scripts are appropriately updated

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (JENA-286) Windows Batch scripts don't handle paths with spaces correctly

Posted by "Rob Vesse (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424904#comment-13424904 ] 

Rob Vesse commented on JENA-286:
--------------------------------

I didn't realise the scripts were generated from a template, I will check the changes
                
> Windows Batch scripts don't handle paths with spaces correctly
> --------------------------------------------------------------
>
>                 Key: JENA-286
>                 URL: https://issues.apache.org/jira/browse/JENA-286
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ, Jena, RIOT, TDB
>    Affects Versions: Jena 2.7.2
>         Environment: Windows
>            Reporter: Rob Vesse
>            Assignee: Rob Vesse
>             Fix For: Jena 2.7.3
>
>
> In tracking down the error reported by a user on the mailing list with running the scripts on Windows I discovered they don't appropriately handle spaces.
> While someone clearly wrote them with this in mind as written it doesn't work.  For example consider sparql.bat which is written like so currently:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP="%JENAROOT%\lib\*;"
> set LOGGING=-Dlog4j.configuration=file:%JENAROOT%/jena-log4j.properties
> java %JVM_ARGS% %LOGGING% -cp %JENA_CP% arq.sparql %*
> exit /B
> In order to work correctly it must actually be written like this:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP=%JENAROOT%\lib\*;
> java %JVM_ARGS% -Dlog4j.configuration="file:%JENAROOT%/jena-log4j.properties" -cp "%JENA_CP%" arq.sparql %*
> exit /B
> The cause of the error is that quotes used when setting a variable do not actually carry through when that variable is accessed
> Issue will be closed when all batch scripts are appropriately updated

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (JENA-286) Windows Batch scripts don't handle paths with spaces correctly

Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424506#comment-13424506 ] 

Andy Seaborne commented on JENA-286:
------------------------------------

The bat scripts are generated by the script "cmd-maker" and template "template.bat".  I've ported the fixed to the template, set the line-endings to DOS style and regenerated the scripts.

Tested with a directory with a space in a directory component name.

                
> Windows Batch scripts don't handle paths with spaces correctly
> --------------------------------------------------------------
>
>                 Key: JENA-286
>                 URL: https://issues.apache.org/jira/browse/JENA-286
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ, Jena, RIOT, TDB
>    Affects Versions: Jena 2.7.2
>         Environment: Windows
>            Reporter: Rob Vesse
>            Assignee: Rob Vesse
>             Fix For: Jena 2.7.3
>
>
> In tracking down the error reported by a user on the mailing list with running the scripts on Windows I discovered they don't appropriately handle spaces.
> While someone clearly wrote them with this in mind as written it doesn't work.  For example consider sparql.bat which is written like so currently:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP="%JENAROOT%\lib\*;"
> set LOGGING=-Dlog4j.configuration=file:%JENAROOT%/jena-log4j.properties
> java %JVM_ARGS% %LOGGING% -cp %JENA_CP% arq.sparql %*
> exit /B
> In order to work correctly it must actually be written like this:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP=%JENAROOT%\lib\*;
> java %JVM_ARGS% -Dlog4j.configuration="file:%JENAROOT%/jena-log4j.properties" -cp "%JENA_CP%" arq.sparql %*
> exit /B
> The cause of the error is that quotes used when setting a variable do not actually carry through when that variable is accessed
> Issue will be closed when all batch scripts are appropriately updated

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (JENA-286) Windows Batch scripts don't handle paths with spaces correctly

Posted by "Rob Vesse (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422748#comment-13422748 ] 

Rob Vesse commented on JENA-286:
--------------------------------

Should now be fixed in Trunk, will leave open to allow others to test and for a snapshot to be produced with the change so the affected user can be asked to check the change resolves their issue.

In my local testing this change does resolve the issue when paths contain spaces

Also added a note to the README about checking that JENAROOT is set correctly by doing a simple cd $JENAROOT
                
> Windows Batch scripts don't handle paths with spaces correctly
> --------------------------------------------------------------
>
>                 Key: JENA-286
>                 URL: https://issues.apache.org/jira/browse/JENA-286
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ, Jena, RIOT, TDB
>    Affects Versions: Jena 2.7.2
>            Reporter: Rob Vesse
>            Assignee: Rob Vesse
>             Fix For: Jena 2.7.3
>
>
> In tracking down the error reported by a user on the mailing list with running the scripts on Windows I discovered they don't appropriately handle spaces.
> While someone clearly wrote them with this in mind as written it doesn't work.  For example consider sparql.bat which is written like so currently:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP="%JENAROOT%\lib\*;"
> set LOGGING=-Dlog4j.configuration=file:%JENAROOT%/jena-log4j.properties
> java %JVM_ARGS% %LOGGING% -cp %JENA_CP% arq.sparql %*
> exit /B
> In order to work correctly it must actually be written like this:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP=%JENAROOT%\lib\*;
> java %JVM_ARGS% -Dlog4j.configuration="file:%JENAROOT%/jena-log4j.properties" -cp "%JENA_CP%" arq.sparql %*
> exit /B
> The cause of the error is that quotes used when setting a variable do not actually carry through when that variable is accessed
> Issue will be closed when all batch scripts are appropriately updated

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (JENA-286) Windows Batch scripts don't handle paths with spaces correctly

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

Andy Seaborne closed JENA-286.
------------------------------

    
> Windows Batch scripts don't handle paths with spaces correctly
> --------------------------------------------------------------
>
>                 Key: JENA-286
>                 URL: https://issues.apache.org/jira/browse/JENA-286
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ, Jena, RIOT, TDB
>    Affects Versions: Jena 2.7.2
>         Environment: Windows
>            Reporter: Rob Vesse
>            Assignee: Rob Vesse
>             Fix For: Jena 2.7.3
>
>
> In tracking down the error reported by a user on the mailing list with running the scripts on Windows I discovered they don't appropriately handle spaces.
> While someone clearly wrote them with this in mind as written it doesn't work.  For example consider sparql.bat which is written like so currently:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP="%JENAROOT%\lib\*;"
> set LOGGING=-Dlog4j.configuration=file:%JENAROOT%/jena-log4j.properties
> java %JVM_ARGS% %LOGGING% -cp %JENA_CP% arq.sparql %*
> exit /B
> In order to work correctly it must actually be written like this:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP=%JENAROOT%\lib\*;
> java %JVM_ARGS% -Dlog4j.configuration="file:%JENAROOT%/jena-log4j.properties" -cp "%JENA_CP%" arq.sparql %*
> exit /B
> The cause of the error is that quotes used when setting a variable do not actually carry through when that variable is accessed
> Issue will be closed when all batch scripts are appropriately updated

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (JENA-286) Windows Batch scripts don't handle paths with spaces correctly

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

Andy Seaborne resolved JENA-286.
--------------------------------

    Resolution: Fixed

Please check.
                
> Windows Batch scripts don't handle paths with spaces correctly
> --------------------------------------------------------------
>
>                 Key: JENA-286
>                 URL: https://issues.apache.org/jira/browse/JENA-286
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ, Jena, RIOT, TDB
>    Affects Versions: Jena 2.7.2
>         Environment: Windows
>            Reporter: Rob Vesse
>            Assignee: Rob Vesse
>             Fix For: Jena 2.7.3
>
>
> In tracking down the error reported by a user on the mailing list with running the scripts on Windows I discovered they don't appropriately handle spaces.
> While someone clearly wrote them with this in mind as written it doesn't work.  For example consider sparql.bat which is written like so currently:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP="%JENAROOT%\lib\*;"
> set LOGGING=-Dlog4j.configuration=file:%JENAROOT%/jena-log4j.properties
> java %JVM_ARGS% %LOGGING% -cp %JENA_CP% arq.sparql %*
> exit /B
> In order to work correctly it must actually be written like this:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP=%JENAROOT%\lib\*;
> java %JVM_ARGS% -Dlog4j.configuration="file:%JENAROOT%/jena-log4j.properties" -cp "%JENA_CP%" arq.sparql %*
> exit /B
> The cause of the error is that quotes used when setting a variable do not actually carry through when that variable is accessed
> Issue will be closed when all batch scripts are appropriately updated

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JENA-286) Windows Batch scripts don't handle paths with spaces correctly

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

Rob Vesse updated JENA-286:
---------------------------

          Component/s: TDB
                       RIOT
                       Jena
                       ARQ
          Environment: Windows
    Affects Version/s: Jena 2.7.2
        Fix Version/s: Jena 2.7.3
    
> Windows Batch scripts don't handle paths with spaces correctly
> --------------------------------------------------------------
>
>                 Key: JENA-286
>                 URL: https://issues.apache.org/jira/browse/JENA-286
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ, Jena, RIOT, TDB
>    Affects Versions: Jena 2.7.2
>         Environment: Windows
>            Reporter: Rob Vesse
>            Assignee: Rob Vesse
>             Fix For: Jena 2.7.3
>
>
> In tracking down the error reported by a user on the mailing list with running the scripts on Windows I discovered they don't appropriately handle spaces.
> While someone clearly wrote them with this in mind as written it doesn't work.  For example consider sparql.bat which is written like so currently:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP="%JENAROOT%\lib\*;"
> set LOGGING=-Dlog4j.configuration=file:%JENAROOT%/jena-log4j.properties
> java %JVM_ARGS% %LOGGING% -cp %JENA_CP% arq.sparql %*
> exit /B
> In order to work correctly it must actually be written like this:
> set JVM_ARGS=-Xmx1024M
> set JENA_CP=%JENAROOT%\lib\*;
> java %JVM_ARGS% -Dlog4j.configuration="file:%JENAROOT%/jena-log4j.properties" -cp "%JENA_CP%" arq.sparql %*
> exit /B
> The cause of the error is that quotes used when setting a variable do not actually carry through when that variable is accessed
> Issue will be closed when all batch scripts are appropriately updated

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira