title: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
body: <p>I'm very new on Database subjects and trying to do some beginner stuff with connecting from Netbeans. but when i test my connection i'm facing with some error (i searched this error but couldnt understand anything). i installed <code>Oracle 10g Express Database Edition</code> and downloaded <code>ojdbc6.jar</code> for <code>Oracle Thin</code>. this my simple code just for test the driver version;</p>
  
  <pre><code>import java.sql.*;
  import oracle.jdbc.pool.OracleDataSource;
  
      class JDBCVersion
      {
        public static void main (String args[]) throws SQLException
        {
          OracleDataSource ods = new OracleDataSource();
          ods.setURL("jdbc:oracle:thin:@localhost:1521:XE [hr on HR]");
          Connection conn = ods.getConnection();
  
          // Create Oracle DatabaseMetaData object
          DatabaseMetaData meta = conn.getMetaData();
  
          // gets driver info:
          System.out.println("JDBC driver version is " + meta.getDriverVersion());
        }
      }
  </code></pre>
  
  <p>and i get  </p>
  
  <pre><code>Exception in thread "main" java.sql.SQLException: Listener refused the connection with the following error:
  ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
  </code></pre>
  
  <p>as i said i am newbie about this database stuff and i will be very glad if you can help with explaining. thanks anyway</p>