Mantis - Quercus
Viewing Issue Advanced Details
1914 major always 07-30-07 13:01 07-01-07 11:48
fredo  
nam  
normal  
closed 3.1.3  
fixed  
none    
none 3.1.3  
0001914: Quercus not running properly under jrunscript (jdk6) and ScriptEngineManager
as reported in [Quercus 0001826]:

the document
http://java.sun.com/javase/6/docs/technotes/guides/scripting/programmer_guide/index.html [^]
describes how to run any jsr-223 compliant scripting engine
from java and "jrunscript" is the command-line tool equivalent.

Quercus is missing certain methods that the ScriptEngine
interface defines, namely the context-less methods:

 Object eval(Reader reader)
 Object eval(Reader reader, Bindings n)
 Object eval(String script)
 Object eval(String script, Bindings n)

in QuercusScriptEngine.java (latest svn)

--------------------------------------------------
C:\resin-pro-3.1.2\lib>\java\jdk6u2\bin\jrunscript -cp quercus.jar;resin-util.jar -l php
30.07.2007 21:58:33 com.caucho.quercus.Quercus parseServicesModule
INFO: Failed loading com.caucho.quercus.lib.ApacheModule
java.lang.NoClassDefFoundError: javax/servlet/ServletRequest
30.07.2007 21:58:33 com.caucho.quercus.Quercus parseServicesModule
INFO: Failed loading com.caucho.quercus.lib.MailModule
java.lang.NoClassDefFoundError: javax/mail/Address
30.07.2007 21:58:33 com.caucho.quercus.Quercus parseServicesModule
INFO: Failed loading com.caucho.quercus.lib.QuercusModule
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
30.07.2007 21:58:33 com.caucho.quercus.Quercus parseServicesModule
INFO: Failed loading com.caucho.quercus.lib.i18n.UnicodeModule
java.lang.NoClassDefFoundError: javax/mail/MessagingException
quercus> <? phpinfo(); ?>
1
quercus>
--------------------------------------------------

since i dont see any output with jars of latest resin package
the bug still exists.

Notes
(0002167)
nam   
07-01-07 11:48   
jrunscript wasn't flushing the stdout buffer. So output will not be seen until the buffer is full.

To make sure output is seen in a timely manner, QuercusScriptEngine will now flush the buffer at the end of eval().