cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping - add external jar for runtime use

KennethEriksen
Participant
0 Kudos

Hi,

I have implemented a java mapping which executes an XSLT transformation on the input XML. This way I can control (I hope) what XSLT processor is used, as I want to use the SAXON XSLT processor. The java mapping executes fine locally in NWDS.

But when executed runtime I get the following error in default_trace and the message stops in Integration Engine:

javax.xml.transform.TransformerFactoryConfigurationError: Provider net.sf.saxon.TransformerFactoryImpl not found

In my java mapping I have set the following:

System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl");

The TransformerFactoryImpl class is implemented in saxon9.jar.

Where do I store the saxon9.jar on the server so that it will find it during execution?

Any hints are most welcome!

Br,

Kenneth

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> Where do I store the saxon9.jar on the server so that it will find it during execution?

Any library used in Java mapping has to be uploaded as "Imported Archive", the same way as the Java mapping itself.

It must be stored in the same, or underlying SWVC.

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear Kenneth,


Did you solve the problem? I am facing with same problem in PI and I can not solve.

KennethEriksen
Participant
0 Kudos

As far as I remember I did not complete the task for various reasons. But I do think that what Stefan Grube says is what helped me get the jar to be available. I also seem to remember that the naming of the imported archive must be correct in order for the java mapping to find it.

Sorry I can't be more detailed.

Former Member
0 Kudos

U need to import the Jar file in Server...

anupam_ghosh2
Active Contributor
0 Kudos

Hi Kenneth,

First of all java mapping procedure has the capacity to transform XML using SAX or DOM parser directly. I am not sure as to why you need "SAXON XSLT processor" for the purpose.

Now coming to your question "Where do I store the saxon9.jar on the server so that it will find it during execution?"

In NWDS import the jar file saxon9.jar within your package, where you have written the source code. This you can do using File->import ->(ZIP or jar file). Before you import slect the package or folder where you want to import the jar file. Once jar file import is complete execute the code once, see if its running properly. Then choose file->export and select all *.java and *.class files in your package. Save this under one filename say package.jar.

Finally import this jar file in PI server by usual methods.

Hope this solves your problem

regards

Anupam