Lincoln Ritter wrote:
This is a bit scattered but I wanted to post this in case it might
help someone...

Here's a little more detail on the loading problems I've been having.

(snip)


Poking around the JRubyScriptEngine source
(https://scripting.dev.java.net/source/browse/scripting/engines/jruby/src/com/sun/script/jruby/)
it looks like it uses the property "com.sun.script.jruby.loadpath" and
not "jruby.home" as suggested by
http://wiki.jruby.org/wiki/Java_Integration#Java_6_.28using_JSR_223:_Scripting.29
.  hmmm.

I added -Dcom.sun.script.jruby.loadpath=$JRUBY_HOME to my invocation
and it worked... sort of.  I found that by the time execution reached
the 'configure' method, the load path property was null.   Odd.  Does
anybody know why this might be?  In any case, I saved the value in my
JobConf before submitting the job, like so:

jobConf.set("jruby.load_path",
System.getProperty("com.sun.script.jruby.loadpath"));

Then, in the configure method I have:

System.setProperty("com.sun.script.jruby.loadpath",
jobConf.get("jruby.load_path"));

I then load the script engine and everything works...


So: Does anybody have any idea of why i might be losing the system
load path property when I get to the configure method?


I'd suspect that the JVM running .configure() is not the one you started with the -D option. Which, given the number of host and processes around, isn't that surprising.

Reply via email to