The name of the driver class for the datasource is missing (Netbeans+ PostgreSql + Glassfish)

I'm trying to develop an EJB application using Netbeans 8 on a Postgres 9.2 db and Glassfish 4 server.

Once I created connection pool and JDBC resources in the glassfish admin panel, I'm not able to add entities using the datasource. Netbeans still giving me an error:

The name of the driver class for the datasource is missing

I've already tried adding libraries to the project. I copied postgresql-9.2-1002.jdbc4.jar and postgresql-9.2-1002.jdbc3.jar files in C:\Program Files\glassfish-4.0\glassfish\domains\domain1\lib folder.

Screenshot: http://imageshack.com/a/img843/6884/w3ko.png

If I create entities using a connection created before(in NB Services/Databases), it works, but result set after any query is empty. Any idea?

Here the connection pool I created: http://imageshack.com/a/img838/8286/bkw8.png

This is my persistence.xml:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
  <persistence-unit name="Esempio-ejbPU" transaction-type="JTA">
    <jta-data-source>try_</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="javax.persistence.schema-generation.database.action" value="create"/>
    </properties>
  </persistence-unit>
</persistence>

Glassfish: the name of the driver class for the datasource is missing , I was facing the same problem in case of PostgreSQL and performed the following steps for successful database connection with Netbean:. The name of the driver class for the datasource is missing (Netbeans+ PostgreSql + Glassfish)

238667 – Driver missing in Create Entity Class From Database , Sorry for the confusion, when you create the DataSource from the NetBean IDE like mentioned in the tutorial it works fine like you said. But when� Very annoying. Mysql jdbc connection, defined in glassfish and Netbeans can’t load it. Again no helpful hints anywhere except bug entries for netbeans. Turns out if you add a “driverClass” property to the connection pool with value “com.mysql.jdbc.Driver” the problem goes away. Obvious really….

I resolved this issue like this:

  1. Delete the datasource in glassfish.
  2. Create the connection datasource in Netbeans (Tab Services --> Databases)
  3. Create a Enterprise project
  4. Create Entity classes from Databases
  5. Execute the wizard
  6. Deploy the project in glassfish from NetBeans
  7. Enter to Glassfish Admin console and check the created datasource in Resources-->JDBC (Must be created a pool and datasource).

The name of the driver class for the datasource is missing (Netbeans , glassfish admin panel, i'm not able add entities using datasource. netbeans still giving me error: the name of driver class datasource missing. Teams. Q&A for Work. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information.

Steps in Netbeans: Go To-->Service Tab-->Right Click on Drivers-->New Driver--> Add your driver jar file here

Netbeans automatically populates details of driver from JAR file.Check Driver Class value, this value we will use in Glassfish server connection pool.

Steps in Glassfish:

Go to Glassfish Admin panel In your JDBC Connection pool add property driverClass and paste the value of Driver Class registered with Netbeans Drivers tab in previous step.

The name of the driver class for the datasource is missing, I'm trying to develop an EJB application using Netbeans 8 on a Postgres 9.2 db and Glassfish 4 server. Once I created connection pool and JDBC resources in� Apache NetBeans Bugzilla – Bug 238667 Driver missing in Create Entity Class From Database using MySQL Data Source Last modified: 2015-02-23 10:28:09 UTC

Solved: it was a connection pool issue. Creating a driver one in glassfish admin panel I've got no more problems.

How to setup a JDBC connection in Glassfish, For me the issue was that I had added a new JDBC driver JAR file to Glassfish, but I hadn't added it to NetBeans. The first step is to copy your JAR file to� 235511 – Driver missing in Create Entity Class From Database using JBoss EAP6 Data Source. This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues. Bug 235511 - Driver missing in Create Entity Class From Database using JBoss EAP6 Data Source.

Netbeans, Within the Data Source DropDown I found my “jdbc/evaluation” selected and… “ Error” => “The name of the driver class for the dataresource is missing. In my case,i have been using JPA to access my DB (mysql) via netbeans IDE and it was� "The APP driver" - The IBM DB2 App Driver is a type-2 JDBC driver. This means you must install the DB2 client classes (dlls) on your client. This is generally bad for us. driver: COM.ibm.db2.jdbc.app.DB2Driver; url: jdbc:db2:<dbname> delivered in: db2java.zip "The Universal driver" - The IBM DB2 Universal Driver is a type-2 JDBC driver.

NetBeans in the Classroom: MySQL JDBC Connection Pool , The name of the driver class for the datasource is missing. I got this error messages when trying create Entity Classes from Database. If using JDBC Driver 8.4, set the classpath to include the mssql-jdbc-8.4.1.jre8.jar, mssql-jdbc-8.4.1.jre11.jar, or mssql-jdbc-8.4.1.jre14.jar. If the classpath is missing an entry for the right Jar file, an application will throw the common Class not found exception. For Microsoft JDBC Driver 8.4

Connecting to Oracle Database, NetBeans has a feature that deploys the database driver to the domain's lib folder if that JNDI names for connection resources always begin with jdbc/ followed by a datasource-classname="com.mysql.jdbc.jdbc2.optional.

Comments
  • Hmm I get the same error. Maybe a bug in Netbeans? As a workaround you can create your entities manually.
  • Shutdown the server and try again. But this doesn't show any tables on my database.
  • could you mention which driver you installed?
  • This is not an answer. You need to describe how you solved it or even better accept @Iragi KNJ answer which describes how to solve this (at least it did for me)