Hi Felix,

Thanks for giving me an idea. Let me ask a couple questions since I'm
sill struggling to get things work.
I followed the instruction described at
http://incubator.apache.org/sling/site/discover-sling-in-15-minutes.html
to install and start sling. I could probably intall JRuby engine
successfully by using the form in
http://localhost:8888/system/console/list. When I looked at
http://localhost:8888/system/console/list after restarting jetty
server, I could see the entry "40 JRuby JSR223 Engine" showed up in
the list. However, the status was "Installed" and not "Active." When I
clicked on a start button on the left, an error.log said as follows:

03.09.2008 09:39:00.287 *ERROR* [btpool0-1] org.apache.felix.webconsole Cannot s
tart (org.osgi.framework.BundleException: Unresolved package in bundle 40: packa
ge; (package=org.jruby.runtime.builtin)) org.osgi.framework.BundleException: Unr
esolved package in bundle 40: package; (package=org.jruby.runtime.builtin)
        at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1728)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1591)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1544)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:371)
        at org.apache.felix.webconsole.internal.core.StartAction.performAction(S
tartAction.java:58)
        at org.apache.felix.webconsole.internal.servlet.OsgiManager.handleAction
(OsgiManager.java:306)
(skip)

JSR 223 JRuby engine needes JRuby archives to get it start. How can I
install jruby.jar into Sling or where to put ruby.jar in a directory
tree?

My another question is where /apps/sling/nonexisting/GET.erb should be
in the sling directory tree? I tried curl command as in "Create some
content" section of
http://incubator.apache.org/sling/site/discover-sling-in-15-minutes.html.
However, I don't have /apps/foo/bar directory anywhere under the sling
directory tree. Am I missing something?

My last question is what document should I read to know how to get JSR
223 scripting engines work? I googled but could not find any document
available.

Thanks

-Yoko

On Sun, Aug 31, 2008 at 3:02 PM, Felix Meschberger <[EMAIL PROTECTED]> wrote:
> Hi Yoko,
>
> Yoko Harada schrieb:
>>
>> Hi,
>>
>> I've released JSR 223 JRuby engine independenly at
>>
>> https://scripting.dev.java.net/servlets/ProjectDocumentList?folderID=8848&expandFolder=8848&folderID=8848
>> expecially for JDK 1.5 users.
>>
>> I just released JRuby engine 1.1.5, which is JRuby 1.1.4 compliant
>> version and should be OSGi-fied one. However, I'm not sure this
>> release really fixes issue
>> 37(https://scripting.dev.java.net/issues/show_bug.cgi?id=37) filed in
>> the scripting project's issue tracker. How can I test released
>> archives work with Apache Sling?
>
> It should be fairly easy: just install the required bundle(s) into sling  (I
> generally use the Apache Felix Web Console). The Sling scripting
> infrastructure should recognize the JRuby bundle, which contains the
> ScriptEngineFactory provided the factory is listed in the META-INF/services
> folders as described by JSR-223.
>
> When the ScriptEngineFactory has been picked up, you should be able to write
> scripts with the extension supported by the ScriptEngine.
>
> Unfortunately there is no other way yet, to find out whether the script
> engine has been "accepted".
>
>
> For example, you could do the following:
>
>  - start Sling
>  - install the JRuby bundles
>  - look in the Sling log (logs/error.log) for any
>       errors during the installation
>  - open a web dav connect to Sling (e.g. if Sling is
>       started on por 8888, open to http://host:8888/)
>  - create a script at /apps/sling/nonexisting/GET.erb
>       (given erb would be the JRuby extension)
>  - with your browser access http://host:8888/missing/page.html
>
> The last part causes a non existing resource of type sling:nonexisting to be
> used for processing and the /apps/sling/nonexisting/GET.erb would be called
> to process the request.
>
> Hope this helps.
>
> Regards
> Felix
>

Reply via email to