apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.61k stars 836 forks source link

Troubles in the Wizard : "New JSF Pages from Entity Classes" #7100

Open akaouane opened 5 months ago

akaouane commented 5 months ago

Apache NetBeans version

Apache NetBeans 21 release candidate

What happened

When I try to use the Wizard "New JSF Pages from Entity Classes", :

  1. I get entity classes in the list that not exist in my project (those classes exist in an other project)
  2. I get the message :

Screenshot from 2024-02-22 22-59-40

Language / Project Type / NetBeans Component

No response

How to reproduce

On Ubuntu 22.04, Apache netbeans 21, OpenJkd 11,17, GlassFish 7, Jakarta 10 :

  1. Create a maven project and add some new Entity classes from database.
  2. Delete the project
  3. Create an other maven project and add some other new Entity classes from database.
  4. Create new JSF pages from entity classes

Did this work correctly in an earlier version?

No / Don't know

Operating System

Linux (Ubuntu 22.04)

JDK

11, 17

Apache NetBeans packaging

Apache NetBeans Snap Package

Anything else

I created a Virtualbox instance (windows 10) and I installed apache netbeans 21, Openjdk 17, GlassFish 7 and all things work fine.

Are you willing to submit a pull request?

No

mahammad-fathi commented 5 months ago

in netbeans 21 netbeans-21-bin.zip release final download 24 february When I try to use the Wizard "New JSF Pages from Entity Classes", : Cannot be generated because EJB Lite classes are not available on project classpath Linux Mint 21.3 Virginia openjdk version "11.0.21" 2023-10-17

matthiasblaesing commented 5 months ago

The snap is inofficial. Please test if the issue is reproducible with the ZIP distribution:

https://netbeans.apache.org/front/main/download/nb21/

https://www.apache.org/dyn/closer.lua/netbeans/netbeans/21/netbeans-21-bin.zip

Please note: That only concerns:

I get entity classes in the list that not exist in my project (those classes exist in an other project)`

The other issue is already covered by: https://github.com/apache/netbeans/pull/7080

akaouane commented 5 months ago

Hi @matthiasblaesing I tested the zip version : https://netbeans.apache.org/front/main/download/nb21/ And I get those problems : 1-After I create a new maven project, I cannot select all tables from my database, when I want to create Entity calsses from database, as you can see :

image

2- When I want to create new JSF pages from Entity classes, I find Entity classes in the list even they do not exist in my project, as you ca see :

image

3- When I select the Entity class and continue with the Wizard, I cannot select the JavaServerFaces library :

image

So I cancel the Wizard and I add the FramWorks Library from the project properties.

4- When I use the Wizad to create the JSF pages from Entity classes, I cannot find the PrimeFaces templates in the list

image

I will do more tests and I will post any errors here. Thanks

matthiasblaesing commented 4 months ago

In general I think it is a bad idea to reuse a single issue for multiple problems. That is bad for both sides, either a problem gets overlooked or the issue can't be closed because it is not fully resolved.

Anyway, for your report:

  1. what is displayed, when you hover over one of the unselectabed/grayed tables?
  2. please create detailed steps to reproduce, show the project(s) you used (zipped). The entity classes could come from a dependency in your sample (the dependency node is collapsed, so I have to speculate). On master the problem was not reproducable from the description
  3. seems to be a real problem - maybe classpath scanning issues after enabling of jakarta support
  4. most probably connected to 3
akaouane commented 4 months ago

Hi @matthiasblaesing .

  1. When I hover over the unselectabed/grayed tables, I get :

image

As you can see, there is no entity class in my project. Also you can see that I have no project in netbeans.

matthiasblaesing commented 4 months ago

You don't show the dependencies node. The maven implementation of the EntityClassScopeProvider (that supplied the entity implementations) scans the whole classpath and thus also in dependencies. This still needs steps to reproduce. These steps must work with a clean user dir and must not assume external setup.