- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
calling jruby from scala as a scripting engine ( jsr 223 )
Thu, 2009-03-05, 15:14
Rubyans and Scalahads,
i'm attempting to call JRuby as a scripting engine from scala. It should work more or less as in the wiki example for calling JRuby as scripting engine from Java. Here's the code i'm using for testing. However, i can't get either (Scala or Java) to work because of versioning issues. If i use the org.apache.bsf jar for jsr 223 scripting and org.jruby jruby-complete jar for jruby, then no combination of versions (bsf 3.1beta - 3.2beta x 1.1.2 - 1.1.6) does not produce a problem with the parse method used by eval. Here's a stacktrace of the exception that's thrown. If i use the org.livetribe jar for jsr 223, then no combination with the org.jruby jars does not produce a classfile version problem. Here's a stacktrace for that . Examples of the maven depends i'm using for jsr 223 and jruby are here.
Any help would be greatly appreciated.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
i'm attempting to call JRuby as a scripting engine from scala. It should work more or less as in the wiki example for calling JRuby as scripting engine from Java. Here's the code i'm using for testing. However, i can't get either (Scala or Java) to work because of versioning issues. If i use the org.apache.bsf jar for jsr 223 scripting and org.jruby jruby-complete jar for jruby, then no combination of versions (bsf 3.1beta - 3.2beta x 1.1.2 - 1.1.6) does not produce a problem with the parse method used by eval. Here's a stacktrace of the exception that's thrown. If i use the org.livetribe jar for jsr 223, then no combination with the org.jruby jars does not produce a classfile version problem. Here's a stacktrace for that . Examples of the maven depends i'm using for jsr 223 and jruby are here.
Any help would be greatly appreciated.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
while im no expert on jsr223, from the first stack trace, it seems
jruby is generating jdk6-level bytecode instead of jdk5 (which you
might contact the jruby guys for advice)
in the second case, it seens livetribe is not compiled against your
version of jruby (maybe contact livetribe for advice?)
On Thu, Mar 5, 2009 at 11:13 AM, Meredith Gregory
wrote:
> Rubyans and Scalahads,
>
> i'm attempting to call JRuby as a scripting engine from scala. It should
> work more or less as in the wiki example for calling JRuby as scripting
> engine from Java. Here's the code i'm using for testing. However, i can't
> get either (Scala or Java) to work because of versioning issues. If i use
> the org.apache.bsf jar for jsr 223 scripting and org.jruby jruby-complete
> jar for jruby, then no combination of versions (bsf 3.1beta - 3.2beta x
> 1.1.2 - 1.1.6) does not produce a problem with the parse method used by
> eval. Here's a stacktrace of the exception that's thrown. If i use the
> org.livetribe jar for jsr 223, then no combination with the org.jruby jars
> does not produce a classfile version problem. Here's a stacktrace for that .
> Examples of the maven depends i'm using for jsr 223 and jruby are here.
>
> Any help would be greatly appreciated.
>
> Best wishes,
>
> --greg
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 806 55th St NE
> Seattle, WA 98105
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
>