facebook

JDBC connector issues

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #294768 Reply

    Mary
    Member

    Environment:
    MySql 5
    with embedded Tomcat 6

    MyEclipse 6.5.1
    Eclipse 3.3.3

    Exception being thrown:

    Method = getDBConnection

    initCtx = javax.naming.InitialContext@44f787

    envCtx = org.apache.naming.NamingContext@16dfa45

    ds = org.apache.tomcat.dbcp.dbcp.BasicDataSource@c3014

    conn = jdbc:mysql://localhost:3306/my_papers?autoReconnect=true, UserName=root@localhost, MySQL-AB JDBC Driver
    getDBConnection threw an exception

    Unknown column ‘name’ in ‘where clause’
    Username or password not valid!!!

    I do not have a propertieis file or an entry in my web.xml with the username and password for the databse. Is this where I need to start?

    #294809 Reply

    Brian Fernandes
    Moderator

    I’m not entirely aware of what you are trying to do, but you can specify all the required details in code at the time the connection is being established.

    See the following tutorial for an example using the DriverManager class:
    http://java.sun.com/docs/books/tutorial/jdbc/basics/connecting.html

    Hope this helps.

    #294810 Reply

    Loyal Water
    Member

    Moving to Off Topic >> Software Development.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: JDBC connector issues

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