cancel
Showing results for 
Search instead for 
Did you mean: 

Custom JCA Adapter / Application Error - Message.setErrorInfo() ??

Former Member
0 Kudos

Hi All,

I was looking for how to create a sensible Application Error in a custom JCA adapter and was excited to find the following page in the PCK info on Adapter Development:

http://help.sap.com/saphelp_nw04/helpdata/en/3c/53d6409ff68631e10000000a1550b0/frameset.htm

The part of interest being:

<i>

The following methods are available to enable you to read error information in the form of an ErrorInfo object from the message, or to set the error information in a message.

Message.getErrorInfo()
Message.setErrorInfo()

If the synchronous response message is an application-error message instead of an application response, it must call setErrorInfo(myErrorInfo) for receiver adapters.</i>

However, I can't find these methods, or indeed the "ErrorInfo" object anywhere in the AF classes - does anyone know it's whereabouts? Or is the above page just out of date? If so, what is the new approach for creating Application Level Errors in a custom JCA Resource adapter (not Exceptions - I can do that)

Many thanks,

Chris

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ok, check the following path in your XI or PCK installation:

/usr/sap/<SID>/DVEBMGS<XX>/j2ee/cluster/server0/bin/ext/com.sap.aii.af.lib

or

/usr/sap/<SID>/JC<XX>/j2ee/cluster/server0/bin/ext/com.sap.aii.af.lib

Within 'aii_af_ms_api.jar' is the particular class and method you're looking for.

Also, check Note 766332 for some updated info on adapter development.

Regards,

Jin

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Chris -

All the classes required for custom adapter development and the Javadocs are available in the <i>sample_ra.jar</i> archive which you can find on your XI, PCK, or decentral adapter installation. More info <a href="http://help.sap.com/saphelp_nw04/helpdata/en/87/3ef4403ae3db12e10000000a155106/frameset.htm">here</a>. The page is not out of date.

Regards,

Jin

Former Member
0 Kudos

My mistake... "all the classes" aren't in the archive. Let me look for it and get back to you.

Regards,

Jin

Former Member
0 Kudos

Thanks,

Sounds like my issue is an older version of the AF classes.. I have all of them on my classpath in my dev environment, including sample_ra.jar - but the "Message" class mentioned in that help page (I assume this is com.sap.aii.af.ra.ms.api.Message) does not have the mentioned methods. Looks like I need to update the jar files I am using in development environment.

Thanks,

Chris

Former Member
0 Kudos

Well, you can get the latest jars from the SMP (Service Marketplace) directly. These jars are in the <i>XI ADAPTER FRAMEWORK CORE 3.0</i> component. Basically, http://service.sap.com/swdc then Support Packages and Patches->SAP NetWeaver->SAP NETWEAVER->SAP NETWEAVER 04->Entry by Component->J2EE Adapter Engine (PI/XI). There you'll see the XI ADAPTER FRAMEWORK CORE 3.0 link.

OR here is the direct link for the SP19 (latest) of <a href="https://smpdl.sap-ag.de/~swdc/012002523100009492712006D/SAPXIAFC19P_4-20000272.sca?_ACTION=DL_DIRECT">SAPXIAFC19P_4-20000272.sca</a>

Within this is <i>aii_af_lib.sda</i> which has the jars. You can use winzip or winrar to open .sca, .sda files.

Regards,

Jin