Odd problem with connection pooling and v.hosts.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anton_Faulconbridge
Posted On:   Wednesday, April 14, 2004 10:35 AM

OK, I know loads of people have had a similar problem to this, but I just can't get to the bottom of it... I have followed the apache jakarta tutorial to get the pooling working, and it works a treat. So, I decided to get it working so that instead of http://localhost:8080... I would create a virtual host for the application. So, I put the appropriate line in the 'hosts' file, added the appropriate 'Host' tag in server.xml, then hit the application at http://blah.com:8080/. This works, sort of. It successfully renders the default jsp page (as expected), but when I try and use any kind of datbase connection (log in) I get the proverbial "Cannot create JDBC driver of class '' for connect URL 'null'". Weird.    More>>

OK, I know loads of people have had a similar problem to this, but I just can't get to the bottom of it...



I have followed the apache jakarta tutorial to get the pooling working, and it works a treat. So, I decided to get it working so that instead of http://localhost:8080... I would create a virtual host for the application. So, I put the appropriate line in the 'hosts' file, added the appropriate 'Host' tag in server.xml, then hit the application at http://blah.com:8080/.



This works, sort of. It successfully renders the default jsp page (as expected), but when I try and use any kind of datbase connection (log in) I get the proverbial "Cannot create JDBC driver of class '' for connect URL 'null'". Weird.



I have the application in a subdirectory of webapps, so I have /webapps/testapp/WEB-INF etc...



I get the same behaviour if I hit http://blah.com:8080/testapp - renders the page but get the error on attempting database connection.

The Context element in server.xml looks like this:


			




Now, if I change this context tag to be:



			
/testapp " docBase="testapp" crossContext="false" debug="0" reloadable="true" useNaming="true" override="true">




I can hit the url 'http://blah.com:8080/testapp' and the connection pooling works properly.



I thought that a context with a path set to "" was used to define the default context. In other words, surely the request should be handled by it no matter what.



Any ideas why it works with the Context path set and not without?



Any help gratefully received.    <<Less
About | Sitemap | Contact