You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tuna Vardar <tu...@webzone.fi> on 2003/10/01 15:01:13 UTC
DataSource and JNDI problem at Tomcat 4+Apache
Hello,
I got a datasource definition at server.xml and the web application gets
connection to DB by getting datasource object from JNDI. I defined the
<Resource> between <GlobalNamingResources> tags. And I defined
<ResourceLink> from <Context> definition.
This configuration works perfectly with Tomcat 4.1. I use MySQL 3.23 as
a database server.
But when application is plugged to Apache Web Server by using
org.apache.catalina.connector.warp.WarpConnector connector, I got
following exception:
Cannot load JDBC driver class 'null'
java.lang.NullPointerException
It seems like Apache + Tomcat 4 configuration doesn't get the DataSource
description and its parameters from server.xml.
MySQL drivers are placed both in TOMCAT_HOME/common/lib and web
application's WEB_INF/lib directory.
What can be the cause for the exception I mentioned above? Any comments?
Br,
tuna
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: DataSource and JNDI problem at Tomcat 4+Apache
Posted by Tuna Vardar <tu...@webzone.fi>.
On Thu, 2003-10-02 at 01:12, Peter Harrison wrote:
> On Thu, 02 Oct 2003 01:01, Tuna Vardar wrote:
>
> > What can be the cause for the exception I mentioned above? Any comments?
>
> Sounds very similar to the issue I had when trying to move to 4.1.27. When I
> moved from 4.0.4 to 4.1.27 the exact same issue arose. If you put everything
> under a context it should be okay.
I placed everything under a context in server.xml, but still same
problem existed.
> Have you simply added the connector to an existing install, or did you try a
> new install with the connector? Also, the warp connector is actually old -
> isn't the Apache connector for 4.1.X the AJP connector?
I added connector to an existing install. And finally I used JK 1.3 AJP
connector. And now application works fine with Apache 1.3.
> Regards,
> Peter
Thanks.
>
> --
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: DataSource and JNDI problem at Tomcat 4+Apache
Posted by Peter Harrison <pe...@nothingbutnet.co.nz>.
On Thu, 02 Oct 2003 01:01, Tuna Vardar wrote:
> What can be the cause for the exception I mentioned above? Any comments?
Sounds very similar to the issue I had when trying to move to 4.1.27. When I
moved from 4.0.4 to 4.1.27 the exact same issue arose. If you put everything
under a context it should be okay.
Have you simply added the connector to an existing install, or did you try a
new install with the connector? Also, the warp connector is actually old -
isn't the Apache connector for 4.1.X the AJP connector?
Regards,
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org