I created a little Web app with some EJBs in NetBeans 8.2 and GlassFish 5.0. A little later I delete it. Not just by the IDE but from the hard drive as well. (The project not deployed on the server as well). When I try to ceate a project with a name very close the deleted one (XApp2 and XApp) the EJB-s appers in the "Enterprise Beans" list of the EJB module of the new project. But not in the "Source Packages" The EJB-s are undeleteable in the "Enterprise Beans" tree node. This is not project specific. I can do it again by other named projects. The new project on the hard drive does not contains the EJB files and references to them in the project contents as well.
The situation aggravates when there are some compilation/deployment error in the ghost EJBs. The brand new empty project get undeployable because of the un-existent EJBs.
Some reference should be in the NetBeans environment because I reinstalled the server and the situation is the same.
How can I get rid of the ghost EJBs?