[ 
https://issues.apache.org/jira/browse/FELIX-4697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14222353#comment-14222353
 ] 

Tadeáš Palusga commented on FELIX-4697:
---------------------------------------

Yesterday I got into the same issue. And it takes me too much time to find the 
bug and then to find this bug report.
 
So first, I'd like to add some exception message output because google will 
index it sooner or later :)

{noformat}
bundle://5.0:1/gosh_profile:17.22: EOFException: unexpected EOT looking for 
matching ')'
java.io.EOFException: unexpected EOT looking for matching ')'
        at org.apache.felix.gogo.runtime.Closure.setLocation(Closure.java:101)
        at org.apache.felix.gogo.runtime.Closure.<init>(Closure.java:61)
        at org.apache.felix.gogo.runtime.Closure.eval(Closure.java:277)
        at 
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:339)
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:179)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:116)
        at 
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
        at org.apache.felix.gogo.shell.Shell.source(Shell.java:192)
        at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:109)
        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 org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
        at 
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
        at 
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:179)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:116)
        at 
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
        at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.felix.gogo.runtime.EOFError: unexpected EOT looking for 
matching ')'
        at org.apache.felix.gogo.runtime.Tokenizer.group(Tokenizer.java:328)
        at org.apache.felix.gogo.runtime.Tokenizer.next(Tokenizer.java:179)
        at org.apache.felix.gogo.runtime.Parser.command(Parser.java:109)
        at org.apache.felix.gogo.runtime.Parser.pipeline(Parser.java:68)
        at org.apache.felix.gogo.runtime.Parser.program(Parser.java:44)
        at org.apache.felix.gogo.runtime.Closure.<init>(Closure.java:57)
        ... 22 more
{noformat}

Second, why not use $${} ... I suggest to use $$ because $$ is currently an 
illegal combination so it shouldn't break anythink and it is also backward 
compatible.

> Error parsing the default gosh_profile.
> ---------------------------------------
>
>                 Key: FELIX-4697
>                 URL: https://issues.apache.org/jira/browse/FELIX-4697
>             Project: Felix
>          Issue Type: Bug
>          Components: Gogo Runtime
>    Affects Versions: gogo.runtime-0.14.0
>            Reporter: J.W. Janssen
>
> It appears that the implementation of FELIX-4671 has caused an unexpected 
> side-effect in the parsing of the default {{gosh_profile}}. More 
> specifically: the Tokenizer now bails out on the following expression:
> {code}
>     addcommand system (((${.context} bundles) 0) loadclass java.lang.System)
> {code}
> The reason for this is that the {{((}} makes the Tokenizer believe that it 
> should keep parsing until {{))}} is found, which isn't the case in the above 
> situation. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to