cancel
Showing results for 
Search instead for 
Did you mean: 

Java mapping imported archive

Former Member
0 Kudos

Hi All ,

I exported a java mapping program archive out of the ESR and made changes and imported it back to ESR. When i do testing in Operation mapping I do not see any changes.

Is there any Cache refresh that needs to be done to reflect new changes? Please advice.

Thanks,

Teresa

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Did you compile after making changes in java code? PLease check visually your changes in source code and successful compiled mesage before you import it. Also try to delete the existing imported archive and reimport the latest one and see the behaviour?

Former Member
0 Kudos

Hi Baskar,

I compiled and generated the class and imported it in ESR but now i get a new error like below.

LinkageError at JavaMapping.load(): Could not load class: com//xi/mapping/UPS/RequestTosender

java.lang.UnsupportedClassVersionError: com//xi/mapping/UPS/RequestT: Unsupported major.minor version 50.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:677) at java.lang.ClassLoader.defineClass(ClassLoader.java:522) at com.sap.aii.ib.server.mapping.execution.MappingLoader.findClass(MappingLoader.java:184) at java.lang.ClassLoader.loadClass(ClassLoader.java:363) at java.lang.ClassLoader.loadClass(ClassLoader.java:308) at com.sap.aii.ib.server.mapping.execution.JavaMapping.load(JavaMapping.java:143) at com.sap.aii.ib.server.mapping.execution.JavaMapping.executeStep(JavaMapping.java:67) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:54) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:139) at com.sap.aii.ibrep.server.mapping.exec.ExecuteIfMapCommand.execute(ExecuteIfMapCommand.java:33) at com.sap.aii.ib.server.mapping.exec.CommandManager.execute(CommandManager.java:43) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:40) at com.sap.aii.ibrep.server.mapping.MapServiceBean.execute(MapServiceBean.java:40) at sun.reflect.GeneratedMethodAccessor18979.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy1007.execute(Unknown Source) at sun.reflect.GeneratedMethodAccessor18978.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.sap.engine.services.rmi_p4.P4DynamicSkeleton.dispatch(P4DynamicSkeleton.java:234) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:358) at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62) at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37) at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53) at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108) at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304)

Answers (1)

Answers (1)

Former Member
0 Kudos

I just made changes to java program and imported it . I guess i need to compile and generate the class.

udo_martens
Active Contributor
0 Kudos

Hi Teresa,

the *.java file is only for documentation and to enable changes. During Runtime the *.class file is used.

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

I changed .java file and imported it the class file associated with it was not exported. In my above post i compiled the java code using a tool and generated a class and imported the class and .java file and it gave me the linkage error.

Am i doing something wrong here?

Thanks,

Teresa

baskar_gopalakrishnan2
Active Contributor
0 Kudos

When you make changes in java source file example test.java, you need to compile it. if the compilation succesful you get test.class. you have to import test.class inside PI. Also try to compile with the same jdk version as that of jdk version in PI. if you use pi 7.1, you might be using jdk 1.6.+, so maintain java versions same across inside and outside pi for compilation and running the java version.

Also make sure you maintain the java class package while packaging it in jar file as you need in the import statement.

Former Member
0 Kudos

Thanks Baskar. I also found the following info below.

First you will need the Java SDK installed on the development machine. The version depends on the version of SAP PI you wish to deploy onto but this is not a strict requirement, however it does eliminate possible issues. For SAP PI 7.0 I would recommend using JDK 1.4, whereas for SAP PI 7.1 it would be Java 5.0. This is simply because these are the versions of the Java runtime used by SAP PI on those respective versions.

Second, you will need to obtain the library u2018aii_map_api.jaru2019 from the SAP PI server. I usually keep a local copy since one does not always have access to the SAP PI operating system. The library can be obtained in the path:

u2018<SAP_install_dir>/<system_name>/<instance_name>/j2ee/cluster/server<number>/apps/sap.com/com.sap.xi.services/u2019

An example of the path on a Windows server could be:

u2018D:\usr\sap\xid\DVEBMGS03\j2ee\cluster\server0\apps\sap.com\com.sap.xi.servicesu2019.

Lastly, you will want a Java IDE, but this is entirely optional if you prefer to compile on the command line. I usually use Eclipse and in this manual I demonstrate using Eclipse, but there will be similar ways to do the steps in other IDEs.