cancel
Showing results for 
Search instead for 
Did you mean: 

strange error during runtime of custom JCA adapter

Former Member
0 Kudos

Hi all,

we're about developing an JCA adapter for XI. Therefore, we originally derrived SAP's sample adapter. During startup, the adapter's main class (SPIManagedConnectionFactory) is starting a thread for outbound processing, which perodically checks for unsent messages in the database via a SessionBean.

Everything is working fine, but after (I guess) two days, the instantiation of the SessionBean starts to fail and with this, the thread doesn't work any more. After a restart of the adapter, everything's fine again.

The call of the SessionBean is done via it's local interfaces.

Here's the exception's stack trace:

com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method getUnsentMessages.
	at xi.adapter.messageDB.MessageServiceLocalLocalObjectImpl40.getUnsentMessagesWithSendTimeReached(MessageServiceLocalLocalObjectImpl40.java:1155)
	at xi.adapter.outbound.AdapterOutboundProcessor.sendUnsentMessages(AdapterOutboundProcessor.java:221)
	at xi.adapter.outbound.scheduler.OutboundMessageScheduler.run(OutboundMessageScheduler.java:66)
Caused by: com.sap.engine.services.ejb.exceptions.BaseRuntimeException: Cannot create an instance of the stateless bean.
	at com.sap.engine.services.ejb.session.stateless_sp5.BeanFactory.getActiveBean(BeanFactory.java:192)
	at com.sap.engine.services.ejb.session.stateless_sp5.StatelessContainerFP.getActiveBean(StatelessContainerFP.java:183)
	at xi.adapter.messageDB.MessageServiceLocalLocalObjectImpl40.getUnsentMessages(MessageServiceLocalLocalObjectImpl40.java:1146)
	... 2 more
Caused by: com.sap.engine.services.connector.exceptions.BaseRuntimeException: Resource system and application components cannot be used in system threads.
	at com.sap.engine.services.connector.jca.ResourceSetContextObject.popRecord(ResourceSetContextObject.java:101)
	at com.sap.engine.services.connector.resource.impl.ResourceContextImpl.exitMethod(ResourceContextImpl.java:154)
	at com.sap.engine.services.ejb.session.stateless_sp5.BeanFactory.createObject(BeanFactory.java:141)
	at com.sap.engine.services.ejb.util.pool.ContainerPoolImpl.doResizeOneStepUp(ContainerPoolImpl.java:374)
	at com.sap.engine.services.ejb.util.pool.ContainerPoolImpl.ensureNotEmpty(ContainerPoolImpl.java:343)
	at com.sap.engine.services.ejb.util.pool.ContainerPoolImpl.pop(ContainerPoolImpl.java:291)
	at com.sap.engine.services.ejb.session.stateless_sp5.BeanFactory.getActiveBean(BeanFactory.java:188)
	... 4 more

Does anybody has an idea about this behavior. Help is - as always - highly appreciated and will be rewarded.

Thank you in advance!!!

Kind regards,

Matthias

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi again,

this morning, I had that error again, and I started analyzing the logs:

The adapter had worked properly until the system was shut down for backup yesterday evening. After restart of the system, the adapter was also started but the EJB calls started failing again.

After restarting the adapter from Visual Admin / Connector Contaier, everything's working fine again.

Does anybody have any clue? Please help...

Cheers,

Matthias