title: "Table name pattern can not be NULL or empty" in java
body: <p>When I want to get tables from databaseMetaData,I get this error:</p>
  
  <pre><code>Exception in thread "main" java.sql.SQLException: Table name pattern can not be NULL or empty.
  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:545)
  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:513)
  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:505)
  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:479)
  at com.mysql.cj.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:3836)
  at FindUserTables.main(FindUserTables.java:14)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
  </code></pre>
  
  <p>This my code,my jdbc driver is mysql-connector-java-6.0.5-bin.jar.What happened?</p>
  
  <pre><code>import java.sql.*;
  public class FindUserTables {
      public static void main(String[] args)
              throws SQLException, ClassNotFoundException {
          Class.forName("com.mysql.cj.jdbc.Driver");
          System.out.println("Driver loaded");
          Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/javabook ?characterEncoding=utf8&amp;useSSL=false&amp;&amp;serverTimezone=UTC", "root", "123456");
          System.out.println("Database connected");
          DatabaseMetaData dbMetaData = connection.getMetaData();
          ResultSet rsTables = dbMetaData.getTables(null, null, null,
                  new String[] {"TABLE"});
          System.out.print("User tables: ");
          while (rsTables.next())
              System.out.print(rsTables.getString("TABLE_NAME") + " ");
          connection.close();
      }
  }
  </code></pre>