0 Replies Latest reply on Jun 1, 2006 9:15 AM by renierb

    jboss datasource error

    renierb

      I have added a datasource in my jboss in C:\jboss-4.0.3SP1\server\default\deploy\postgreSQL-ds.xml
      Then i added my jdbc driver in C:\jboss-4.0.3SP1\server\default\lib\postgresql.jar

      postgreSQL-ds.xml:
      ---------------------------------------------------------------------------
      <?xml version="1.0" encoding="UTF-8"?>

      <local-tx-datasource>
      <jndi-name>PostgresDS</jndi-name>
      <connection-url>jdbc:postgresql://pghost/myDB</connection-url>
      <driver-class>org.postgresql.Driver</driver-class>
      <user-name>XXX</user-name>

      <min-pool-size>5</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <idle-timeout-minutes>0</idle-timeout-minutes>
      <track-statements/>
      </local-tx-datasource>


      And my jsp code:
      -----------------------------------------------------------------
      <sql:setDataSource dataSource="PostgresDS" var="abc"/>
      <sql:transaction dataSource="${abc}">
      <sql:query var="rs">
      select * from table</sql:query>
      </sql:transaction>

      it the way i reference my datasouce correct? >PostgresDS or must i use java:/PostgresDS?

      this my error:

      Error getting connection: java.sql.sqlexception: no suitable driver