if you took time to look at tomcat-users archive you would've come across this post by david smith..the answer is just as good now as when originally posted
On 6/19/2010 1:31 PM, yucca...@live.co.za wrote: > I have no choice left but to not let hibernate use my tomcat datasource. This > is not good. I have even moved host provider in hope that it was previous > fult tomcat install from dailyrazor (tomcat 6 does not hav common/lib) and is > meant to have tomcat/lib > > I can say that my new container is correct and that I am 100% sure that all > mus jdbc configuration is correct in zml after having gone though it at least > 20 times and checked the wiki that was linked here earlier and still have > issues. Yes mysql jdbc bin is in tomcat/lib so that is not cause of the > error. /the error is very weird though as I have another point that uses > hibernate without error on the same database. It is not possible for me to > use hibernate to use tomcat datasource sadly. Many thanks for all the help > though. <DS> If you put the following into a jsp and call the jsp, does it work? <%...@page import="java.sql.Connection"%> <%...@page import="java.sql.DriverManager"%> <%...@page import="java.sql.SQLException"%> <% Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc:mysql://localhost/test?" + "user=monty&password=greatsqldb"); out.println( "The connection worked!!" ) ; %> If that works then your jdbc driver is available and installed properly (I trust there is only one copy of that jar in your entire tomcat install ... right?). Now check to see if there's an xml in tomcat/conf/Catalina/localhost matching your webapp's deployed name. For instance if you access your webapp as http://localhost:8088/mywebapp, there should be a mywebapp.xml file there. Take a look at it for the <Resource ... /> or <ResourceLink ... /> (which ever you setup) and make sure they are correct. If this file is not available, take a look at context.xml in your webapp's META-INF folder (same process). If it's not there, then the <Context ... > element for your webapp is in server.xml and it should NOT be there. It's bad practice and requires a full tomcat restart to make changes. Lastly, case matters. Be sure everything is typed correctly including whether it's upper or lower case. Now take a look at the logs and post any relevant messages including complete stacktraces of exceptions w/o edits except to protect usernames and passwords. --David </DS> Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: yucca...@live.co.za > To: users@tomcat.apache.org > Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create > JDBC driver of class '' for connect URL 'null' AGAIN! > Date: Mon, 21 Jun 2010 10:49:41 +0200 > > Ok I thought I found my solution yesterday with eapps but turns out not to > be. I am posting a possible fix in hope that this may help someone els who > reads this thread one day. > > apart from making sure that paths are correct, driver is inside tomcat/lib > and that resource etc are defined correct, I hadnot ensured that tomcat had > RW permission for the driver inside tomcat/lib upon doing so I was stuck > with same issue but hope this may solve someone elses issue. > > -------------------------------------------------- > From: "Mark Thomas" <ma...@apache.org> > Sent: Monday, June 21, 2010 8:57 AM > To: "Tomcat Users List" <users@tomcat.apache.org> > Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create > JDBC driver of class '' for connect URL 'null' AGAIN! > > > On 20/06/2010 21:49, akhlaqur Rahman wrote: > >> How do I unsubscribe from this list? I have tried following the > >> unsubscribe > >> link in the emails and it has not worked... Any tips would be > >> appreciated. > > > > Ask one of the list owners for help. > > > > I'll unsubscribe you in a sec. > > > > Mark > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _________________________________________________________________ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2