tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Resource - Cannot load JDBC driver class 'null'
Date Wed, 08 Jan 2003 20:07:00 GMT


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 <tomcat-user@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:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message