Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rhino class aliasing #289

Closed
perimosocordiae opened this issue Feb 10, 2014 · 3 comments
Closed

rhino class aliasing #289

perimosocordiae opened this issue Feb 10, 2014 · 3 comments

Comments

@perimosocordiae
Copy link
Contributor

In the release demo (browser frontend):

/tmp$ rhino
js> 5 + 7
12
js> 5 + 6
11
js> 
/tmp$ 
/tmp$ java -classpath /sys classes.demo.Fib
fib(20) = 6765
/tmp$ rhino
js> 5 + 7
Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.sun.tools.script.shell.Main.processSource(Main.java:267)
    at com.sun.tools.script.shell.Main.access$100(Main.java:37)
    at com.sun.tools.script.shell.Main$1.run(Main.java:184)
    at com.sun.tools.script.shell.Main.main(Main.java:48)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.String
    at java.util.Locale.getDefault(Locale.java:399)
    at com.sun.tools.script.shell.Main.<clinit>(Main.java:585)
    ... 4 more
/tmp$  

Looks like we somehow have two java.lang.String classes loaded at once. I haven't been able to reproduce this with anything other than Rhino, though.

@jvilk
Copy link
Member

jvilk commented Feb 10, 2014

Huh? Are you using the latest version? This problem would only manifest if you had caching enabled.

How did you interrupt rhino? You didn't use exit()?

@jvilk
Copy link
Member

jvilk commented Feb 10, 2014

$ rhino
js> 5+7
12
js> 5+6
11
js> exit()
/tmp$ java -classpath /sys classes.demo.Fib
fib(20) = 6765
/tmp$ rhino
js> 5+7
12

@perimosocordiae
Copy link
Contributor Author

Looks like it was due to me crashing Rhino with a broken Ctrl-D. Works fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants