[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - jboss-4.0.4.GA with Tomacat 5.5 JSTL Datasource problem
srossato
do-not-reply at jboss.com
Fri Nov 3 11:16:49 EST 2006
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983015#3983015
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983015
More information about the jboss-user
mailing list