0 Replies Latest reply on Sep 21, 2005 11:43 AM by jaybee

    troubleshooting an oracle datasource

    jaybee

      I am using jboss 4.0.2 and aiming to deploy some hibernate 3 web apps that have previously been running on Tomcat 5.5. These use an Oracle 9i datasource. I've deployed the Oracle ds with no errors. I've wrapped up the first war file in a very simple ear file, no cmp, still depending on hibernate and hibernate.cfg to set the datasource... but when I try to use it I'm continually getting no results, so I need to find out if connections are being made....

      this is my oracle-ds.xml, taken from docs

      <?xml version="1.0" encoding="UTF-8"?>
      
      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->
      
      <!-- $Id: oracle-xa-ds.xml,v 1.13 2004/09/15 14:37:40 loubyansky Exp $ -->
      
      <!-- ===================================================================== -->
      <!-- ATTENTION: DO NOT FORGET TO SET Pad=true IN transaction-service.xml -->
      <!-- ===================================================================== -->
      
      <datasources>
       <xa-datasource>
       <jndi-name>XACentralDS</jndi-name>
       <track-connection-by-tx/>
       <isSameRM-override-value>false</isSameRM-override-value>
       <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
       <xa-datasource-property name="URL">jdbc:oracle:thin:@uap-database2:1521:corptest</xa-datasource-property>
       <xa-datasource-property name="User">ict_utils</xa-datasource-property>
       <xa-datasource-property name="Password">secret</xa-datasource-property>
       <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
       <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
       <!-- Checks the Oracle error codes and messages for fatal errors -->
       <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
       <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
       <no-tx-separate-pools/>
      
       <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
       <metadata>
       <type-mapping>Oracle9i</type-mapping>
       </metadata>
       </xa-datasource>
      
       <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
       name="jboss.jca:service=OracleXAExceptionFormatter">
       <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
       </mbean>
      
      </datasources>
      

      re the line ATTENTION: DO NOT FORGET TO SET Pad=true IN transaction-service.xml I haven't done this, as I can't find any such file - I've set pad to true in conf/jboss-service.xml though, as described in docs.

      after deploying that I can see my DS in JNDIView. However, queries that return results from the old webapp (using same oracle db) come back with no results, or are failing but not appearing in the logs? can I test that this connection is healthy?