You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Richard Grin <Ri...@univ-cotedazur.fr> on 2022/03/05 23:03:56 UTC

NetBeans 13 - Maven Web project - "Create entities from database" is not working

Hi,

My environment: Windows 10, MySQL 8.0.25, NetBeans 13, Java 11, Payara 
5.2022.1

In NetBeans I have created a new connection to a database in MySQL in 
the tab "Services". It worked. In NetBeans I can see the tables of the 
database.

Then I create a new Maven project with the type "Java with Maven" > "Web 
Application". I change a little the file pom.xml : 11 instead of 1.8 for 
source and target Java version and to update the old version 2.3 of the 
maven-war-plugin (incompatibility during "clean and build" of the project).

Right after, I try to create entities from the table in the database : 
New > Entity classes from database.

A new window "New Entity from Database" pops up. I have to give the data 
source in a drop down list. The MySQL data source is not in the list so 
I choose the option "New Data Source". A new window pops up and I give a 
JNDI name and the database connection I created before in NetBeans. I 
click on OK.

No error message but no table is displayed in the window "New Entity 
from Database. So I can't create the entities from the database.

This procedure was working in NetBeans 12.5.

Can you help me? Is it a bug?

Richard


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: NetBeans 13 - Maven Web project - "Create entities from database" is not working

Posted by Richard Grin <Ri...@univ-cotedazur.fr>.
Hello again...

I remind you my environment: Windows 10, MySQL 8.0.25, NetBeans 13, Java 
11, Payara 5.2022.1, project Java Web Jakarta EE 8.

I have 2 problems with the wizard "New entity class from database".

First problem : With this wizard I create an entity with the data source 
"jdbc/customer" (JDBC data source created in Payara). When I select this 
data source in the drop down list, I receive the error message "The name 
of the driver class for the datasource is missing.". It was not the case 
with the version 12.5 of NetBeans. I receive the same message for all 
the datasources, jdbc/_default, jdbc/_timerPool,...

I modify the file domain.xml of Payara to add the name of the driver and 
I restart Payara.

Second problem : Now, when I select "jdbc/customer", NetBeans does not 
display the table of the database. Instead it launches the "New 
Connection Wizard" as if I had clicked on the option "New Data source" 
in the drop down list for "Data Source". If it is the first time I 
create an entity class from the database, it works, but, the next time I 
create another entity from the same database, I receive an error message 
"Unable to add connection. Connection already exists.".

Do you have the same problems with NetBeans 13? Can you reproduce?

Regards,

Richard

Le 06/03/2022 à 08:44, Richard Grin a écrit :
> Sorry. I have just understood my error: the application server was not 
> started!
>
> Le 06/03/2022 à 00:03, Richard Grin a écrit :
>> Hi,
>>
>> My environment: Windows 10, MySQL 8.0.25, NetBeans 13, Java 11, 
>> Payara 5.2022.1
>>
>> In NetBeans I have created a new connection to a database in MySQL in 
>> the tab "Services". It worked. In NetBeans I can see the tables of 
>> the database.
>>
>> Then I create a new Maven project with the type "Java with Maven" > 
>> "Web Application". I change a little the file pom.xml : 11 instead of 
>> 1.8 for source and target Java version and to update the old version 
>> 2.3 of the maven-war-plugin (incompatibility during "clean and build" 
>> of the project).
>>
>> Right after, I try to create entities from the table in the database 
>> : New > Entity classes from database.
>>
>> A new window "New Entity from Database" pops up. I have to give the 
>> data source in a drop down list. The MySQL data source is not in the 
>> list so I choose the option "New Data Source". A new window pops up 
>> and I give a JNDI name and the database connection I created before 
>> in NetBeans. I click on OK.
>>
>> No error message but no table is displayed in the window "New Entity 
>> from Database. So I can't create the entities from the database.
>>
>> This procedure was working in NetBeans 12.5.
>>
>> Can you help me? Is it a bug?
>>
>> Richard
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: NetBeans 13 - Maven Web project - "Create entities from database" is not working

Posted by Richard Grin <Ri...@univ-cotedazur.fr>.
Sorry. I have just understood my error: the application server was not 
started!

Le 06/03/2022 à 00:03, Richard Grin a écrit :
> Hi,
>
> My environment: Windows 10, MySQL 8.0.25, NetBeans 13, Java 11, Payara 
> 5.2022.1
>
> In NetBeans I have created a new connection to a database in MySQL in 
> the tab "Services". It worked. In NetBeans I can see the tables of the 
> database.
>
> Then I create a new Maven project with the type "Java with Maven" > 
> "Web Application". I change a little the file pom.xml : 11 instead of 
> 1.8 for source and target Java version and to update the old version 
> 2.3 of the maven-war-plugin (incompatibility during "clean and build" 
> of the project).
>
> Right after, I try to create entities from the table in the database : 
> New > Entity classes from database.
>
> A new window "New Entity from Database" pops up. I have to give the 
> data source in a drop down list. The MySQL data source is not in the 
> list so I choose the option "New Data Source". A new window pops up 
> and I give a JNDI name and the database connection I created before in 
> NetBeans. I click on OK.
>
> No error message but no table is displayed in the window "New Entity 
> from Database. So I can't create the entities from the database.
>
> This procedure was working in NetBeans 12.5.
>
> Can you help me? Is it a bug?
>
> Richard
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists