on 09-16-2009 8:25 PM
Hi all,
I have written a java mapping in NWDS on my local machine using external libraries
(e.g XMLStreamReader from stax-api-1.0.1.jar). Locally the program is working OK. But when I use it in XI mapping I got this error :
Unable to find resource javax/xml/stream/XMLStreamReader.class .. What might be the problem and how to fix it ?
So I think that the stax-api-1.0.1.jar is missing on XI server. Where and how the missing jar should be put on XI? Or it is something else ?
Thanks for helping.
BR, Janos
Solved. Only need to import the external lib as mapping archive in the same namespace.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all
From your answers so far I understood that the external libraries must be deployed on XI J2EE engine. I managed to deploy all external libs that I call in java mapping using the NWDS and DCs... Now I see them listed in VA.
But the mapping still doesnu2019t work. Thus my next question isu2026 how to include the external libraries in java mapping ( I did java mapping archive - Export jar file from an java project in NWDS)
Also please explain if the package name in java mapping is somehow important?
Thanks Janos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
stax is part of Java 1.6, but PI 7.1 runs with Java 1.5.
You cannot use stax inside PI.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the answer. I have PI 7.0 with j2sdk 1.4. 2. So you are saying that it is not possible to import any external libraries into XI?
Am I asking this because I can compile the same program with Ant and run it standalone on XI server (I have just put all external jars on XI server in directory where I compile with Ant.)
My scenario requires that the payload is encoded before sending to the external system.
This is the code that was supplied as a template.. So I am asking which other functions can be used on XI, instead of these, to achieve the same?
XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(in))
StAXOMBuilder builder = new StAXOMBuilder(parser);
OMElement documentElement = builder.getDocumentElement();
//encode
HexBinary payloadXML = new HexBinary(documentElement.toString().getBytes("UTF-8"));
u2026
BR, Janos
Hey,
>I have PI 7.0 with j2sdk 1.4. 2. So you are saying that it is not possible to import any external libraries into XI?
No, It is possible
>Unable to find resource javax/xml/stream/XMLStreamReader.class
Check whether the appropriate package is included & try to handle the exception with Class XMLStreamException .
When ever you use - XMLStreamReader you need to handle the excpetion with respective Javax.xml.stream.XMLStreamException
Cheers
Agasthuri
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.