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

Michael Dürig commented on SLING-2012:
--------------------------------------

The issue might be due to a race in ScalaScriptEngine#eval(): 

Thread A: acquires the write lock
Thread A: calls interpreter.compile
Thread A: leaves the write lock

Thread B: acquires the write lock
Thread B: calls interpreter.compile
Thread B: leaves the write lock

Thread A: acquires the read lock
Thread A: calls interpreter.execute

At this point Thread A will call the classes generated by the script of Thread 
B (*)

(*) the classes might be different due to the bindings wrapper generated on the 
fly. See SLING-1236

> Sling Scala Hello World example concurrent access fails
> -------------------------------------------------------
>
>                 Key: SLING-2012
>                 URL: https://issues.apache.org/jira/browse/SLING-2012
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>            Reporter: Alex Parvulescu
>            Priority: Minor
>         Attachments: SLING-2012-logs.zip, ScriptEngineTest.scala.zip
>
>
> https://cwiki.apache.org/confluence/display/SLING/Using+Scala+with+Sling
> Installed Scala Hello World. Checked 
> http://localhost:8888/content/helloworld.html it works!
> Next, hit refresh 2/3 times, it breaks with 500 errors. 
> I'll attach some error logs

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to