IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Flat Files > Troubleshooting and support

XAResourceNotAvailableException

When the IBM Process Server log contains repeated reports of the com.ibm.ws.Transaction.XAResourceNotAvailableException exception, remove transaction logs to correct the problem.


Symptom:

When the IBM Process Server is started after a server failure, the following exception is repeatedly logged in the IBM Process Server log file:

The stack trace of WebSphere Adapter for Flat Files contains a trace report. An example of a trace report is shown here.

00000015 XARecoveryDat W   WTRN0005W: The XAResource for a transaction participant 
could not be recreated and transaction recovery may not be able to complete properly. 
The resource was com.ibm.ws.Transaction.JTA.ASWrapper@61c461c4. 
The exception stack trace follows: com.ibm.ws.Transaction.XAResourceNotAvailableException: 
java.security.PrivilegedActionException: java.lang.ClassNotFoundException: 
com.ibm.j2ca.flatfile.FlatFileResourceAdapter
	at com.ibm.ws.Transaction.JTA.ASXAResourceFactoryImpl.getXAResource
  (ASXAResourceFactoryImpl.java:97)
	at com.ibm.ws.Transaction.JTA.XARecoveryData.getXARminst(XARecoveryData.java:529)
	at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:644)
	at com.ibm.ws.Transaction.JTA.PartnerLogTable.recover(PartnerLogTable.java:524)
	at com.ibm.ws.Transaction.JTA.RecoveryManager.resync(RecoveryManager.java:1859)
	at com.ibm.ws.Transaction.JTA.RecoveryManager.run(RecoveryManager.java:2580)
	at java.lang.Thread.run(Thread.java:810)
  Caused by: java.security.PrivilegedActionException: java.lang.ClassNotFoundException: 
  com.ibm.j2ca.flatfile.FlatFileResourceAdapter
	at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:122)
	at com.ibm.ejs.j2c.RAWrapperImpl.createAndConfigureRA(RAWrapperImpl.java:2064)
	at com.ibm.ejs.j2c.RAWrapperImpl.startRA(RAWrapperImpl.java:584)
	at com.ibm.ejs.j2c.RAWrapperImpl.getStartedRA(RAWrapperImpl.java:1662)
	at com.ibm.ejs.j2c.ActivationSpecWrapperImpl.getStartedRA
  (ActivationSpecWrapperImpl.java:1368)
	at com.ibm.ws.Transaction.JTA.ASXAResourceFactoryImpl.getXAResource
  (ASXAResourceFactoryImpl.java:92)
	... 6 more


Problem:

A resource deployed at the node level was being removed and there was an abrupt shutdown of the IBM Process Server. This results in killing the Java™ process while the IBM Process Server was committing or rolling back a transaction for that resource. When the IBM Process Server is restarted, it tries to recover the transaction but cannot do so as the resource was removed.


Solution:

To correct this problem, use the following procedure:

  1. Reinstall the WebSphere Adapter for Flat Files at the node level.

    The IBM Process Server is already running, therefore you do need to restart it.

  2. From the Process Administrative Console, restore all the activation specification properties. When adding the properties, use the same JNDI reference that the adapter was referencing for the module.
  3. Stop the IBM Process Server.
  4. Restart the IBM Process Server in the Recovery mode. In Process Administrative Console, move to the bin directory of the IBM Process Server installation and type the following command: startServer <server name> -recovery

    The IBM Process Server stops after the IBM Process Server recovery is completed.

  5. Start the IBM Process Server in the normal mode.

    After the IBM Process Server is started, the event processing will start again.

  6. Verify the stack trace file to ensure that there is no occurrence of the XAResourceNotAvailableException exception.


Uninstall the WebSphere Adapter for Flat Files deployed at the node level

The XAResourceNotAvailableException exception can occur when there are some typical events, such as deleting an adapter that has unprocessed events from the server.

  1. Use the Process Administrative Console to stop all applications that are using the adapter.
  2. Uninstall all the applications that are using the adapter.
  3. Uninstall the WebSphere Adapter for Flat Files.
  4. Stop and start the IBM Process Server.

Troubleshooting and support