aspose file tools*
The moose likes Tomcat and the fly likes Tomcat not loading  mysql database driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat not loading  mysql database driver" Watch "Tomcat not loading  mysql database driver" New topic
Author

Tomcat not loading mysql database driver

Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
I'm running identical web applications on two different machines, one of them keeps throwing a "load" exception on startup. If I remove all the code used to access the database it loads ok, but doesn't do anything interesting.
The only major difference between the machines is the OS (XP on the working machine, and 2000 on the one I can't get working).

Is it possible there is a problem with environment variables from one machine to the next? All of the dependant jars are in the lib directory of the webapp.

I get the same problem with Tomcat 5.0.28 or tomcat 5.5.54

-Tad
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

How are you trying to connect to the database?

With JNDI Datasources or with class.forName()?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
Yes.


-Tad
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Is there a firewall (Norton) blocking the port?

Is mySql definately running on the problem machine?
Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
yes mysql is running on the machine in question. I can log in (from that machine), I can't connect to it from another machine though (that machine does have norton internet security running). The problem machine *had* sygate personal firewall running, but I turned it off when I was having problems, though I did configure it to allow mysql to run.

-Tad
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Can you try disabling Norton and then starting Mysql and Tomcat?
Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
Norton isn't running on the "problem computer" just one that is networked to it. I'm hesitant to turn it off. I suppose I could just turn off the computer running norton (I think I might have tried this already).

-Tad
Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
Still getting this exception:

005-02-15 20:17:17 StandardContext[/cecom]Servlet /cecom threw load() exception
javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE
at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1091)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3043)
at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:1014)
at org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:476)
at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Unknown Source)
 
Consider Paul's rocket mass heater.
 
subject: Tomcat not loading mysql database driver