title: persistence, oracle thin, ORA-12505, TNS listener does not currently know of SID
body: <p>I'm using 11 g express edition, Eclipse Juno, Java 6</p>
  
  <p>Oracle is up and running even tried shutdown immediate and startup but didn't get SID listener error </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"&gt;
  
    &lt;persistence-unit name="default" transaction-type="RESOURCE_LOCAL"&gt;
      &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
      &lt;class&gt;com.crspdemo.Employee&lt;/class&gt;
      &lt;properties&gt;
        &lt;property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@localhost:1521:jsfDatabase"/&gt;
        &lt;property name="javax.persistence.jdbc.password" value="admin"/&gt;
        &lt;property name="javax.persistence.jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/&gt;
        &lt;property name="javax.persistence.jdbc.user" value="system"/&gt;
        &lt;!--&lt;property name="eclipselink.ddl-generation" value="create-tables"/&gt;--&gt;
      &lt;/properties&gt;
    &lt;/persistence-unit&gt;
  
  &lt;/persistence&gt;
  </code></pre>
  
  <p><strong>ERROR:</strong></p>
  
  <pre><code>Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException
  </code></pre>
  
  <p>Internal Exception: java.sql.SQLException: Listener refused the connection with the following error:
  <strong>ORA-12505, TNS:listener does not currently know of SID given in connect descriptor</strong></p>
  
  <p><strong>Listner.ora</strong></p>
  
  <p><img src="https://i.stack.imgur.com/u9HQQ.png" alt="listner.ora"></p>