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.

Bug 53841 - should not create web services without a package
Summary: should not create web services without a package
Status: CLOSED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Petr Jiricka
URL:
Keywords: UI
: 53899 55724 (view as bug list)
Depends on: 56730
Blocks:
  Show dependency tree
 
Reported: 2005-01-22 00:40 UTC by _ ludo
Modified: 2006-03-24 13:17 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ ludo 2005-01-22 00:40:42 UTC
if the java code for a web service does not hava a
pacakge, wscompile fails with a very poor error
message.
Our wizard should prevent that. We only have a
warning at creation time. This is not enough...
(jdk1.5)

We should also test for ejbs...
Comment 1 Viliam Sivaninec 2005-03-10 13:13:12 UTC
Along with adding the package requirement condition, the warning message
suggesting to create the web service with a package will have to be changed to
an error message explaining to the user why he can't go on to the next step.

In the interest to preserver consistency across the wizards (possibly the IDE),
where else should should this requirement condition be added? Isn't this going
to make the wizards too restrictive?
Comment 2 _ ludo 2005-03-16 06:00:59 UTC
*** Issue 55724 has been marked as a duplicate of this issue. ***
Comment 3 _ ludo 2005-03-16 06:02:10 UTC
*** Issue 53899 has been marked as a duplicate of this issue. ***
Comment 4 _ ludo 2005-03-16 06:06:50 UTC
so far, this has to be done for web services only.
Ejb migh be ok.
Please, we need a fix in 4.1 for this on Web Services wizard.

Comment 5 Viliam Sivaninec 2005-03-17 20:56:07 UTC
Fixed. This change was applied to web services only, as per the above comment.

Checking in Bundle.properties;
/cvs/java/project/src/org/netbeans/modules/java/project/Bundle.properties,v  <--
 Bundle.properties
new revision: 1.29; previous revision: 1.28
done

Checking in JavaTargetChooserPanel.java;
/cvs/java/project/src/org/netbeans/modules/java/project/JavaTargetChooserPanel.java,v
 <--  JavaTargetChooserPanel.java
new revision: 1.23; previous revision: 1.22
done

Checking in JavaTemplates.java;
/cvs/java/project/src/org/netbeans/spi/java/project/support/ui/templates/JavaTemplates.java,v
 <--  JavaTemplates.java
new revision: 1.12; previous revision: 1.11
done

Checking in WebServiceWizard.java;
/cvs/websvc/dev/src/org/netbeans/modules/websvc/dev/wizard/WebServiceWizard.java,v
 <--  WebServiceWizard.java
new revision: 1.12; previous revision: 1.11
done
Comment 6 Jesse Glick 2005-03-18 00:52:53 UTC
Fix needs to be backed out; the API change was not reviewed and is undocumented.
Comment 7 Viliam Sivaninec 2005-03-18 09:27:52 UTC
The fix was rolled back.
Comment 8 Viliam Sivaninec 2005-03-18 15:25:39 UTC
This fix can't make it into this release since there is not an alternate
reasonable way to implement it other than modifying
org.netbeans.spi.java.project.support.ui.templates.JavaTemplets for which it is
too late in the game to get approval as this issue is not a show-stopper.

org.netbeans.modules.java.project.JavaTargetChooser validates the package name
and  we need to let it know from outside the module to do the validation
slightly different in our case (and possibly other cases such as EJBs). 

Changing Target milestone to 'future'
Comment 9 _ ludo 2005-03-18 15:32:42 UTC
2 or 3 other bugs was depending on this one.
I propose we force the creation of a package either pckg, or the name of the
project, javatized.

We need to keep looking for a fix for 4.1

Ludo
Comment 10 _ ludo 2005-03-19 18:30:52 UTC
Trung, please take a look at this one...
A solution was done, by denied because it needed a change int the project
support publsihed apis...
How would do a code developer to force a wizard to have a real package and not
the default package...
I am sure you can find a solution with Jesse G.
If we cannot fix this one, I need to reopne a few  bugs because, having ws in
default package cannot compile with wscompile , or cannot be refactored or deleted.

Thanks 
Comment 11 _ ttran 2005-03-19 19:54:10 UTC
Ludo, please work directly with Jesse to resolve it.  You two can talk with each
other directly.  

If I understand correctly the change was rolled back because it's unreviewed api
change.  You need to request the api change first with proper description with
use case and justification.

I also raise priority to P2.  This looks like a bad user experience problem.  If
she accepts all the defaults from the IDE, she ends up with broken code

Comment 12 Pavel Buzek 2005-03-19 21:44:12 UTC
I think that the API addition in JavaTemplates is actually OK.
Can this be reviewed and applied as it is? API reviewers, please comment.
Comment 13 _ ludo 2005-03-19 21:59:59 UTC
I am copying the previous change that was done without review:

Directory: /java/project/src/org/netbeans/spi/java/project/support/ui/templates/
================================================================================
File [changed]: JavaTemplates.java
public static WizardDescriptor.Panel createPackageChooser(Project project,
 SourceGroup[] folders, WizardDescriptor.Panel bottomPanel, boolean 
validPackageRequired) throws IllegalArgumentException {
if (folders.length == 0) {
  throw new IllegalArgumentException("No folders selected"); // NOI18N
 }
 return new JavaTargetChooserPanel(project, folders, bottomPanel, false,
validPackageRequired);
  } 

Comment 14 _ ttran 2005-03-19 22:15:37 UTC
Petr Hrebejk owns project ui api.  Please file a separate api change request
issue and assign to him.  Attach the patch 

The change would be in projecs module not websvc.  Wrong component
Comment 15 Petr Jiricka 2005-03-23 18:57:53 UTC
Fixed.

Checking in src/org/netbeans/modules/websvc/dev/wizard/WebServiceWizard.java;
/cvs/websvc/dev/src/org/netbeans/modules/websvc/dev/wizard/WebServiceWizard.java,v
 <--  WebServiceWizard.java
new revision: 1.15; previous revision: 1.14
done
Comment 16 Petr Blaha 2005-04-04 09:16:25 UTC
[Build 20050403]