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 81422 - Cannot register 2 different servers
Summary: Cannot register 2 different servers
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
: 81409 81436 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-07-29 20:16 UTC by Lukas Jungmann
Modified: 2006-08-09 10:26 UTC (History)
2 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 2006-07-29 20:16:05 UTC
-fresh build, new userdir
-register latest build of glassfish-v1ur1 in the IDE (asroot=/space/java/glassfish)

=> OK

-register latest build of glassfish-v2 in the IDE (asroot=/space/java/glassfish-v2)

=> after finishing wizard nothing happens - no exception, nothing in log, no new
server is visible in runtime tab, no new entry in
$NB_USERDIR/config/J2EE/InstaledServers/.nbattrs
Comment 1 Vince Kraemer 2006-07-30 18:29:45 UTC
*** Issue 81409 has been marked as a duplicate of this issue. ***
Comment 2 Vince Kraemer 2006-07-30 18:31:06 UTC
The error message that you are registering a domain that appears to be
registered has gotten botched up. Should be easy to resolve.
Comment 3 _ ludo 2006-07-30 22:35:22 UTC
see also http://www.netbeans.org/issues/show_bug.cgi?id=81436
Maybe linked?
Comment 4 Vince Kraemer 2006-07-31 03:06:07 UTC
*** Issue 81436 has been marked as a duplicate of this issue. ***
Comment 5 Vince Kraemer 2006-07-31 04:22:09 UTC
this is tougher than I thought.  The message should be displayed.  When I step
through the code, the duplication is detected and the message is created...

But the DialogDisplayer.notify doesn't open up the message...

I am baffled. needs more investigation.
Comment 6 Martin Schovanek 2006-07-31 17:19:26 UTC
On my machine (Mac OS X) a message dialog flashes but it is immediately closed
together with wizard panel.
Comment 7 Vince Kraemer 2006-07-31 19:31:47 UTC
and today the dup is being reported "correctly"???
Comment 8 Vince Kraemer 2006-08-01 18:20:20 UTC
Checking in Util.java;
/cvs/serverplugins/sun/appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/ui/Util.java,v
 <--  Util.java
new revision: 1.1.16.3.2.2; previous revision: 1.1.16.3.2.1
done
Checking in AddDomainWizardIterator.java;
/cvs/serverplugins/sun/appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/ui/AddDomainWizardIterator.java,v
 <--  AddDomainWizardIterator.java
new revision: 1.2.2.3.2.10; previous revision: 1.2.2.3.2.9
Comment 9 Lukas Jungmann 2006-08-01 19:47:34 UTC
glassfish-v1u1 and glassfish-v2 are treated as same? they are not different
versions? That would be a news for me...

As I wrote in my bug report:
1st server location is: /space/java/glassfish
2nd server location is: /space/java/glassfish-v2

so reopening because original issue is not fixed yet.

Current changes seems to me like another fix for already fixed (but not verified
yet :( ) issue 70335
Comment 10 Vince Kraemer 2006-08-03 01:57:01 UTC
Supporting this opens the door to a bunch of server startup issues....

Need to extend StartSunServer to fail fast when you try to start a server that
has port conflicts with currently running server.  Need to be able to track
multiple servers running at the same time from the IDE.

Also: how do we know which server is running if the port is occupied when the
IDE starts up???

Ludo: comments and suggestions...
Comment 11 _ ludo 2006-08-03 02:03:51 UTC
I am not sure what changed: this used to work.
I can register at the same time AS8.1pe, 8.2pe, 8.2 EE, 9.0PE GF, all with the
same port and as a user, I know that only one can run at a time which is fine.
If I try to start a new one, there is a start failure detected after a while, so
I guess either there is a regression, or there is no bug...

Vince: did you change some logic in this area recently?
If asroot=/space/java/glassfish
and
(asroot=/space/java/glassfish-v2)
and another other 8.x EE/PE cannot be registered in the same IDE with the same
port number, I need to understand where the regression is.
On my XP box, I have 8.2 EE,  GFB48, and AS9.0 from Beta2 installer all
registered in my IDE. All have port 8080.

Comment 12 _ ludo 2006-08-03 02:06:27 UTC
here is one of my .nbattr:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE attributes PUBLIC "-//NetBeans//DTD DefaultAttributes 1.0//EN"
"http://www.netbeans.org/dtds/attributes-1_0.dtd">
<attributes version="1.0">
    <fileobject name="instance">
        <attr name="DOMAIN" stringvalue="domain1"/>
        <attr name="LOCATION" stringvalue="C:\Sun\AppServerb48\domains"/>
        <attr name="PROP_INSTANCE_ID" stringvalue="sjsas8"/>
        <attr name="displayName" stringvalue="Sun Java System Application Server"/>
        <attr name="httpportnumber" stringvalue="8080"/>
        <attr name="password" stringvalue="adminadmin"/>
        <attr name="url"
stringvalue="[C:\Sun\AppServerb48]deployer:Sun:AppServer::localhost:4848"/>
        <attr name="username" stringvalue="admin"/>
    </fileobject>
    <fileobject name="instance_1">
        <attr name="deploy-dir" stringvalue="C:\Program
Files\jboss-4.0.4.GA\server\default\deploy"/>
        <attr name="displayName" stringvalue="JBoss Application Server 4"/>
        <attr name="host" stringvalue="localhost"/>
        <attr name="password" stringvalue=""/>
        <attr name="port" stringvalue="8080"/>
        <attr name="root-dir" stringvalue="C:\Program Files\jboss-4.0.4.GA"/>
        <attr name="server" stringvalue="default"/>
        <attr name="server-dir" stringvalue="C:\Program
Files\jboss-4.0.4.GA\server\default"/>
        <attr name="url"
stringvalue="jboss-deployer:localhost:8080#default&amp;C:\Program
Files\jboss-4.0.4.GA"/>
        <attr name="username" stringvalue=""/>
    </fileobject>
    <fileobject name="instance_2">
        <attr name="DOMAIN" stringvalue="domain1"/>
        <attr name="LOCATION" stringvalue="C:\Sun\AppServer82ee\domains"/>
        <attr name="PROP_INSTANCE_ID" stringvalue="sjsas8_1"/>
        <attr name="displayName" stringvalue="82ee"/>
        <attr name="httpportnumber" stringvalue="8080"/>
        <attr name="password" stringvalue="adminadmin"/>
        <attr name="url"
stringvalue="[C:\Sun\AppServer82ee]deployer:Sun:AppServer::localhost:4849"/>
        <attr name="username" stringvalue="admin"/>
    </fileobject>
    <fileobject name="instance_3">
        <attr name="DOMAIN" stringvalue="domain1"/>
        <attr name="LOCATION" stringvalue="C:\Sun\AppServer955beta2\domains"/>
        <attr name="displayName" stringvalue="Sun Java System Application Server
9"/>
        <attr name="httpportnumber" stringvalue="8080"/>
        <attr name="password" stringvalue="adminadmin"/>
        <attr name="url"
stringvalue="[C:\Sun\AppServer955beta2]deployer:Sun:AppServer::localhost:4848"/>
        <attr name="username" stringvalue="admin"/>
    </fileobject>
</attributes>
Comment 13 _ ludo 2006-08-03 02:22:09 UTC
Regarding " how do we know which server is running if the port is occupied when
the IDE starts up???"

there is extra logic is the isrunning api to check for a given port (4848) to
query the admin server which location it is installed on, so that we can double
check that from the DM location field we have. This way, to be running, the
getTargets() needs to work *and* the location known by the IDE and the admin
server must be the same.

Comment 14 Vince Kraemer 2006-08-03 05:52:09 UTC
fair enough... I probably introduced a regression when I tried to get some of
the code to pass getting PMD'd.

I will take another look at it.

Comment 15 Vince Kraemer 2006-08-06 15:45:16 UTC
testing fix.
Comment 17 Lukas Jungmann 2006-08-09 10:26:14 UTC
v.