Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

hi, i am noob in java db/ => i have some problems

Thread view: 
alex.korsak@gmail.com - 07 Jul 2007 21:22 GMT
String connectionDriver = "org.gjt.mm.mysql.Driver";

        try {
            Class.forName(connectionDriver); // there exc

            // Enable logging

            Connection connection = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:3306/jabber",
"root", "root");

            connection.close();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }

this code throw exception/ what does the bug?
Manish Pandit - 08 Jul 2007 05:24 GMT
On Jul 7, 1:22 pm, "alex.kor...@gmail.com" <alex.kor...@gmail.com>
wrote:
> String connectionDriver = "org.gjt.mm.mysql.Driver";
>
[quoted text clipped - 15 lines]
>
> this code throw exception/ what does the bug?

What is the exception message and trace?
Are you able to log into local mysql using root/root via the mysql
command line client?
Are you sure the mysql server is running on localhost:3306?

-cheers,
Manish


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.