I have succefully set up tomcat as an
windows NT service .
But i am facing some problems,the probem
is : I am not able to get database connection
when i start tomcat as a service .I am using
windows 2000 professional.
The sql error that i get is
Data source name not found and no default driver
When is start it manually ie, with starup command
from dos prompt , every thing works fine .
kindly reply me back at your earliest .
Global E-Softsys India pvt.ltd .
Check your classpath. probably is your jdbc driver jarfile, which is in the batch file you execute in the "dos prompt" is missing from the system classpath or the classpath which the NT Service is missing..
Can you please elaborate .
My classpath is perfect.
From command prompt i start tomcat as follows :
Everthing works fine and i dont get any connection error
in this way .
Problem starts when i go to NT service page and start
tomcat as service .I get the error .
Pls give your suggestions.
Don't run it as a service.
if you are typing "startup" from tomcat.. you are executing a batch file startup.bat or startup.cmd. see what is the classpath you are setting in that..
you may have something like..
and that is why you are able to get it running from the prompt. And that setting is not available for your NT Service. Anyway, for development and testing, it is better you are not running it as NT Service. you may need to restart your tomcat too often, and also may be helpful if you are able to see the output on standard out (console).
Check your classpath. probably it is becoz your jdbc driver jarfile, which is in the batch file ( you execute in the "dos prompt"), is missing from the system classpath or the classpath which the NT Service is using..