Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeeder.ewetel.de!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 17 Nov 2013 03:49:45 -0600 Date: Sun, 17 Nov 2013 09:49:39 +0000 From: lipska the kat <"lipskathekat at yahoo dot co dot uk"> Organization: Trollbusters 3 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 Newsgroups: comp.lang.java.help Subject: Re: Tomcat7 on Ubuntu 12.04 does not load mySQL JDBC Connector References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Lines: 66 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-fFQWo1VO2yJU2QQ1JU+4VaRnuwJxmaclfgC6v/S/hWNZ4gKWSTsBd0kTgZARStdSlifDno68Qcmn8O3!a++oK3Vukn/05b+UxDdbfv3nioLuJgxMc9oCKtZU9e0FQdqxMV1Jp4JpiNFxEOrOR2l1xTVQyw== X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3291 Xref: csiph.com comp.lang.java.help:2854 On 16/11/13 07:25, Philipp Kraus wrote: > Hello, > > > I try to install in an Ubuntu 12.04 a Tomcat7 with mySQL JDBC. So I have > run apt-install for tomcat and libmysql-java, but I get always: > > > java.lang.ClassNotFoundException: "com.mysql.jdbc.Driver" > > > in my logs. In the catalina.properties the loading pathes are defined with > > > common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/var/lib/tomcat7/common/classes,/var/lib/tomcat7/common/*.jar > > server.loader=/var/lib/tomcat7/server/classes,/var/lib/tomcat7/server/*.jar > > shared.loader=/var/lib/tomcat7/shared/classes,/var/lib/tomcat7/shared/*.jar > > > The JDBC mySQL Jar is stored under /usr/share/java with twi symlinks, I > have tried to create a symlink from Tomcats lib dir > (/usr/share/tomcat7/lib) to ../../java/mysql.jar > > but the mySQL is also not loaded. > > The CATALINA_HOME is set to /usr/share/tomcat7 and the CATALINA_BASE is > /var/lib/tomcat7, so imho it should be worked > > > I try to run http://www.icescrum.org/ with mySQL support. > > > Can anybody help me please with a useful idea to create a working mySQL > JDBC driver in my Tomcat7? > > > Thanks a lot Ubuntu 12.04 LTS apache-tomcat-7.0.42 jdk1.7.0_45 Yea, this can be a bit of a PITA sometimes if you are relying on container managed connection pools as the container needs to find the jar before a web app that uses it is fully loaded, at least this is what I have figured out anyway. I have the following directory structure /opt/apache-tomcat-7.0.42/ I copied mysql-connector-java-5.1.22-bin.jar into /opt/apache-tomcat-7.0.42/lib I restarted the server and it all just works no sym links and no fancy obscure directory structure scattered across the file system. Try it, it might be what you are looking for. -- Lipska the KatŠ: Troll hunter, sandbox destroyer, treacherous feline and farscape dreamer of Aeryn Sun GNU/Linux user #560883 - http://www.linuxcounter.net