I ask an aid kindly, do not suceed to understand where it is the error
the jar file of driver is in
$JBOSS_HOME/server/default/lib/postgresql-8.0-314.jdbc2.jar
this work fine
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/dbGDO");
Connection theConnection = ds.getConnection();
this not and generate an error:
<sql:setDataSource var="datasource" dataSource="jdbc/dbGDO"/>
<sql:query var="rsult" dataSource="${datasource}">select * myTable</sql:query>
ServletException in '/mypage.jsp': Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver"
this is my dbGDO-ds.xml
<local-tx-datasource>
<jndi-name>dbGDO</jndi-name>
<connection-url>jdbc:postgresql://hostname/database</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>xxxxxx</user-name>
xxxxx
<min-pool-size>50</min-pool-size>
<max-pool-size>2500</max-pool-size>
<idle-timeout-minutes>2</idle-timeout-minutes>
</local-tx-datasource>
this in my jboss-web
<resource-ref>
<res-ref-name>jdbc/dbGDO</res-ref-name>
<jndi-name>java:/dbGDO</jndi-name>
</resource-ref>
this in my web.xml
<resource-ref>
<res-ref-name>jdbc/dbGDO</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
thanks
Stefano
I have inserted the driver also in $JBOSS_HOME/server/default/deploy/postgresql-8.0-314.jdbc2.jar and hour works all good
I hope that this information is useful
Stefano