Issue 110136 - configure: OOo needs a saxon which supports java extensions
Summary: configure: OOo needs a saxon which supports java extensions
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: configure (show other issues)
Version: DEV300m74
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: rene
QA Contact: issues@tools
URL:
Keywords:
: 100324 100325 100326 100327 100328 100329 (view as issue list)
Depends on:
Blocks:
 
Reported: 2010-03-15 13:41 UTC by caolanm
Modified: 2010-06-28 15:50 UTC (History)
6 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
here's a configure test to catch this miserable java-world issue (2.56 KB, patch)
2010-03-15 13:42 UTC, caolanm
no flags Details | Diff
proposed patch (3.45 KB, patch)
2010-03-19 02:09 UTC, rene
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2010-03-15 13:41:37 UTC
e.g the old saxonb does, while the current saxon-he (home edition) doesn't.
Comment 1 caolanm 2010-03-15 13:42:31 UTC
Created attachment 68349 [details]
here's a configure test to catch this miserable java-world issue
Comment 2 caolanm 2010-03-15 13:45:07 UTC
As an aside saxon-he doesn't come with a build.xml which makes a
META-INF/services/javax.xml.transform.TransformerFactory entry of
net.sf.saxon.TransformerFactoryImpl which is another problem that causes that
saxon to be ignored the a jaxp provider when just bunged into the classpath
Comment 3 caolanm 2010-03-15 13:46:29 UTC
*** Issue 100329 has been marked as a duplicate of this issue. ***
Comment 4 caolanm 2010-03-15 13:47:57 UTC
*** Issue 100328 has been marked as a duplicate of this issue. ***
Comment 5 caolanm 2010-03-15 13:49:29 UTC
*** Issue 100327 has been marked as a duplicate of this issue. ***
Comment 6 caolanm 2010-03-15 13:51:33 UTC
*** Issue 100325 has been marked as a duplicate of this issue. ***
Comment 7 caolanm 2010-03-15 13:53:51 UTC
*** Issue 100326 has been marked as a duplicate of this issue. ***
Comment 8 caolanm 2010-03-15 13:55:24 UTC
*** Issue 100324 has been marked as a duplicate of this issue. ***
Comment 9 caolanm 2010-03-15 14:00:34 UTC
I assume the original reason to use saxon at all in the first place was to
support xslt2, and it seems the only game in town to do this.

Added a configure test to detect useless saxon versions. 
Comment 10 caolanm 2010-03-18 15:59:43 UTC
Reassigning for qa, to make sure this works on debian (or correctly fails if
that saxon doesn't cut the mustard)
Comment 11 rene 2010-03-19 00:58:21 UTC
with the known not working saxon.jar:

checking which saxon to use... external
checking for /usr/share/java/saxon.jar... yes
checking if saxon works... no
configure: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb

-> OK

with saxonb.jar:

checking which saxon to use... external
checking for /usr/share/java/saxonb.jar... yes
checking if saxon works... no
configure: error: Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb

I don't think I have the he as at least

   creating: META-INF/service/
  inflating: META-INF/service/javax.xml.transform.TransformerFactory

is present, though which I guess is what you mean by your comment..

But I stumbled over this in README.Debian:

--- snip ---
Calls on external Java functions disabled by default
----------------------------------------------------

By default, SaxonB enables calls on external Java functions to be
embedded in stylesheets or queries. Such calls can invoke arbitrary
Java methods and are thus a security risk when executing untrusted
XSLT stylesheets of XQuery queries.  For this reason, SaxonB in Debian
comes with calls on external Java functions disabled by default.
[...]
If you are using SaxonB from its Java API you should set the Attribute
"FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS" to "true". See the API
reference in the libsaxonb-java-doc package for more information.
--- snip ---

and indeed, when disabling the patch it works.

I think this bug can be set to VERIFIED, the check rejects broken saxons at
least for me...

note to myself: now to look where to best add that Attribute setting...
Comment 12 rene 2010-03-19 02:08:36 UTC
think I got it... This patch (in addition to saxon.test.patch) makes configure
pass (and probably also makes it work)
Comment 13 rene 2010-03-19 02:09:38 UTC
Created attachment 68423 [details]
proposed patch
Comment 14 ccheney 2010-03-19 02:39:18 UTC
Rene brought this bug to my attention, doesn't the fact that this works with the
OOo version of saxonb but not the Debian version mean that the one in OOo has a
security hole?
Comment 15 rene 2010-03-19 02:45:14 UTC
yeah, thinking of it a bit more I don't feel good with this either... Sounds
like the hsqldb issue not long ago....

Ccing mt and ause (who added it apparently)
Comment 16 rene 2010-03-19 11:34:03 UTC
regardless of that - hmm. I still get a "Error saving the document oo: Write
Errir, The file could no be written." when trying to save as uot
Comment 17 svante.schubert 2010-03-19 13:01:34 UTC
Saxon was added by myself some while ago, therefore instead of Ause who just
assisted and was the commited, I can see as the responsible person for Saxon.

Thought about an update of Saxon anyway due to 97173, therefore I will have a
closer look in this after the ISO SC34 meeting next week (plus vacation).

Best regards,
Svante
Comment 18 Martin Hollmichel 2010-06-28 15:50:53 UTC
close issue.