Sometimes we come across situations where JCA classifies error as non-retryable, but we wanted to make it as retryable.Well here we have solution for it.
weblogic-ra.xml
<?xml version="1.0" encoding="UTF-8" ?>
<weblogic-connector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 weblogic-ra.xsd"
xmlns="http://www.bea.com/ns/weblogic/90">
<!--Just add below chunk under weblogic-connector -->
<properties>
<property>
<name>nonRetriableErrorCodes </name>
<value>-2049</value>
</property>
</properties>
......
</weblogic-connector>
You can also make retryable errors to non-retryable with following change in weblogic-ra.xml
weblogic-ra.xml
<?xml version="1.0" encoding="UTF-8" ?>
<weblogic-connector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 weblogic-ra.xsd"
xmlns="http://www.bea.com/ns/weblogic/90">
<!--Just add below chunk under weblogic-connector -->
<properties>
<property>
<name>nonRetriableErrorCodes </name>
<value>0</value>
</property>
</properties>
......
</weblogic-connector>
WLS throws following error when it encounters non-retryable error
This exception is considered not retriable, likely due to a modelling mistake.
To classify it as retriable instead add property nonRetriableErrorCodes with value "-2049" to your deployment descriptor (i.e. weblogic-ra.xml).
I have come up with below weblogic-ra.xml based on above suggestion given by adapter.
weblogic-ra.xml
<?xml version="1.0" encoding="UTF-8" ?>
<weblogic-connector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 weblogic-ra.xsd"
xmlns="http://www.bea.com/ns/weblogic/90">
<!--Just add below chunk under weblogic-connector -->
<properties>
<property>
<name>nonRetriableErrorCodes </name>
<value>-2049</value>
</property>
</properties>
......
</weblogic-connector>
You can also make retryable errors to non-retryable with following change in weblogic-ra.xml
weblogic-ra.xml
<?xml version="1.0" encoding="UTF-8" ?>
<weblogic-connector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 weblogic-ra.xsd"
xmlns="http://www.bea.com/ns/weblogic/90">
<!--Just add below chunk under weblogic-connector -->
<properties>
<property>
<name>nonRetriableErrorCodes </name>
<value>0</value>
</property>
</properties>
......
</weblogic-connector>
To auto retry a retriable faults set composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers
Please redeploy the adapter and if required restart the server.This will make adapter to make anonretryable errors to retryable errors
Hi,
ReplyDeleteI have found weblogic-ra.xml at various location in weblogic directory.
Which is the file that i need to modify or is it i need to make changes in all of them.