XA resource ‘dataSource0’: resume for XID ‘3139322E3136382E3233302E312E746D313630313432393039333233373030303031:3139322E3136382E3233302E312E746D31’ raised -3: the XA resource detected an internal error
oracle.jdbc.xa.OracleXAException: null
Solution:
The ODA database may have not be configured to support XA resources as JAVA_XA is missing when checked with the following query:
select * from dba_objects where object_name = ‘JAVA_XA’; ==> No row selected
Execute initxa.sql and initjvm.sql located in $ORACLE_HOME\javavm\install directory. Log into your Oracle Database as SYSOPER or SYSDBA to have the necessary permissions for the scripts to work.
Method 1: Run initxa.sql (and/ initjvm.sql) package
Execute initxa.sql and initjvm.sql located in $ORACLE_HOME\javavm\install directory. Log into your Oracle Database as SYSOPER or SYSDBA to have the necessary permissions for the scripts to work.
When executed, the initxa.sql script configures the database for XA resources. if it runs successfully, your database is now configured for XA resources.
Note: The script may run successfully the first time you try. If it does not run successfully, some of the SGA memory components allocations for the database maybe too small and need to be increased. To resolve this, run the initjvm.sql script. It will probably fail too, but in doing so it will indicate which parameters/components needs to be adjusted.
The parameters are stored in the init.ora and spfileSID.ora. Depending on your database configuration, it may require adjusting different parameters. In one of my cases, it indicated increasing the java_pool_size and shared_pool_size parameters which are typically the case when not using ASMM or AMM.
Minimum Value required for these Parameters to configure XA resources are:
java_pool_size 12000000
shared_pool_size 24000000
After successfully performing above execution, rerun the query and it should show you 3 object types and JAVA directories: package, package body and synonym
select * from dba_objects where object_name = ‘JAVA_XA’;
