on 08-09-2016 10:22 AM
Hello,
Our requirement is to merge 2 XML files (one input file and one attachment) into 1 file by using JAVA mapping. I am referring blog: http://scn.sap.com/community/pi-and-soa-middleware/blog/2014/06/06/merge-multiple-files-without-bpm
Same JAVA code is written in NWDS. We exported JAR from NWDS and imported it in ESR as IA and used it in operation mapping.
However, we are getting below error in operation mapping testing:
Code is referring below imports:
import java.io.*;
import java.util.*;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.*;
import org.xml.sax.SAXException;
import com.sap.aii.mapping.api.*;
We tried importing the missing JAR files into NWDS (i.e. with “javax.xml.parsers-1_1.jar.zip” and “javax.xml-1.3.4.jar.zip”) for associated package but this is again not resolving the issue while importing in PI. Also did PI system restart completely after JAR import. But error still persists.
We are on PI 7.5, NWDS 7.5. Please suggest possible reasons and solution for resolving this issue.
Thanks in advance
Azhar
Hello All,
Thanks for your inputs. We got the solution. We need to change the attachment name mentioned in the JAVA code by our attachment name and it solved the issue.
Regards,
Azhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Azhar,
We tried importing the missing JAR files into NWDS (i.e. with “javax.xml.parsers-1_1.jar.zip” and “javax.xml-1.3.4.jar.zip”) for associated package but this is again not resolving the issue while importing in PI.
Extract the zip files first and then import the jar files in NWDS. If that does not solve the issue, import the extracted jar files into PI by creating an imported archive.
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes, settings are already in place as mentioned. There is no compilation error in NWDS.
Now instead of testing in operation mapping, We developed end to end scenario and tested the same. Error message in message monitoring is different i.e.:
“MappingException: Mapping failed in runtimeRuntime Exception when executing application mapping program com/map/Test_JavaClassmultifileMapping; Details: java.lang.NullPointerException; while trying to invoke the method org.w3c.dom.Node.getNodeType() of a null object loaded from local variable source, ApplicationRuntimeException: Runtime Exception when executing application mapping program com/map/Test_JavaClassmultifileMapping; Details: java.lang.NullPointerException; while trying to invoke the method org.w3c.dom.Node.getNodeType() of a null object loaded from local variable source, NullPointerException: while trying to invoke the method org.w3c.dom.Node.getNodeType() of a null object loaded from local variable source”
“Transmitting the message to endpoint <local> using connection SFTP_http://sap.com/xi/XI/SFTP failed, due to: com.sap.aii.af.service.mapping.MappingException: Mapping failed in runtimeRuntime Exception when executing application mapping program com/map/Test_JavaClassmultifileMapping; Details: java.lang.NullPointerException; while trying to invoke the method org.w3c.dom.Node.getNodeType() of a null object loaded from local variable source”
Any idea on this error?
Regards,
Azhar
Try to exclude .classpath and .project files and check "Export generated class files and resources" while exporting your project from NWDS
Are you getting any compilation error or warning while exporting as jar?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.