Author Topic: Unable to create connection to GlassFish database with Netbeans?  (Read 401 times)

kevinroland

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
I'm using Netbeans 8.1 beta and Glassfish server 4.1, Mysql.

Every time I create connection between my Webapplication with database it's unable to do it.

I already copy the Jar file to glassfish lib, also I already add reference to web.xml.

I face this error:
description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/IFPWAFCAD"

root cause

javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/IFPWAFCAD"
« Last Edit: March 30, 2022, 10:07:13 AM by DavidSchmidt »

Richard

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-5
Re: Unable to create connection to GlassFish database with Netbeans?
« Reply #1 on: April 04, 2022, 01:38:10 AM »
After many hours of trying to get Netbeans (8.2) to work with Glassfish and in particular JDBC, I ditched Glassfish as I realized it was discontinued. Instead installed Payara which seems to be a fork. Pretty easy in that you just use Glassfish settings in Netbeans, just point to a new direction. To get the Connection Pool and JDBC Resources to show up, go to the admin console of Paraya by right clicking the server in Netbeans and choose "View Domain Admin Control". Go to JDBC Connection Pool and manually add "IpwafcadPool". Remember to add properties for User (root) and Password (root). URL has two properties, one upper and one lower case. I changed both to jdbc:mysql://localhost:3306/MyNewDatabase?zeroDateTimeBehavior=convertToNull.
« Last Edit: April 05, 2022, 10:55:57 AM by lroderic »