on 08-06-2012 2:01 PM
Hi Experts,
I am running basic Java Mapping scenario. Then will switch to my requirement.
Right now Mapping is -- Input field [String ] – "Name" ------------ > Output Field[String] - "NAme"
I have PI 7.1 EHP 1 system. As advised by jdk1.5.0_22 -- jre1.5.0_22 and Netbeans is installed in the system.
Environmental variables are also set.
I have added PI 7.1 jar file -- com.sap.xpi.ib.mapping.lib in the Netbeans Libraries.
Dervied from -- \\HOST\usr\sap\PIQ\DVEBMGS01\j2ee\cluster\bin\ext\com.sap.xi.mapping.api.lib\lib
Attached Java code , I am using to run the sceanrio.
But it showing below error each time.
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">LINKAGE_ERROR</SAP:Code>
<SAP:P1>mira/MappingCode</SAP:P1>
<SAP:P2>java.lang.NoClassDefFoundError: mira/MappingCode (</SAP:P2>
<SAP:P3>wrong name: MappingCode)</SAP:P3>
<SAP:P4 />
<SAP:AdditionalText />
<SAP:Stack>Linkage error while loading class mira/MappingCode; java.lang.NoClassDefFoundError: mira/MappingCode (wrong name: MappingCode)</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Already followed some blogs like Anupam Ghosh’ blog . Finally raising this issue.
http://scn.sap.com/thread/3189877
Please suggest or give idea to run basic Java Mapping sceanrio.
Thanks..
Hi Anshul,
Please check my response in these threads
http://scn.sap.com/thread/3206875
http://scn.sap.com/thread/3204957
The error is "Linkage error while loading class mira/MappingCode; java.lang.NoClassDefFoundError: mira/MappingCode". This error might result if there is any package statement used by default in the Netbeans IDE. Check this properly or use a package statement in your code.
Could you explain why the error is showing the path "mira/MappingCode" and not only "mappingCode"? This may have something to do with the path where Netbeans is saving the class file,and the same is not available in PI server.
If this also does not work then install eclipse/NWDS and create new enviornment as shown in my article for PI 7.0
http://wiki.sdn.sap.com/wiki/x/BQj2D
Under this article you will find a comment section. Check that section also.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anupam,
Thanks for the response.
Could you explain why the error is showing the path "mira/MappingCode" and not only "mappingCode"? This may have something to do with the path where Netbeans is saving the class file,and the same is not available in PI server.
It is showing in case of "Imported Archive" , like below
NAME PATH
MappingCode.class Mira/
MappingCode.java Mira/
Note : - Mira is name of ZIP folder.
Thanks.
Hi Anshul ,
add package statement at begining of your code
package Mira;
This might resolve the error. I guess this error is due to the fact that PI server is not getting the directory Mira within the server. Then export as a jar file (and not zip). Check this link for more on package statement http://docs.oracle.com/javase/tutorial/java/package/createpkgs.html
Try this, else need to install eclipse and recompile the code.
I guess the default settings in Netbeans may have something to do with this error.
Regards
Anupam
Check the java version that is actually being used in the server by going to http://<server>:<port>/rep => Administration => Repository => General Information => System Environment => Java Runtime. There are other ways to find out the version. If you are not able to access this link, you can take basis help to get the actual version.Ensure that the same version is being used by you in netbeans.
Can you also check if you have anything in the Manifest.mf in the jar file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
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.