title: MissingResourceException when using JDBC?
body: <p>I've used JDBC without any problems many times before, but for some reason on a new server I have it isn't working. The code compiles and runs fine on my main machine, and all the libraries (including the JDBC) should be compiled into a single JAR that I run.</p>
  
  <p>Basic code:</p>
  
  <pre><code>try
  {
      Class.forName("com.mysql.jdbc.Driver");
  }
  catch (ClassNotFoundException e)
  {
      System.err.println("Cannot load driver...");
      e.printStackTrace();
  }
  
  try
  {
      connection = DriverManager.getConnection("jdbc:mysql://localhost/dbname?user=dbuser&amp;password=dbpass");
      statement = connection.createStatement();
  }
  catch (SQLException e)
  {
      System.err.println("Cannot connect to database...");
      e.printStackTrace();
  }
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>Exception in thread "main" java.lang.ExceptionInInitializerError
      at com.mysql.jdbc.Util.stackTraceToString(Util.java:355)
      at com.mysql.jdbc.Util.&lt;clinit&gt;(Util.java:120)
      at com.mysql.jdbc.NonRegisteringDriver.parseURL(NonRegisteringDriver.java:764)
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
      at java.sql.DriverManager.getConnection(DriverManager.java:620)
      at java.sql.DriverManager.getConnection(DriverManager.java:222)
      at com.test.Server.&lt;init&gt;(Server.java:78)
      at com.test.Server.main(Server.java:49)
  Caused by: java.lang.RuntimeException: Can't load resource bundle due to underlying exception java.util.MissingResourceException: Can't find bundle for base name com.mysql.jdbc.LocalizedErrorMessages, locale en_GB
      at com.mysql.jdbc.Messages.&lt;clinit&gt;(Messages.java:61)
      ... 8 more
  Caused by: java.util.MissingResourceException: Can't find bundle for base name com.mysql.jdbc.LocalizedErrorMessages, locale en_GB
      at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1539)
      at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1278)
      at java.util.ResourceBundle.getBundle(ResourceBundle.java:733)
      at com.mysql.jdbc.Messages.&lt;clinit&gt;(Messages.java:59)
      ... 8 more
  </code></pre>
  
  <p>I've never had this kind of error before, and Google is not being helpful at all. I've checked the database credentials, port number, etc. Would appreciate any help on solving it!</p>