You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by af...@zipmail.com on 2003/01/08 13:54:31 UTC
Resource - Cannot load JDBC driver class 'null'
Hello,
I created a DataSource("jdbc/SAA") through Tomcat
Administration and put into my web.xml:
<resource-ref>
<description>Download example</description>
<res-ref-name>jdbc/SAA</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
But when I try to use it I get the following error:
java.lang.Exception: java.sql.SQLException: Cannot load
JDBC driver class 'null'
Tomcat changed by itself the server.xml with many things
like:
<Context
className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="0"
docBase="D:\java\jakarta-tomcat-4.1.12\webapps\sampleFilters"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/sampleFilters" privileged="false"
reloadable="false" swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
<Resource auth="Container" description="Download example"
name="jdbc/SAA" scope="Shareable"
type="javax.sql.DataSource"/>
</Context>
I searched other lists and found out that many people had
this problem, but I found no soulution.
Could somebody help me?
Thanks.
Ricardo Costa.
________________________________________________
Don't E-Mail, ZipMail! http://www.zipmail.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Resource - Cannot load JDBC driver class 'null'
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Wed, 8 Jan 2003 afterz@zipmail.com wrote:
> Date: Wed, 08 Jan 2003 07:54:31 -0500
> From: afterz@zipmail.com
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Resource - Cannot load JDBC driver class 'null'
>
> Hello,
> I created a DataSource("jdbc/SAA") through Tomcat
> Administration and put into my web.xml:
>
> <resource-ref>
> <description>Download example</description>
> <res-ref-name>jdbc/SAA</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
>
> But when I try to use it I get the following error:
>
> java.lang.Exception: java.sql.SQLException: Cannot load
> JDBC driver class 'null'
>
> Tomcat changed by itself the server.xml with many things
> like:
>
> <Context
> className="org.apache.catalina.core.StandardContext"
> cachingAllowed="true"
> charsetMapperClass="org.apache.catalina.util.CharsetMapper"
> cookies="true" crossContext="false" debug="0"
> docBase="D:\java\jakarta-tomcat-4.1.12\webapps\sampleFilters"
> mapperClass="org.apache.catalina.core.StandardContextMapper"
> path="/sampleFilters" privileged="false"
> reloadable="false" swallowOutput="false" useNaming="true"
> wrapperClass="org.apache.catalina.core.StandardWrapper">
> <Resource auth="Container" description="Download example"
> name="jdbc/SAA" scope="Shareable"
> type="javax.sql.DataSource"/>
> </Context>
>
Note that there are no nested elements inside the <Context>. That implies
that you created the new data source in the "global resources" area. To
make it visible to a webapp, you also need to create a "Resource Link"
inside the <Context>, by highlighting this context in the tree and
selecting the "add resource link" action.
> I searched other lists and found out that many people had
> this problem, but I found no soulution.
> Could somebody help me?
>
> Thanks.
> Ricardo Costa.
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>