1 Reply Latest reply on Feb 1, 2002 4:32 PM by johnnycannuk

    2.4.4 XADatasource to Oracle8 problem

    mstogner

      Using an session bean to get a connection from a DataSource and execute an SELECT SEQ_NAME.nextval FROM DUAL query.

      I get an exception like:
      Table not found: DUAL in statement [SELECT ALRT_SEQ.nextval FROM DUAL]
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown Source)


      I am connecting to an Oracle 8i DB
      jboss.jcml:

      oracle.jdbc.driver.OracleDriver, org.hsqldb.jdbcDriver



      OracleDS
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl

      jdbc:oracle:thin:@oracle-4:1521:saturnsring
      1200000
      USER_NAME
      10
      password
      false
      false
      false
      true
      120000
      1800000
      false
      false
      1.0
      2


      In the EJB I am getting the DataSource using:
      dataSource = (DataSource)getJndiContext().lookup("java:comp/env/jdbc/elogexPool");
      I am getting the connection by:
      Connection newConnection = getDataSource().getConnection();

      the jboss.xml ref desc looks like:
      <reference-descriptor>
      <resource-description>
      <res-ref-name>jdbc/elogexPool</res-ref-name>
      <jndi-name>java:/OracleDS</jndi-name>
      </resource-description>
      </reference-descriptor>

      the ejb-jar.xml ref desc looks like:
      <resource-ref>

      <res-ref-name>jdbc/elogexPool</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      I have an entity bean working correctly against that DataSource for finder methods.

      Questions:
      Is this right?
      Should I be using an Oracle specific XADataSource instead of the JBoss wrapper?
      oracle.jdbc.xa.OracleXADataSource - the DataSource would not start/deploy
      oracle.jdbc.xa.client.OracleXADataSource - had same problem

      If anyone has this working I would love to see their deploy descriptors (jboss, ejb-jar), lookups in the EJB, and XADataSource configuration from the jboss.jcml
      Any help would be greatly appreciated.

        • 1. Re: 2.4.4 XADatasource to Oracle8 problem
          johnnycannuk

          Can you log in to the database with SQLPlus as USER_NAME/password@saturnsring and run

          SELECT ALRT_SEQ.nextval FROM DUAL

          from the sql prompt?

          To me this looks like a database set-up problem, not a jboss or XADatasource problem. Do you have a public synonym for the system table dual('system.dual') call 'dual'? Conversely has USER_NAME been granted select on dual or system.dual?

          Check these out first and then let me know. It sure looks like the USER_NAME schema can't see the DUAL table (or public synonym)

          Mike