Hi, I am also using Oracle XA driver to setup an XA Datasource.But I get an SQLEXception "Connection refused" while I deploy my jar file.Can u help in configuring my XA datasource?.Some problem with login-config.xml??Thanks.Anil

I am not using the login module, yet. Trying to get everything working before securing it. Short of seeing the exact exception and your configuration, I would recommend trying to connection and use the datasource before worrying about security.

Hi, I am able to connect to oracle now with XADatasource,but now I get the following error...09:47:58,436 ERROR [STDERR] java.sql.SQLException: ORA-29540: class oracle/jdbc/xa/server/OracleWrapXAResource does not existORA-06512: at "SYSTEM.JAVA_XA", line 0ORA-06512: at line 1I am using oracle 8.1.7 Enterprise edition.Have u come across any such errors?Below is my Config...

<config-property name="XADataSourceProperties" type="java.lang.String">URL=jdbc:oracle:thin:@ipaddress:1521:DB</config-property> <config-property name="XADataSourceClass" type="java.lang.String">oracle.jdbc.xa.client.OracleXADataSource</config-property> <!--set these only if you want only default logins, not through JAAS --> <config-property name="UserName" type="java.lang.String">xx</config-property> <config-property name="Password" type="java.lang.String">xx</config-property> <!-- Do not try to set transaction isolation level here or you'll get java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement of transaction Read committed is a default isolation level for Oracle, so there is not real need to set it here. I'll take a look into it later ...maybe. <config-property name="TransactionIsolation" type="java.lang.String">TRANSACTION_READ_COMMITTED</config-property> -->

NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the module-option name = "managedConnectionFactoryName" must match the object name of the ConnectionManager you are configuring here. --> <!--uncomment out this line if you are using the InformixXaDbRealm above InformixXaDbRealm -->

When you deploy the Bean which uses the Type 4 XA Driver, you get a stack dump:

java.sql.SQLException: ORA-29540: class oracle/jdbc/xa/server/OracleWrapXAResource does not exist ORA-06512: at "SYS.JAVA_XA", line 0 ORA-06512: at line 1 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114) at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208) at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542) at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311) at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:738) at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313) at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232) at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1353) at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1805) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:320) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:364) at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:102)

You have run initjvm.sql successfully.

You may notice the class file "OracleWrapXAResource" in aurora.zip onthe oracle side. But if you put it in the client CLASSPATH, itstill can't find it.

Solution Description--------------------

The class:

oracle/jdbc/xa/server/OracleWrapXAResource

Is part of the server and therefore changing the CLASSPATH will haveno effect.

This error is caused because you ran the script initjvm asSYSTEM instead of SYS. To solve this you need todrop the DBMS_JAVA package that was created in the SYSTEMschema by initjvm.sql, then run initjvm.sql as SYS.