0
votes

I know this has been asked many times before, but none of the solutions worked for me.

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:

[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]

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

Here are some of my settings:

jdbc-connection-pool:

datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource" name="mysql_cinema_pool" res-type="javax.sql.ConnectionPoolDataSource"

1 example of my entities (including the error): https://s9.postimg.org/wrsrysz27/Intelli_J_IDEA_Error.png

I'm struggling with this error all day :(.

1
What you showy is only a warning.Jens
the link still alive for me?Quan Nguyen
ok it is the Standard 404 page so i thought it is brokenJens
@Jens what information that I need to describe more? The link is working for me but I just upload to imgur you can check: imgur.com/a/Vqch8 .Quan Nguyen
There are many possible reasons for 404. Maybe you app is not deployed or you use a wrong urlJens

1 Answers

1
votes

The GlassFish warning means that your application registered the JDBC driver, but did not unregister it during undeployment. When you redeploy your application, the old version gets undeployed and the above warning is raised. It should not affect the newly deployed application.

If you undeploy all applications, restart the server and deploy your application, you should not see the warning.