title: sql connection errors - prevent me from 'SELECT' data from mysql
body: <p>i'm trying 12 hours now to SELECT data from my DB but i can't.</p>
  
  <p>INSERT works fine. just SELECT not working.</p>
  
  <p>When i run connect() function i'm get lot of errors:</p>
  
  <pre><code>      public void connect() {
          String dbUrl = "jdbc:mysql://*****.heliohost.org:3306/*****";
          try 
          {
              Class.forName("com.mysql.jdbc.Driver");
              connection = DriverManager.getConnection(dbUrl,"*****","****");
              return;//the debugger never succeed to reach this line
  
          } catch (Exception e) {
              e.printStackTrace();
  
          }
        }
  </code></pre>
  
  <p>the errors i get from the above connect() function:</p>
  
  <pre><code>12-23 16:22:54.460: W/dalvikvm(7473): VFY: unable to find class referenced in signature (Ljavax/naming/Reference;)
  12-23 16:22:54.470: I/dalvikvm(7473): Could not find method javax.naming.Reference.get, referenced from method com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty.initializeFrom
  12-23 16:22:54.470: W/dalvikvm(7473): VFY: unable to resolve virtual method 14440: Ljavax/naming/Reference;.get (Ljava/lang/String;)Ljavax/naming/RefAddr;
  12-23 16:22:54.470: D/dalvikvm(7473): VFY: replacing opcode 0x6e at 0x0004
  12-23 16:22:54.491: W/dalvikvm(7473): VFY: unable to find class referenced in signature (Ljavax/naming/Reference;)
  12-23 16:22:54.491: E/dalvikvm(7473): Could not find class 'javax.naming.StringRefAddr', referenced from method com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty.storeTo
  12-23 16:22:54.491: W/dalvikvm(7473): VFY: unable to resolve new-instance 1365 (Ljavax/naming/StringRefAddr;) in Lcom/mysql/jdbc/ConnectionPropertiesImpl$ConnectionProperty;
  12-23 16:22:54.491: D/dalvikvm(7473): VFY: replacing opcode 0x22 at 0x0006
  </code></pre>
  
  <p>The next function is falling only when it get to line: "String tem = result.getString("name")":</p>
  
  <pre><code>public List&lt;String&gt; selectCategories()
  {
      List&lt;String&gt; listCS = new ArrayList&lt;String&gt;();
      try
      {
             Statement statement = connection.createStatement();
             statement.execute("select name from categories");
              ResultSet result=statement.getResultSet();
  
              if(result!=null)
              {
                  while(result.next());
                  {   
                      String tem = result.getString("name");
                      listCS.add(tem);                                    
  
                  }//end of while
              }//end of if
  
      }//end of try
      catch(java.sql.SQLException e)
      {
          e.printStackTrace();
      }
      return listCS;
  }
  </code></pre>