Skip to Content
0

I'm facing issue with the XSLT mapping.

Sep 03, 2017 at 07:23 PM

167

avatar image

I have built XSLT mapping for XML in STYLUS Studio. I used xslt 2.0 to use for each group.

When I ran the mapping in STYLUS it works fine but in PO it gives below error:

"javax.xml.transform.TransformerException: java.lang.RuntimeException: Unsupported XSL element 'http://www.w3.org/1999/XSL/Transform:for-each-group' at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:746) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)"

Steps I followed:

Downloaded Saxon-HE-9.7.0-4.jar.

Zipped it with xsl mapping & imported as archive in ESR.

When it failed I tried to also include javax.xml.jar along with above & tried no go.

I set com.sap.aii.ibrun.server.mapping.externalTransfomer=true in XPI : All config Service.

Please help with any pointers.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Best Answer
Evgeniy Kolmakov Sep 04, 2017 at 05:50 PM
0

Hi Harry!

I tried it myself once and I can say that applying the steps described in mentioned note really works. Just go through carefully and perform all the required actions. Maybe you've just missed anything with your previous attempt.

Regards, Evgeniy.

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Thanks again. Error is with function library which is not accepting the code from note.Does the same code of attributes and methods work for you.Or do i need to recompile? If so how to do it.I tried to use saxon9.4 he.jar and followed the note. Do i need to use Enterprise version?

0

Hi Harry!

I performed all the steps, described in the note.

Maybe you've missed anything, for example, in Imports section of FL?

Regards, Evgeniy.

0

I imported archive of saxon in archives. Ill recheck. Thanks again

0

Thanks again for all the help, my issue is resolved.

I was using saxon HE jar when I replaced it with saxonsa.jar that came with stylus studio its executing successfully.

0
Evgeniy Kolmakov Sep 03, 2017 at 08:51 PM
0

Hi Harry!

It seems that you use dual stack PI installation.

Look at this blog:

https://blogs.sap.com/2016/07/04/how-to-use-external-xslt-processor-for-pi-dual-stack-installations/

If you use java only PI system, try to import the right version of Saxon HE's jar as separate imported archive.

Regards, Evgeniy.

Share
10 |10000 characters needed characters left characters exceeded
Harry Saj Sep 04, 2017 at 05:15 PM
0

Thanks a lot for replying.

I have tried to create a separate import archive for saxon but I get below error:

Transformer Configuration Exception occurred when loading XSLT MM_Group.xsl; details: java.lang.ClassNotFoundException: ResourceException during loading class com.sap.aii.mapping.xslt.saxon.JavaExtensions$JavaFunctionLibrary
See error logs for details

I followed note 2221350 - Support for Java Extensions in the SaxonHE XSLT Transformer

But the function Lib is giving error when I copied the attribute & methods code from the notes.

I followed the notes as is including class, package & importing the archives etc.

And idea how I can fix it.

Share
10 |10000 characters needed characters left characters exceeded
Harry Saj Oct 12, 2017 at 04:23 PM
0

Hi,

I tried to use saxon HE jar since its open source & it gives below error. Transformer Configuration Exception occurred when loading XSLT MM_Group.xsl; details: java.lang.ClassNotFoundException: ResourceException during loading class com.sap.aii.mapping.xslt.saxon.JavaExtensions$JavaFunctionLibrary

To resolve above issue I followed the note - 2221350.

When I try to use the function library code it gives below error:

Note: Recompile with -Xlint:unchecked for details.

How do I recompile the code, could someone please help.

Share
10 |10000 characters needed characters left characters exceeded
Harry Saj Oct 12, 2017 at 04:23 PM
0

Hi,

I tried to use saxon HE jar since its open source & it gives below error. Transformer Configuration Exception occurred when loading XSLT MM_Group.xsl; details: java.lang.ClassNotFoundException: ResourceException during loading class com.sap.aii.mapping.xslt.saxon.JavaExtensions$JavaFunctionLibrary

To resolve above issue I followed the note - 2221350.

When I try to use the function library code it gives below error:

Note: Recompile with -Xlint:unchecked for details.

How do I recompile the code, could someone please help.

Share
10 |10000 characters needed characters left characters exceeded
Harry Saj Oct 13, 2017 at 01:18 PM
0

I have raised incident to SAP to fix the issue.

Java code is compiled for SAXON 9.5 version only.

It works fine when I tried with SAXON 9.5 jar.

Closing the discussion as resolved.

Share
10 |10000 characters needed characters left characters exceeded