1

With Netbeans 14, when creating new Entity Class from Database, I see the following message in the bottom of the wizard screen :

The target server for the project is not set properly. Java Persistence features are server-dependent and some wizards in the IDE might not behave as expected if the target server is not specified.

Entity Class is generated as expected but wonder what could be wrong?! The server used is Payara 5.2022.3 and the database is mySQL 8.0.23.

The jdbc-connection-pool is created with

create-jdbc-connection-pool --datasourceclassname com.mysql.cj.jdbc.MysqlDataSource --restype javax.sql.XADataSource --property user=root:password=******:DatabaseName=myDb:ServerName=localhost:port=3306:useSSL=false:allowPublicKeyRetrieval=true:serverTimezone=UTC:zeroDateTimeBehavior=CONVERT_TO_NULL:driverClass=com.mysql.cj.jdbc.Driver:url=jdbc\\:mysql\\://127.0.0.1\\:3306/myDb myConnectionPool

And the jdbc-resource is created as follow :

create-jdbc-resource --connectionpoolid myConnectionPool jdbc/myApp
Hicham
  • 170
  • 2
  • 16
  • 1
    Nothing is wrong at this stage because generating the entity class does not require a server, but that message is warning you that future related actions (e.g. Use of JPA) might be problematic without a _"target server"_. The old NetBeans bug report [Bug 189915 - "Target server not set properly" message does not give enough information](https://bz.apache.org/netbeans/show_bug.cgi?id=189915) explains what's going on. But what is your actual question? As it stands your post does not contain one. – skomisa Sep 06 '22 at 20:23
  • Thank you @skomisa for the details. It is a so old bug. My question is : what should I do to remove this warning? – Hicham Sep 07 '22 at 08:01
  • The fact that the bug is old is irrelevant; it fully explains why you are seeing that warning message. To get rid of the warning message make sure that you have your Payara instance defined as the server for your project. See [Resolve missing server in netbeans](https://stackoverflow.com/q/38568375/2985643). Does that resolve your concern? – skomisa Sep 07 '22 at 16:28
  • Thanks you @skomisa, the project have already Payara configured as application server. – Hicham Sep 10 '22 at 12:54

0 Answers0