From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24744 invoked by alias); 21 May 2014 21:29:55 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 24730 invoked by uid 89); 21 May 2014 21:29:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yh0-f44.google.com Received: from mail-yh0-f44.google.com (HELO mail-yh0-f44.google.com) (209.85.213.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 21 May 2014 21:29:51 +0000 Received: by mail-yh0-f44.google.com with SMTP id b6so2223713yha.17 for ; Wed, 21 May 2014 14:29:49 -0700 (PDT) X-Received: by 10.236.15.161 with SMTP id f21mr78659361yhf.94.1400707789592; Wed, 21 May 2014 14:29:49 -0700 (PDT) Received: from [10.201.200.72] ([209.49.233.137]) by mx.google.com with ESMTPSA id t31sm36178465yhj.7.2014.05.21.14.29.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 May 2014 14:29:48 -0700 (PDT) Message-ID: <537D1ACB.1050504@gmail.com> Date: Wed, 21 May 2014 21:29:00 -0000 From: Weiqi Gao User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: kawa@sourceware.org Subject: Exception when trying to eval a Scheme form through javax.script API Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-q2/txt/msg00070.txt.bz2 Hi, While trying to use Kawa as the ScriptEngine in a Java application that supports "any JSR-223" language, I encountered the following issue. The following program, which is essentially what the Java application does, throws the ScriptException listed after the program. I have kawa-1.14.1.jar built from the HEAD of the svn repo on the classpath. -- Weiqi Gao ========== 8< ========== 8< ========== 8< ========== import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; public class Foo { public static void main(String[] args) { ScriptEngineManager manager = new ScriptEngineManager(); final ScriptEngine engine = manager.getEngineByName("kawa"); engine.eval("(display 10)"); } } ========== 8< ========== 8< ========== 8< ========== Exception in thread "main" javax.script.ScriptException: java.lang.IllegalArgumentException: Illegal character in path at index 0: at gnu.expr.KawaScriptEngine.compile(KawaScriptEngine.java:92) at gnu.expr.KawaScriptEngine.eval(KawaScriptEngine.java:54) at gnu.expr.KawaScriptEngine.eval(KawaScriptEngine.java:48) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) at Foo.main(Foo.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) Caused by: java.lang.IllegalArgumentException: Illegal character in path at index 0: at java.net.URI.create(URI.java:852) at java.net.URI.resolve(URI.java:1036) at gnu.kawa.io.FilePath.resolve(FilePath.java:270) at gnu.kawa.io.Path.resolve(Path.java:308) at gnu.kawa.io.Path.getAbsolute(Path.java:428) at gnu.kawa.io.FilePath.toURL(FilePath.java:220) at gnu.expr.KawaScriptEngine.compile(KawaScriptEngine.java:117) at gnu.expr.KawaScriptEngine.compile(KawaScriptEngine.java:76) ... 9 more Caused by: java.net.URISyntaxException: Illegal character in path at index 0: at java.net.URI$Parser.fail(URI.java:2848) at java.net.URI$Parser.checkChars(URI.java:3021) at java.net.URI$Parser.parseHierarchical(URI.java:3105) at java.net.URI$Parser.parse(URI.java:3063) at java.net.URI.(URI.java:588) at java.net.URI.create(URI.java:850) ... 16 more