facebook

no suitable driver – error

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #231149 Reply

    Hey there,

    more problems at the Chandler camp….

    I got McKoi driver up and running and have created and updated some sample tables using the SQL editor- everything works fine there.

    Now I’ve written a small web-app that programmatically asks for a connection and tries to add a record to the database using:-

    HTML form mapped in web.xml to a servlet.
    The servlet makes a call to a java class that takes care of the connection and inserts the record.
    If successful, the servlet forwards to a JSP that displays the details and a confirmation msg.
    If unsuccessful, an error page displays.

    My app gets stuck in the java class where the connection fails…
    the result is:

    java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getConnection(DriverManager.java:532)
        at java.sql.DriverManager.getConnection(DriverManager.java:171)
        at DbActions.addMember(DbActions.java:26)
        at DbServlet.doPost(DbServlet.java:59)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        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.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:106)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        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:576)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:534)
    

    So my problem seems to be the String URL being passed into the getConnection() method.

    Connection con=DriverManager.getConnection(url,user,password);

    * Should this be identical to the URL in the driver profile?

    jdbc:mckoi:local://C:/mckoi1.0.3/db.conf?username=myUsername&password=myPassword

    * Should I leave out the variables since the username and password are passed into getConnection() method in their own right?

    Please advise, I’m baffled!

    Jules

    #231179 Reply

    Riyad Kalla
    Member

    Jules,
    I have no idea, never used the MkCoi driver before… I would like to mention that just because you have a driver setup in MyEclipse, doesn’t mean your app server can find it… are you sure you put the driver in your <tomcat>\common\lib dir so your app server can find the driver? I’m wondering if the error at the getConnection method is just a red herring and infact, the app really cannot find a valid driver.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: no suitable driver – error

You must be logged in to post in the forum log in