db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John H. Embretsen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1619) Sysinfo in 10.2 shows multiple entries if the derby jars reside in a directory with spaces in its name
Date Tue, 01 Aug 2006 11:32:16 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1619?page=comments#action_12424832 ] 
            
John H. Embretsen commented on DERBY-1619:
------------------------------------------

I tried  derby-1619-v1.diff, and it works as a remedy against the spaces in path issue. However:

The same thing happens if other special characters that are escaped in an URL are used in
the jar path. For example, with the path

/export/home/tmp/Derby/jar-path-with%percentage-sign

on a Solaris machine, sysinfo ('java org.apache.derby.tools.sysinfo') reports

--------- Derby Information --------
JRE - JDBC: J2SE 5.0 - JDBC 3.0
[/export/home/tmp/Derby/jar-path-with%25percentage-sign/derby.jar] 10.2.0.5 alpha - (427500)
[/export/home/tmp/Derby/jar-path-with%25percentage-sign/derbytools.jar] 10.2.0.5 alpha - (427500)
[/export/home/tmp/Derby/jar-path-with%25percentage-sign/derbynet.jar] 10.2.0.5 alpha - (427500)
[/export/home/tmp/Derby/jar-path-with%25percentage-sign/derbyclient.jar] 10.2.0.5 alpha -
(427500)
[/export/home/tmp/Derby/jar-path-with%percentage-sign/derby.jar] 10.2.0.5 alpha - (427500)
[/export/home/tmp/Derby/jar-path-with%percentage-sign/derbynet.jar] 10.2.0.5 alpha - (427500)
[/export/home/tmp/Derby/jar-path-with%percentage-sign/derbytools.jar] 10.2.0.5 alpha - (427500)
[/export/home/tmp/Derby/jar-path-with%percentage-sign/derbyclient.jar] 10.2.0.5 alpha - (427500)


This is not an issue when running sysinfo by doing 'java -jar derbyrun.jar sysinfo'.

Quoting from http://www.ietf.org/rfc/rfc2396.txt (section 2.4.2):

   Because the percent "%" character always has the reserved purpose of
   being the escape indicator, it must be escaped as "%25" in order to
   be used as data within a URI.  Implementers should be careful not to
   escape or unescape the same string more than once, since unescaping
   an already unescaped string might lead to misinterpreting a percent
   data character as another escaped character, or vice versa in the
   case of escaping an already escaped string.

(end quote)

I'm not sure how this is normally handled in the java world.
We could try to fix this, or document it as "normal" sysinfo behavior (if not run via 'java
-jar') when using special characters in the code/jar path.

I don't know which characters Java usually escapes in URLs, but the most important ones are
listed in RFC-2396. Other posibilities are listed here: 
http://www.degraeve.com/reference/urlencoding.php


> Sysinfo in 10.2  shows multiple entries if the derby jars reside in a directory with
spaces in its name
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1619
>                 URL: http://issues.apache.org/jira/browse/DERBY-1619
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.2.0.0
>         Environment: Windows XP, jdk 1.5
>            Reporter: Rajesh Kartha
>         Assigned To: Andrew McIntyre
>             Fix For: 10.2.0.0
>
>         Attachments: derby-1619-v1.diff
>
>
> For the Derby jars residing in C:\Documents and Settings\Administrator\TEMP DIR\lib,
the sysinfo shows:
> --------- Derby Information --------
> JRE - JDBC: J2SE 5.0 - JDBC 3.0
> [C:\Documents%20and%20Settings\Administrator\TEMP%20DIR\lib\derby.jar] 10.2.0.5 alpha
- (426734)
> [C:\Documents%20and%20Settings\Administrator\TEMP%20DIR\lib\derbytools.jar] 10.2.0.5
alpha - (426734)
> [C:\Documents%20and%20Settings\Administrator\TEMP%20DIR\lib\derbynet.jar] 10.2.0.5 alpha
- (426734)
> [C:\Documents%20and%20Settings\Administrator\TEMP%20DIR\lib\derbyclient.jar] 10.2.0.5
alpha - (426734)
> [C:\Documents and Settings\Administrator\TEMP DIR\lib\derby.jar] 10.2.0.5 alpha - (426734)
> [C:\Documents and Settings\Administrator\TEMP DIR\lib\derbynet.jar] 10.2.0.5 alpha -
(426734)
> [C:\Documents and Settings\Administrator\TEMP DIR\lib\derbyclient.jar] 10.2.0.5 alpha
- (426734)
> [C:\Documents and Settings\Administrator\TEMP DIR\lib\derbytools.jar] 10.2.0.5 alpha
- (426734)
> [C:\Documents%20and%20Settings\Administrator\TEMP%20DIR\lib\db2jcc.jar] 2.6 - (90)
> [C:\Documents and Settings\Administrator\TEMP DIR\lib\db2jcc_license_c.jar] 2.6 - (90)
> ------------------------------------------------------
> This is a regression from 10.1 where the same sysinfo shows:
> --------- Derby Information --------
> JRE - JDBC: J2SE 5.0 - JDBC 3.0
> [C:\Documents and Settings\Administrator\TEMP DIR\lib\derby.jar] 10.1.3.2 - (426741)
> [C:\Documents and Settings\Administrator\TEMP DIR\lib\derbynet.jar] 10.1.3.2 - (426741)
> [C:\Documents and Settings\Administrator\TEMP DIR\lib\derbyclient.jar] 10.1.3.2 - (426741)
> [C:\Documents and Settings\Administrator\TEMP DIR\lib\derbytools.jar] 10.1.3.2 - (426741)
> [C:\Documents and Settings\Administrator\TEMP DIR\lib\db2jcc.jar] 2.6 - (90)
> [C:\Documents and Settings\Administrator\TEMP DIR\lib\db2jcc_license_c.jar] 2.6 - (90)
> ------------------------------------------------------

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message