GlassFish To prevent a memory leak, the JDBC Driver has been forcibly unregistered
<p>I know this has been asked many times before, but none of the solutions worked for me.</p>

<p>I'm using GlassFish, try to get database from connection Pool. When trying to run, although the output is Artifact is deployed successfully, but in browser return the error page, and error logs shows: </p>

<blockquote>
  <p>[WARNING] [] [javax.enterprise.web.util] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1473348595597] [timeMillis: 1473348603791] [levelValue: 900] [[
    The web application [unknown] registered the JDBC driver [com.mysql.cj.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.]]
  [/pre]</p>
</blockquote>

<p>Yes, I already put JDBC driver jar into glassfish-installation-folder/glassfish/lib/
Still that error. Even put to glassfish-installation-folder/glasshfish/domains/domain-name/lib/. And the are no JDBC driver in web app/lib</p>

<p>Here are some of my settings:</p>

<p>jdbc-connection-pool:</p>

<blockquote>
  <p>datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource" name="mysql_cinema_pool" res-type="javax.sql.ConnectionPoolDataSource"</p>
</blockquote>

<p>1 example of my entities (including the error): <a href="https://s9.postimg.org/wrsrysz27/Intelli_J_IDEA_Error.png" rel="nofollow">https://s9.postimg.org/wrsrysz27/Intelli_J_IDEA_Error.png</a></p>

<p>I'm struggling with this error all day :(.</p>