title: Getting exception java.sql.SQLException: socket creation error
body: <p>I tride to Run the following code in eclipse</p>
  
  <pre><code>public static void main(String[] args) {
      Connection connection = null;  
      ResultSet resultSet = null;  
      Statement statement = null;  
  
      try {  
          Class.forName("org.hsqldb.jdbcDriver");  
          connection = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/URLAccess", "SA", "");  
          statement = connection.createStatement();  
          resultSet = statement.executeQuery("SELECT referrer FROM Access");  
          while (resultSet.next()) {  
              System.out.println("referrer : "+ resultSet.getString("referrer"));  
          }  
      } catch (Exception e) {  
          e.printStackTrace();  
      } finally {  
          try {  
              resultSet.close();  
              statement.close();  
              connection.close();  
          } catch (Exception e) {  
              e.printStackTrace();  
          }  
      }  
  }  
  </code></pre>
  
  <p>but i am getting following exception
  can anyone suggest...</p>
  
  <pre><code>java.sql.SQLException: socket creation error
      at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
      at org.hsqldb.jdbc.jdbcConnection.&lt;init&gt;(Unknown Source)
      at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
      at org.hsqldb.jdbcDriver.connect(Unknown Source)
      at java.sql.DriverManager.getConnection(DriverManager.java:582)
      at java.sql.DriverManager.getConnection(DriverManager.java:185)
      at testdriver.Hsqldb.main(Hsqldb.java:20)
  java.lang.NullPointerException
      at testdriver.Hsqldb.main(Hsqldb.java:30)
  </code></pre>
  
  <p>WHat i was trying to do is run this query to get details of the table(access) in my Hypersql DB and while trying to run the above code i got the above exception.</p>
  
  <p>Please help on this regard. Looking forward to your solutions.</p>