title: NetBeans unable to find org.postgresql.ds.PGSimpleDataSource driver
body: <p>I have glass fish installed and have set up a JDBC connection pool and resource like so (with the password hidden for obvious reasons!):</p>
  
  <pre><code>&lt;jdbc-connection-pool datasource-classname="org.postgresql.ds.PGSimpleDataSource" res-type="javax.sql.DataSource" name="FYPPool"&gt;
    &lt;property name="User" value="Matt"&gt;&lt;/property&gt;
    &lt;property name="DatabaseName" value="Matt"&gt;&lt;/property&gt;
    &lt;property name="LogLevel" value="0"&gt;&lt;/property&gt;
    &lt;property name="BinaryTransfer" value="true"&gt;&lt;/property&gt;
    &lt;property name="Ssl" value="false"&gt;&lt;/property&gt;
    &lt;property name="ServerName" value="localhost"&gt;&lt;/property&gt;
    &lt;property name="ProtocolVersion" value="0"&gt;&lt;/property&gt;
    &lt;property name="Url" value="jdbc:postgresql://localhost/?loginTimeout=0&amp;amp;socketTimeout=0&amp;amp;prepareThreshold=5&amp;amp;unknownLength=2147483647&amp;amp;tcpKeepAlive=false&amp;amp;binaryTransfer=true&amp;amp;disableColumnSanitiser=false"&gt;&lt;/property&gt;
    &lt;property name="ReceiveBufferSize" value="-1"&gt;&lt;/property&gt;
    &lt;property name="TcpKeepAlive" value="false"&gt;&lt;/property&gt;
    &lt;property name="SendBufferSize" value="-1"&gt;&lt;/property&gt;
    &lt;property name="SocketTimeout" value="0"&gt;&lt;/property&gt;
    &lt;property name="PortNumber" value="5432"&gt;&lt;/property&gt;
    &lt;property name="LoginTimeout" value="0"&gt;&lt;/property&gt;
    &lt;property name="UnknownLength" value="2147483647"&gt;&lt;/property&gt;
    &lt;property name="PrepareThreshold" value="5"&gt;&lt;/property&gt;
    &lt;property name="Password" value="******"&gt;&lt;/property&gt;
  &lt;/jdbc-connection-pool&gt;
  &lt;jdbc-resource pool-name="FYPPool" jndi-name="jdbc/FYP"&gt;&lt;/jdbc-resource&gt;
  </code></pre>
  
  <p>I can ping the connection pool just fine.</p>
  
  <p>In NetBeans I have added a new driver under the "Services" tab which points to the jar I placed in the glass fish lib: <code>/Applications/NetBeans/glassfish-4.0/glassfish/lib/postgresql-9.3-1102.jdbc41.jar</code>. Note: When I choose the jar it populates the "Driver Class" text box with <code>org.postgresql.Driver</code> which is not the same as the one in the question title, but if I click the find button next to the text box it says "Searching for driver classes" with a progress bar and then under it an info symbol saying "Driver class is missing". If I press the find button again it populates it with the values that were there after selecting the jar.</p>
  
  <p>I then try to create some entity classes from the database, so I select the data source as my <code>jdbc/FYP</code> resource and from here there are two scenarios:
  1. If I have my glassfish installation running then the error "The name of the driver class for the datasource is missing" appears 
  2. If it is not running then the error "Unable to find the driver org.postgresql.ds.PGSimpleDataSource" appears.</p>
  
  <p>This second case seems interesting as it is the driver name it can't find is the same as the one that is set when creating the JDBC connection pool, but is not the same as the driver class that gets sets when registering the driver in NetBeans.</p>
  
  <p>Even more interesting/weird is that if I create a new connection under the "Services" tab for the postgresql database and use the driver I created it can create a connection and find the tables absolutely fine.</p>