List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:September 9 1999 4:25pm
Subject:Re: Problems with JDBC Driver
View as plain text  
albertv wrote:
> 
> Could someone help me?
> 
> I'm trying to connect an Applet to my Mysql Database using the
> org.gjt.mm.mysql driver (version 1.2b).
> The driver runs well but wastes a lot of time to connect (3 or 4
> minutes).
> How should I use the org.gjt.mm.mysql Package? I am putting in the
> archive jar all org.gjt.mm.mysql classes
> I'm doing something wrong?
> Here the code I wrote to connect:
> 
> try {
>                         Class.forName("org.gjt.mm.mysql.Driver").newInstance();
>                         } catch (Exception e)
>                         {
>                                 e.printStackTrace();
>                         }
> 
>                 try {
>                         con = (Connection)
>
> DriverManager.getConnection("jdbc:mysql://10.10.0.1:3306/universalium?user=eva&password=holatu");
>                         } catch (SQLException e)
>                         {
>                                                        
> System.out.println("SQLException: " + e.getMessage());
>               System.out.println("SQLState:     " + e.getSQLState());
>               System.out.println("VendorError:  " + e.getErrorCode());
>       }

Hi albertv

The code looks ok, but I hope you use the Class.forName(..) part only once in your applet.

I assume you specified the ARCHIVE="your.jar" option in your APPLET-tag?

Do you have the mm driver in your client CLASSPATH?
If no, then you didn't make any mistakes by bundling the jar.

Is your network overloaded?
Is the webserver you get the applet from in the same LAN as your client?
Is your default router overloaded?

I connected with an earlier version of mm always within 1 second maximum.

Tschau
Christian

PS: Sorry for the late answer, I was really busy.

Thread
Problems with JDBC Driveralbertv31 Aug
  • Re: Problems with JDBC DriverChristian Mack9 Sep
  • mysqldumpslow errorsMichael Widenius12 Mar