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.
<note> Assigning this to Peter J. to decide what we will/can do. CCing Peter W. to comment on WS stuff. CCing also docs since this involves UI. </note> Currently, the new File wizards (incl. new Java Class and related) are checking the duplicity of the filename/package. We should do the same in J2EE wizards. I should note that this behaviour is not mentioned in the UI specs. Current state of J2EE wizards leads to unexpected behaviour or broken source. Here's a quick summary of the behaviour, when an existing name/package is entered: Session Bean (and probably other Beans as well) * it has unexpected behaviour - a number is appended to the ejb name as well as to the class names when the wizard is closed, the user is not notified in anyway about the duplicity nor the "renaming behind the scenes" PROPOSAL: Let's provide an error message in the wizard if: - the ejb name or display name is duplicate - the files that would be generated already exist CMP Beans from Database PROPOSAL: Should check the conditions for each Entity Bean individualy. If there is a conflict, the bean should not be generated. In the end, the user would be provided with a list of "duplicate beans". Web Service * it's breaking the source - a number is appended to the class names BUT NOT TO THE: - ejb-name - webservice-description-name (shown in Project View) - nor to the *-mapping.xml and *.wsdl files * this results in duplicate records in ejb-jar.xml (and probably corrupts other xmls) * it seems that this bug basically destroys the old web service PROPOSAL: Provide same validation as for Session Beans. Web Service Client (this needs a lot of answers) - The Service Display Name is used from registry - It seems that if the package name is empty, the package name is generated from the name of the web service behind the scenes. - Is there a problem with adding a client from one WSDL/URL twice? (it seems there's no use case for it) - How exactly does it work? what is affected? - How does the issue relate to Web Service Registry (when a WS is being added twice)? PROPOSAL: * A package name might be created based on the information from the WSDL * The duplicity/file conflicts should be checked
websvc wizard in build 200503221900: user isn't allowed to finnish the New Web Service wizard, if there's name clash with other component in the module (servlet, other websvc,...); message is shown at the bottom of the wizard (see issue #54686 for more details)
Sounds reasonable at first glance, assigning to Martin Adamek.
The CMP from Database is a bit complicated because the user picks a bunch of tables and never seens the bean names. Furthermore, even beans for tables not explicitly chosen by the user, but related to those chosen by the user are generated. So, if there are tables: A B C And the user chooses bean A, but B is related, and there is a bean B, there will be this problem. And, what is the user supposed to do? There is no chance to skip related beans or choose another name...
> Web Service Client > The Service Display Name is used from registry The wizard extracts the genuine service name from the WSDL file and attempts to match it against the service name in the registry. The match is actually case insenstive due to registry internals. Best way to fix holes in matching is to upgrade registry module to persist the orginal WSDL (not possible in 4.1). > It seems that if the package name is empty, the package name is generated from the name of the web service behind the scenes. I don't understand this. This is true for the client jar generated by the registry but this jar is only used internally inside NetBeans, never in the user's code. The wizard forces the user to specify a package. I do think we should have the wizard suggest a default package name that is unique per wsdl name, e.g. something like "client.[normalized wsdl name]" > Is there a problem with adding a client from one WSDL/URL twice? (it seems there's no use case for it) It is allowed. It could easily be prevented. The effect is as if the user replaced whatever services were in the old wsdl file with those in the new one. We should probably issue a warning on this at least, if not an outright error. But it will only cause a problem if the user didn't want to upgrade or change the older wsdl file (which likely, but not necessarily is related to the new one.) - How does the issue relate to Web Service Registry (when a WS is being added twice)? Does this refer to the fact that it is possible to get two entries in the registry with the same name? This is a more difficult problem. Unless the registry entries are actually different services, this will never cause a problem. But if they are, unfortunately, there is no easy way to distinguish them (related to registry throwing away the orginal wsdl files when the services were added.) PROPOSAL: * A package name might be created based on the information from the WSDL Agreed. * The duplicity/file conflicts should be checked Agreed.
Regarding web service wizard. The numbers are an artifact of the java target chooser being used -- I don't know what can or should be done about those except to not use the target chooser and have better contraints. Is the name checking code successfully preventing the deployment descriptor collisions, or are there edge cases I missed? (I'm not aware of any). In case someone asks about somehow syncing numbering for web service name and the java implementation files, I do not know how to determine what number will ultimately be used by the chooser, so it only checks the name as written against possibly DD conflicts. Thus, that is the name we have to use.
Will need some more complex solution.
You had included the wrong pwc on this bug.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss