Hi Ray,

> I followed your guidance and
> found the root cause
> just as you predicted.

At least there's an explanation - /me sighs with relief.

> BeanShell and HSQL DB are softwares that can run in native mode 
> (stand alone, not involving OO). I have installed both into the (java
> jre dir)/lib/ext directory to run tests in native mode (tests not
> related to OO). Multiple drivers in OO and Java loading paths caused
> problems for OO operations.
>
> I still need to develop BeanShell and HSQL software in native mode
> (without OO). I also need OO as the GUI component in other unrelated
> software development. The driver versions can differ between OO
> bundle and native mode.
>
> Is there a way to enable both native and OO modes without driver
> conflict?

I am not sure, the following touches your last question:

You can try adding OOo's HSQLDB.jar to OOo's classpath:
Tools/Options/OpenOffice.org/Java/Classpath. I am not sure whether this
precedes the system classpath.

Also, I am not sure whether the HSQLDB version in the JVM is part of the
system-wide classpath, or somehow hard-coded into the JVM (since located
in JRE folders). To check, open the "Environment" dialog from your
"System Panel"/"System"/"Advanced". Is there a Classpath (case doesn't
matter) variable containing the HSQL version in the JRE installation? If
so, it might be a way to always start OOo with a classpath which is the
one displayed there, *minus* the JRE's HSQL.


Furthermore, different HSQL versions should be downward-compatible, to a
certain extent. Assuming that BeanShell does deliver an unmodified (but
too old) HSQL, then you can try replacing the HSQL version in the JRE
with the one supplied by OOo. All other applications should be able to
work with it, since OOo does only minot extensions to HSQL (which are
always part of the next HSQL release).


Yet more, but that's the less convinving alternative: Wait for issue
69624 [1] being fixed. Once this is done, the problem will disappear,
since then OOo will, at runtime, ensure it always loads the HSQL version
it shipped with.

> There is one thing unclear to me. Apparently the same driver modules 
> are invoked for all OO connections to HSQL, including external and
> embedded databases. Is this correct?

Yes.

> Can you explain why only connections to embedded databases
> (*.odb/database/script) are affected?

In the course of the HSQL integration, we extended HSQL with
functionality to work in embedded mode. This extensions became part of
official HSQL releases, from (IIRC) 1.7.2 onwards. So, from this version
on, HSQL can work embedded and "normal".

Now when you have an HSQL version which does not yet have those
extensions, then it will simply not understand the embedding requests it
gets from OOo, and ignore them. It will always try to open a "normal"
connection.

> Can you point me to the documentation on loading sequence of classes
> in
> 
> (OO dir)/program/classes
> (java jre dir)/lib/ext

Not sure about this. May I suggest you ask this in [EMAIL PROTECTED]
I really don't know where else to look for this information.

> What will happen to OO if drivers for hsqldb.jar and bsh.jar, with
> possibly different driver versions, exist in both directories?

OOo will use the version which wins in the loading precendence (as long
as issue 69624 is not fixed). Since all patches we do to HSQL become
part of the next releases, this shouldn't be much of a problem for OOo
as long as both versions are "close enough".

However, as reality shows, sometimes it *is* a problem ...

Ciao
Frank

[1] http://qa.openoffice.org/issues/show_bug.cgi?id=69624


-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to