Summary: | sql:query and sql:setDataSource seem to have a problem with JNDI based connections | ||
---|---|---|---|
Product: | Taglibs | Reporter: | Prasad Subramanian <prasad.subramanian> |
Component: | Standard Taglib | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | major | ||
Priority: | P3 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | other |
Description
Prasad Subramanian
2002-04-22 01:10:16 UTC
This works for me. Did you add the JNDI resource mapping in your server.xml (shown below) to the <Context> element of the specific application that tries to access the JNDI resource? Note that instead of modifying your server.xml, you may create a <webapp>.xml file (where you replace <webapp> with your webapp's name) in your server's webapps directory, and add the JNDI resource mapping to it. In my case, I created a standard-examples.xml file with these contents: <Context path="/standard-examples" docBase="standard-examples" debug="0"> <Resource name="jdbc/BookDB" reloadable="true" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/BookDB"> <parameter> <name>user</name> <value>PBPUBLIC</value> </parameter> <parameter> <name>password</name> <value>PBPUBLIC</value> </parameter> <parameter> <name>driverClassName</name> <value>com.pointbase.jdbc.jdbcUniversalDriver</value> </parameter> <parameter> <name>driverName</name> <value>jdbc:pointbase:server://localhost/sample</value> </parameter> </ResourceParams> </Context> |