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 70335 - No indication when registering already registered domain
Summary: No indication when registering already registered domain
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-13 14:38 UTC by Lukas Jungmann
Modified: 2006-08-07 10:30 UTC (History)
4 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 Lukas Jungmann 2005-12-13 14:38:35 UTC
[200512122030]

-register AppServer in ide, eg. domain1
-register already registered domain in IDE

  In this case some message (something like "Cannot register already registered
domain") should appear but nothing happens = no exception, no dialog with some
message
Comment 1 Vince Kraemer 2005-12-13 17:04:09 UTC
a message appears when you click finish
Comment 2 Lukas Jungmann 2005-12-13 18:02:21 UTC
  ludo is my witness that there was no message shown after pressing finish
button in the wizard on my box, he saw that on his own eyes too...

(btw: again winXP-64bit, jdk 1.5.0_06-fcs)
Comment 3 Vince Kraemer 2005-12-13 20:02:00 UTC
Does the second domain get registered?
Comment 4 Vince Kraemer 2005-12-13 20:18:52 UTC
Do you use the same "type" of instance in both registration steps...

both default, both local directory.....

Detailed steps to reproduce this would not be unuseful....
Comment 5 Lukas Jungmann 2005-12-13 21:53:05 UTC
some more info follows:

   IDE, OS & Java version (i wasn't sure about java version in my last comment
so this is just to be sure):

 Product Version       = NetBeans IDE Dev (Build 200512122030)
 Operating System      = Windows 2003 version 5.2 running on x86 (= winXP-64bit)
 Java; VM; Vendor; Home= 1.5.0_06; Java HotSpot(TM) Client VM 1.5.0_06-b05; S
un Microsystems Inc.; D:\java\sdk\1.5.0_06\jre

   AppServer: 8.2 PE - build b04-fcs (not more then one week old build) -
located in $AS_HOME=D:\java\appSrv82, with domains "domain1" (default) and
"test" (created by wizard in IDE); both domains are in $AS_HOME/domains directory

My steps:
   delete old $NB_USERDIR
   start IDE with new userdir
   for (int i = 0; i < 2; i++) {
     add server
      - select SJS AS, next
      - platform location = $AS_HOME
      - choose "Register Default Local Domain"
      - choose domain1 (cannot select other - issue #70334) in Domain combobox
      - finish
   }

reproducible also with:
   delete old $NB_USERDIR
   start IDE with new userdir
   add server
     - select SJS AS, next
     - platform location = $AS_HOME
     - choose "Register Default Local Domain"
     - choose domain1 (cannot select other - issue #70334) in Domain combobox
     - finish
   add server
     - select SJS AS, next
     - platform location = $AS_HOME
     - choose "Register Local Domain", next
     - Domain = $AS_HOME/domain/domain1, next
     - fill in admin, admin pwd
     - finish


> Does the second domain get registered?

   $NB_USERDIR/config/J2EE/InstalledServers/.nbattrs is not being rewritten
(according to its timestamp) => so it seems it doesn't but I don't know how can
I prove it...

   Any other info I can provide?
Comment 6 Vince Kraemer 2005-12-13 22:26:33 UTC
changed the wrong target a minute ago
Comment 7 Vince Kraemer 2005-12-13 22:38:42 UTC
Is this issue worth stopping the release over?...
Comment 8 Lukas Jungmann 2005-12-13 22:58:42 UTC
  Will agree with downgrading this to P3 when issue 70334 will become fixed and
verified in release_50 branch because one is not informed that there's something
wrong with domain registration now.
  Mentioned issue could be discovered earlier if some message appears...
Comment 9 Vince Kraemer 2005-12-14 00:03:49 UTC
can dup
Comment 10 Vince Kraemer 2005-12-14 07:22:58 UTC
I don't have a good explination for what I am seeing.

The duplicate entry triggers an InstanceCreationException.

That exception is supposed to be displayed, using DialogDisplayer..notify(dialogdescriptor), but it appears 
for just a split second and then disappears as the wizard dialog closes.....
Comment 11 Vince Kraemer 2005-12-17 17:04:25 UTC
http://serverplugins.netbeans.org/servlets/ReadMsg?list=cvs&msgNo=1173

Note: I don't like this fix...  The previous code has worked in the past (I
tested against 2005-12-01 qbuild).  I think there is a regression in the
interaction between RequestProcessor/DialogDisplayer, which I don't have the
time to diagnose.

Hopefully, one of the reviewers may have a better insight on this.

For reference, here is a link to Util.java:
http://serverplugins.netbeans.org/source/browse/serverplugins/sun/appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/ui/Util.java?rev=1.5&content-type=text/vnd.viewcvs-markup
Comment 12 _ rkubacki 2005-12-19 10:02:11 UTC
I asked Jirka for help and now know what happens there (and what changed on Dec 5):

a method in WizardDescriptor that performs instantiating is called in EDT
-> instantiate() gets called synchronously
  -> AddDomainWI.createInstance() is called (through instantiate())
    -> exception is thrown and SU.iL() is called to display notification
  -> SU.iL() is called to finish the wizard (close it & fire events)
-> 1st runnable is processed and displays the notification parented to wizard
-> 2nd runnable is processed that closes wizard and its child window

The diffence is that before WizardDescriptor rev 1.16 the closing of wizard was
done synchronously in a method that also called the instantiate() so your
notification was already parented to main window.

Possible fix is to set the wizard as a leaf window using
DialogDescriptor.setLeaf() so the notification will be parented to main app
window -
http://www.netbeans.org/download/dev/javadoc/org-openide-dialogs/apichanges.html#add-leaf-attribute-to-DialogDescriptor
Comment 13 _ rkubacki 2005-12-19 12:20:53 UTC
btw: current fix should serve its purpose well
Comment 14 Vince Kraemer 2005-12-19 18:04:02 UTC
Should the leaf attribute be set in

j2eeserver/.../AddServerInstanceAction.java,
j2eeserver/.../ServersCustomizer.java

I would rather see the right fix applied to resolve this, rather than a hack...
Comment 15 Lukas Jungmann 2005-12-21 10:31:14 UTC
well, issue #70334 is fixed so this one is not so important for 5.0. I would
prefer to see the correct fix in j2eeserver too...

BTW: the "fix" for this works fine
Comment 16 Sherold Dev 2006-01-02 14:40:41 UTC
IMO, the current error handling is not very good from the user perspective. The
user should not be allowed to press the finish button, if the specified domain
is already registered. The current behaviour does not even allow to correct the
domain selection, the user has to go through the whole wizard from the start again.

Look at how this is done for example in the Tomcat wizard.
Comment 17 Lukas Jungmann 2006-08-07 10:30:38 UTC
v.