cancel
Showing results for 
Search instead for 
Did you mean: 

two-phase commit Error after adapter module processing

Former Member
0 Kudos

Hi All,

We are developing a adapter module for File sender adapter.

It uses JRA to call RFC. We are referring blog

http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/16262

Below is the error shown in communication channel monitoring

2010-03-25 19:40:20	Information	MP: processing local module localejbs/CallSapAdapter
2010-03-25 19:40:20	Information	The application tries to send an XI message 

asynchronously using connection File_http://sap.com/xi/XI/System.
2010-03-25 19:40:20	Information	Trying to put the message into the send queue.
2010-03-25 19:40:20	Error	Putting message into send queue failed, due to: 

com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not insert 

message 1f256206-e488-4858-1e4c-f746d897efac(OUTBOUND) into duplicate check table. Reason: 

com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException occurred in 

method ConnectionFactoryImpl.getConnection(): 

com.sap.engine.services.connector.exceptions.BaseResourceException: The resource "SAPPI7DB" 

does not support two-phase commit and cannot be enlisted in the current transaction, because 

another non supporting two-phase commit resource is already enlisted for component 

"ejbContexts/sap.com/com.sap.aii.af.app/com.sap.aii.af.ejb.jar/CallAdapterWithMessageBean" 

in application "sap.com/com.sap.aii.af.app". Only one of the enlisted resources is allowed 

to be non two-phase commit compliant..

We are on PI 7.1

Any of your inputs are appreciated!

Thank You,

Mugdha Kulkarni

Accepted Solutions (0)

Answers (2)

Answers (2)

joo_ferreira
Participant
0 Kudos

Hi Mugdha Kulkarni,

Did you manage to solve it? Can you give me some hints about the problem?

Thank you.

Regards,

Joã

Former Member
0 Kudos

I'm also having this issue. I have already added this to another topic as well, but this one seems more suited:

Hi all,

I have tried the JRA approach, however, I ran into this issue:

29.05.2012 15:51:34InformationMP: processing local module localejbs/CallSapAdapter
29.05.2012 15:51:34InformationThe application tries to send an XI message asynchronously using connection File_http://sap.com/xi/XI/System.

MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not insert message 9dcfa356-6f6e-403a-0ff4-ef47c5f6abf1(OUTBOUND) into duplicate check table. Reason: com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException occurred in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.connector.exceptions.BaseResourceException: The resource "SAPPIDDB" does not support two-phase commit and cannot be enlisted in the current transaction, because another non supporting two-phase commit resource is already enlisted for component "ejbContexts/sap.com/com.sap.aii.af.app/com.sap.aii.af.ejb.jar/CallAdapterWithMessageBean" in application "sap.com/com.sap.aii.af.app". Only one of the enlisted resources is allowed to be non two-phase commit compliant.

My code is also trying to call SALERT_CREATE. Exactly the same code as in the example. It somehow seems to have issues after leaving the adapter. Any ideas?

Thanks!

Regards,

Aerv

Former Member
0 Kudos

This can be solved by adding @TransactionAttribute(value=REQUIRES_NEW) to the bean.

swapnil_bodhke
Explorer
0 Kudos

Hi Aerv,

     It will be a great help if you could specify the steps and location where we need to add @TransactionAttribute(value=REQUIRES_NEW) to the bean.

We are stuck around in this error when we are triggering an MII transaction from ME which has another Transactional call like a SQL query or an API in it.

Thanks & Regards.

Swapnil B

Former Member
0 Kudos

Hi Swapnil, this can be placed before the class definition:

@TransactionAttribute(value=REQUIRES_NEW)

public class MyClass extends xxx

Hope this helps.

Aerv

Shabarish_Nair
Active Contributor
0 Kudos

first of all i wouldn't doing a RFC call from within a module.

what is your scenario? try to design an alternative.

Former Member
0 Kudos

Hi Shabarish,

We are doing a duplicate file check wherein file needs to be rejected at first level if fails

Hence thought of doing it in Module.

Thanks

Mugdha Kulkarni

Shabarish_Nair
Active Contributor
0 Kudos

did you explore these options?

http://wiki.sdn.sap.com/wiki/display/XI/DifferentwaystokeepyourInterfacefromprocessingduplicate+files