SAXON XSLT working on local test but not on GAE

25 views
Skip to first unread message

Pierre

unread,
Jan 28, 2011, 10:18:21 AM1/28/11
to Gaelyk
Hey everyone,

I'm executing a XSLT using saxon that works fine when I test my app in
local but that crashes when running live on the GAE.


The code looks like:
def translator = params.translator ?: "'The received
translation was null.'"
def input = params.input ?: "'The received input was null.'"

def StringWriter sw = new StringWriter()
def Processor proc = new Processor(false)
def XsltCompiler comp = proc.newXsltCompiler()
def Serializer out = new Serializer()

def XsltExecutable exp = comp.compile(new StreamSource(new
StringReader(translator)))
def XdmNode source = proc.newDocumentBuilder().build(new
StreamSource(new StringReader(input)))

out.setOutputProperty(Serializer.Property.METHOD, "xml")
out.setOutputProperty(Serializer.Property.OMIT_XML_DECLARATION,
"yes")
out.setOutputProperty(Serializer.Property.INDENT, "yes")
out.setOutputWriter(sw);
def XsltTransformer trans = exp.load()

trans.schemaValidationMode

trans.setInitialContextNode(source)
trans.setDestination(out)
trans.transform()
result = sw.toString()

And I get the following error:

BUG! exception in phase 'semantic analysis' in source unit '/base/data/
home/apps/myapp/1.347953304867980794/WEB-INF/groovy/XSLTSax.groovy'
SHA1 digest error for net/sf/saxon/s9api/XdmNode.class
at
org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:
825)
...

Any tip/idea where that could come from would be welcome :)

Thanks to Guillaume and the community for this nice toys!

All the best,
Pierre

Guillaume Laforge

unread,
Jan 28, 2011, 10:34:08 AM1/28/11
to gae...@googlegroups.com
Hi Pierre,

Do you have a bit more stacktrace to show us?
Because it doesn't really say much to understand what could be wrong there.

It's always been a bit irritating those differences between GAE local
and GAE prod, we always lose precious time there :-(

Guillaume

> --
> You've received this message because you've subscribed to the Gaelyk Google Group.
> To send an email to the group, please write to: gae...@googlegroups.com
> To unsuscribe from this group: gaelyk+un...@googlegroups.com
> To show more options: http://groups.google.fr/group/gaelyk?hl=en
>

--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

Pierre

unread,
Jan 31, 2011, 3:38:58 AM1/31/11
to Gaelyk
Guillaume,

Thanks for the quick reply. I've posted the full log from the GAE at:
http://pastebin.com/h559rYzk

Any tip/idea where the bug could come from would be welcome :)

All the best,
Pierre

Guillaume Laforge

unread,
Jan 31, 2011, 4:37:52 AM1/31/11
to gae...@googlegroups.com
Hi Pierre,

This really doesn't look like a Groovy or Gaelyk issue, but more of a specific issue with GAE and this library.

If you look at this line:
 Caused by: java.lang.SecurityException: SHA1 digest error for net/sf/saxon/s9api/XdmNode.class

It seems there's a SecurityException thrown by GAE, perhaps hinting at the fact GAE puts some restrictions on things like hashing/encryption classes.

I'd suggest you post the question on the Saxon mailing-list perhaps, to see if they're known to run on GAE, or on the GAE google group as well.
You could try with another XSLT implementation too.

I'm sorry for not being more helpful, but unfortunately, this doesn't seem to be something related to Gaelyk or Groovy :-(

Guillaume

Pierre

unread,
Feb 2, 2011, 4:49:06 AM2/2/11
to Gaelyk
Guillaume,

It appears that If you remove SAXONICA.SF and SAXONICA.RSA from the
META-INF folder of the jar, it actually works. This might be relevant
for other libraries...

All the best and thanks for the help,
Pierre


On Jan 31, 10:37 am, Guillaume Laforge <glafo...@gmail.com> wrote:
> Hi Pierre,
>
> > > > To unsuscribe from this group: gaelyk+un...@googlegroups.com<gaelyk%2Bunsu...@googlegroups.com>
> > > > To show more options:http://groups.google.fr/group/gaelyk?hl=en
>
> > > --
> > > Guillaume Laforge
> > > Groovy Project Manager
> > > Head of Groovy Development at SpringSourcehttp://
> >www.springsource.com/g2one
>
> > --
> > You've received this message because you've subscribed to the Gaelyk Google
> > Group.
> > To send an email to the group, please write to: gae...@googlegroups.com
> > To unsuscribe from this group: gaelyk+un...@googlegroups.com<gaelyk%2Bunsu...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages