Here's my two cent's.

> The problem is that when I try to open the connection by calling method
> dataSource.getConnection() it throws a java.sql.SQLException stating
> "Cannot load JDBC driver class 'null'".


Had the same problem on 4.1.29 and 3.23.58
 Try adding this to the Web.xml
<servlet-mapping>

<servlet-name>invoker</servlet-name>

<url-pattern>/servlet/*</url-pattern>

</servlet-mapping>



> Server.xml (important parts):
>   <GlobalNamingResources>
>     <Resource name="jdbc/TestDB" auth="Container"
>               type="javax.sql.DataSource"/>
>     <ResourceParams name="jdbc/TestDB">
    |
    |
    |
>         <name>url</name>
>         <value>jdbc:mysql://localhost/TestDB?autoReconnect=true</value>
>       </parameter>
>     </ResourceParams>

This section of my code is in a set of context tags.


>   </GlobalNamingResources>
>   <Service...>
>   <Engine...>
>   <Realm className="org.apache.catalina.realm.DataSourceRealm"
>     debug="99" dataSourceName="jdbc/TestDB" userTable="UserTBL"
>     userNameCol="userid" userCredCol="pass" userRoleTable="RoleTBL"
>     roleNameCol="role"/>
>   </Engine>
>   </Service>

Not used in my case yet.

Everything else looks like my code. I'm no expert and don't know how most of
it works but it does.

I have one catch on my system. I have to restart Tomcat after I deploy the
war file via manager. I get null pointer exceptions if I don't.

Doug



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to