> > I do not see the mistake that you see I didn't say I saw a mistake ... just listing stuff to look at in diagnosing this issue. The file permission issue can definitely contribute to what you were seeing. Other comments inline ....
--David On 6/21/2010 8:32 AM, yucca...@live.co.za wrote: > > -------------------------------------------------- > From: "Martin Gainty" <mgai...@hotmail.com> > Sent: Monday, June 21, 2010 1:16 PM > 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! > > >> 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!!" ) ; >> > Did this and it works , I even made this page my welcome page at > thejarbar.org > > Great! That's one giant step in the right direction. >> %> >> >> >> 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?). >> > I do not see or find another copy of the driver > > > >> Now check to see if there's an xml in tomcat/conf/Catalina/localhost >> > there isn't one > Ok ... this is one of a couple of places a <Context ... /> element can be. It maybe in one of the others I mentioned like your webapp's META-INF folder. The one that might be in tomcat/conf/Catalina/localhost will take precedence over any in your webapp's META-INF folder. People have been bitten before changing the one in META-INF, not realizing there was an old copy 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 >> > I did not do this > > > If you mean restart, it's not necessary as long as the <Context ...> </Context> element defining your app to tomcat is not in server.xml. >> changes. >> > Did this and it works , I even made this page my welcome page at > thejarbar.org > > > ??? I'm confused here. What did you do at this point that works? >> 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. >> > I have checked this several times and see no syntax errors, further, if > there were url syntax errors (because they can only be url errors due to it > not being an accessdenied exception from mysql, it ould show on my test > environment as I use same database names and table names. In fact I would > say that because I am able to do that test page with success it proves my > driver is in place and can be found . > Excellent. (on the lack of syntax errors). Are there any exceptions during startup of your webapp in the logs or other messages relating to the database pooling? > I do not see the mistake that you see > >> --David >> </DS> >> >> >> >> >>> 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. >>> >>> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org