Glassfish Admin Console throws java.lang.IllegalStateException when creating JDBC Pool

According to the following JIRA tickets:

this is still an unresolved issue. Even though we can expect such things since Oracle abandoned a commercial support for Glassfish, it is still horrible that such basic functionality does not work.

However, if you are really desperate, there is a very nasty workaround. Glassfish arrives with a predefined JDBC pool DerbyPool that you probably won’t need, unless you are dealing with Java DB. Feel free to edit it by changing Datasource classname to com.mysql.jdbc.jdbc2.optional.MysqlDataSource and adjusting additional properties to point on MySQL Server instance. Prior to doing this hack, make sure that you put MySQL connector to the Glassfish’s lib folder.

UPDATE

Just noticed that there is a Glassfish version that has been patched, it is called Payara and available for download here. According to the documentation, it is a GlassFish 4.1 clone, patched and further developed by the community.

Leave a Comment