2 Replies Latest reply on Aug 6, 2004 3:05 AM by genman

    DataSource problems

    ntuple

      Hi all,

      Am having problems seeing a data source though it's registered in JNDI and is loaded by JBoss with no problems. Accessing the DS gives me a :

      java.sql.SQLException: Unexpected token: stored_proc_name
      15:50:52,747 INFO [STDOUT] at org.hsqldb.Trace.getError(Unknown Source)
      15:50:52,757 INFO [STDOUT] at org.hsqldb.jdbcResultSet.(Unknown Sourc
      e)
      15:50:52,757 INFO [STDOUT] at org.hsqldb.jdbcConnection.executeStandalone(U
      nknown Source)
      15:50:52,757 INFO [STDOUT] at org.hsqldb.jdbcConnection.execute(Unknown Sou
      rce)
      15:50:52,757 INFO [STDOUT] at org.hsqldb.jdbcStatement.fetchResult(Unknown
      Source)
      15:50:52,757 INFO [STDOUT] at org.hsqldb.jdbcStatement.executeQuery(Unknown
      Source)
      15:50:52,757 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.WrappedStatem
      ent.executeQuery(WrappedStatement.java:259)

      and then where I call it in my bean.

      The problem here is that I'm not using the Hypersonic driver and am actually using the JNet JSQLDriver, which works just fine if I explicitly make a connection to the data base URL.

      Is JBoss going to the included Hypersonic driver because it can't find the name ? I've included a jboss.xml like so:


      <ejb-name>someName</ejb-name>
      <resource-ref>
      <res-ref-name>jdbc/myDS</res-ref-name>
      <jndi-name>java:/jdbc/myDS</jndi-name>
      </resource-ref>


      and a myDS file is :


      <local-tx-datasource>
      <jndi-name>jdbc/myDS</jndi-name>
      <connection-url>jdbc:JSQLConnect://127.19.1.281/database=myDB</connection-url>
      <driver-class>com.jnetdirect.jsql.JSQLDriver</driver-class>
      <user-name>me</user-name>
      mer
      </local-tx-datasource>


      What am I missing ?

      thanks

        • 1. Re: DataSource problems
          ntuple

          Oh and the ejb descriptor does match:


          <ejb-name>myBean</ejb-name>
          com.yyy.myHome
          com.yyy.my
          <ejb-class>com.yyy.myBean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Container</transaction-type>
          <resource-ref>
          My Data Source
          <res-ref-name>jdbc/myDS</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
          </resource-ref>

          • 2. Re: DataSource problems
            genman


            You fudged something up. Delete (or rename away) hsql.jar and try again.