The URLCodec.encode() seems to be the same as java.net.URLEncoder.encode(). But they encode is a different scheme, for example, ' ' --> '+' instead of "%20".

Thanks,
Raymond

----- Original Message ----- From: "Jim Marino" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, July 14, 2006 10:42 PM
Subject: Re: [PATCH] Chianti launcher cannot boot from a jar file whose path contains spaces


I just took a look and it's over 1MB. Do you think it is worth the dependency?

Jim

On Jul 14, 2006, at 10:32 PM, Kenneth Tam wrote:

Quick question -- have you looked at using e.g. the commons-codec
URLCodec.encode() ?  I think it should solve this problem as well.

On 7/14/06, Raymond Feng <[EMAIL PROTECTED]> wrote:


Hi,

URL returned from Class.getResource() sometimes does not strictly conform to RFC2396. As a result, running "mvn" command in "calculator" folder directly
fails with the following the exception.

Please review and apply.

Thanks,
Raymond

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running calculator.CalculatorTestCase
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.37 sec <<<
FAI
LURE!
testCalculator(calculator.CalculatorTestCase) Time elapsed: 0.27 sec <<<
ERROR
!
java.lang.IllegalArgumentException
        at java.net.URI.create(URI.java:854)
        at
org.apache.tuscany.core.launcher.Launcher.getInstallDirectory(Launche
r.java:239)
        at
org.apache.tuscany.core.launcher.Launcher.bootRuntime(Launcher.java:1
55)
        at
org.apache.tuscany.test.SCATestCase.setUp(SCATestCase.java:39)
        at
calculator.CalculatorTestCase.setUp(CalculatorTestCase.java:32)
        at
junit.framework.TestCase.runBare(TestCase.java:125)
        at
junit.framework.TestResult$1.protect(TestResult.java:106)
        at
junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at
junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:64)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav
a:210)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:135)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:122)
        at
org.apache.maven.surefire.Surefire.run(Surefire.java:129)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:64)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:225)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:747)
Caused by: java.net.URISyntaxException: Illegal character in path at index
18: f
ile:/C:/Documents and
Settings/zfeng/.m2/repository/org/apache/tuscany/core/1.0-
chianti-SNAPSHOT/core-1.0-chianti-SNAPSHOT.jar
        at java.net.URI$Parser.fail(URI.java:2821)
        at java.net.URI$Parser.checkChars(URI.java:2994)
        at
java.net.URI$Parser.parseHierarchical(URI.java:3078)
        at java.net.URI$Parser.parse(URI.java:3026)
        at java.net.URI.<init>(URI.java:590)
        at java.net.URI.create(URI.java:852)
        ... 25 more



---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to