Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: error connecting mysql database(Please Help) classpath is ok...

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default error connecting mysql database(Please Help) classpath is ok...

    com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

    ** BEGIN NESTED EXCEPTION **

    java.net.UnknownHostException
    MESSAGE: 192.168.0.8;databaseName=treasury

    STACKTRACE:

    java.net.UnknownHostException: 192.168.0.8;databaseName=treasury
    at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(InetAddre ss.java:894)
    at java.net.InetAddress.getAddressesFromNameService(I netAddress.java:1286)
    at java.net.InetAddress.getAllByName0(InetAddress.jav a:1239)
    at java.net.InetAddress.getAllByName(InetAddress.java :1155)
    at java.net.InetAddress.getAllByName(InetAddress.java :1091)
    at com.mysql.jdbc.StandardSocketFactory.connect(Stand ardSocketFactory.java:246)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
    at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:2771)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1 555)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:285)
    at java.sql.DriverManager.getConnection(DriverManager .java:579)
    at java.sql.DriverManager.getConnection(DriverManager .java:221)
    at ConnectionSample.main(ConnectionSample.java:17)


    ** END NESTED EXCEPTION **



    Last packet sent to the server was 16 ms ago.
    at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:2847)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1 555)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:285)
    at java.sql.DriverManager.getConnection(DriverManager .java:579)
    at java.sql.DriverManager.getConnection(DriverManager .java:221)
    at ConnectionSample.main(ConnectionSample.java:17)


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: error connecting mysql database(Please Help) classpath is ok...

    Quote Originally Posted by pedong View Post
    java.net.UnknownHostException: 192.168.0.8;databaseName=treasury
    Thrown to indicate that the IP address of a host could not be determined.

  3. #3
    Junior Member
    Join Date
    Aug 2013
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: error connecting mysql database(Please Help) classpath is ok...

    that IP is accessible within the network it is our server.. what i'm going to do Sir?

Similar Threads

  1. Error by export Data from Excel File to MySql database
    By vector_ever in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 1st, 2013, 05:15 PM
  2. Problems connecting to mysql database on network
    By 2k. in forum JDBC & Databases
    Replies: 10
    Last Post: May 8th, 2012, 09:54 PM
  3. JCombobox connecting to mysql
    By myexternall11 in forum JDBC & Databases
    Replies: 2
    Last Post: February 16th, 2012, 11:04 PM
  4. Error connecting to database
    By bczm8703 in forum JDBC & Databases
    Replies: 9
    Last Post: December 8th, 2011, 01:06 AM
  5. Connecting to a database
    By fwashington in forum JDBC & Databases
    Replies: 5
    Last Post: March 15th, 2010, 02:37 PM