Hi there,

further debugging reveals, that indeed the error is in

    java.lang.System.loadLibrary("BSF4ooRexx")

java.lang.System.getProperty() at the point of exeption shows that among
other things "java.library.path" is *not* set (returns "null"), hence
the rexx dylib cannot be loaded!

Here a few properties queried when the exception is handled and re-thrown:

   java.library.path=(null)
  
java.class.path=:/SystemLibrary/JavaJavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/javaplugin.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/plugin.jar
   java.endorsed.dir=(null)
  
java.ext.dirs=/Library/Java/Extensions:/Systems/Library/Java/Extensions:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext
   java.io.tmpdir=(null)

sun.boot.library.path and sun.boot.class.path are both set.

This seems to be a setup problem in OOo 3.3 for MacOSX in the context of
the scripting framework if doing a "Tools -> Macro -> Run"!

Is there anything I could (try) to do ?

TIA,

---rony



On 08.04.2011 17:29, Rony G. Flatscher wrote:
> Hi there,
>
> currently debugging a scripting language added to OOo 3.3 via an
> oxt-extension. The integration into OOo is done using the OOo
> beanshell programs, but adapted to the scripting language.
>
> The scripting language is ooRexx and there is a library that needs to
> be loaded via Java (using System.loadLibrary("BSF4ooRexx"), which on
> MacOSX is named "libBSF4ooRexx.dylib" and located in "/usr/lib" and
> "/usr/lib/java".
>
> Now the odd behaviour:
>
>    1. If using "Tools -> Macros -> Organize Macros -> Edit" and
>       running the script off the edit-window, everything works fine.
>       The BSF4ooRexx library is found and used to run the script via
>       the ooRexx interpreter. After doing this once one can execute
>       any ooRexx macro by merely having  it run, i.e. "Too.ls ->
>       Macros -> Run" or "Tools -> Macros -> Organize Macros -> Run".
>
>    2. If all instances of OOo have been shut down, and then the same
>       ooRexx script gets executed via "Tools -> Macros -> Run", then
>       an exception is thrown indicating that the library was not
>       found! After such an error, even using the steps described
>       above, would not successfully allow to load the library!
>
>           o Now closing all instances of OOo and then starting over as
>             described in step # 1 above, everything works again as
>             described above.
>
> Going through the Java sourcecode that gets employed, the same steps
> are undertaken to load the ooRexx scripting engine. I.e.
> "ScriptProviderForooRexx.java" and
> "ScriptSourceModel.java"; the sourcecode of these files could be seen
> via the web using
> <http://bsf4oorexx.svn.sourceforge.net/viewvc/bsf4oorexx/trunk/com/sun/star/script/framework/provider/oorexx/>
> (just click on the filename and then choose "view").
>
> It seems that success and unsuccess is not caused by the scripting
> framework support, but seems to be linked to how OOo instantiates the
> ooRexx scripting framework?
>
>     * Like, if the OOo dispatch interface is attempting to loading the
>       scripting language it fails (and makes subsequent attempts to
>       fail as well),
>     * whereas if using the scripting framework editor to load a script
>       first thing and run it off the editor in the first OOo session,
>       then everything works (also subsequent dispatches).
>
> Does anyone have any ideas what might cause such a phenomenon?
> Any ideas highly welcome!
>
> TIA,
>
> ---rony
>
-- 
-----------------------------------------------------------------
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help

Reply via email to