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 57854 - anttask Deploy needs to check if it gets a ServerDebugInfo
Summary: anttask Deploy needs to check if it gets a ServerDebugInfo
Status: CLOSED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ ludo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-13 22:28 UTC by Marco Walther
Modified: 2006-03-24 12:50 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 Marco Walther 2005-04-13 22:28:06 UTC
There are enough cases where Deploy might see a ServerDebugInfo == null.  And 
it currently can not handle that case. The following diff shows the problem: 
 
--- 
j2eeserver-netbeans_release41-BLD200504050818/ant/antsrc/org/netbeans/modules/j2ee/ant/Deploy.java  
2005-02-16 08:14:00.000000000 -0800 
+++ j2eeserver/ant/antsrc/org/netbeans/modules/j2ee/ant/Deploy.java     
2005-04-13 14:11:50.610159880 -0700 
@@ -65,6 +80,8 @@ 
             } 
 
             ServerDebugInfo sdi = jmp.getServerDebugInfo (); 
+ 
+            if (sdi != null) { 
             String h = sdi.getHost(); 
             String transport = sdi.getTransport(); 
             String address = ""; //NOI18N 
@@ -78,7 +95,7 @@ 
             getProject().setProperty("jpda.transport", transport); 
             getProject().setProperty("jpda.host", h); 
             getProject().setProperty("jpda.address", address); 
- 
+            } // end of if (sdi != null) 
         } catch (Exception ex) { 
             throw new BuildException(ex); 
         }
Comment 1 _ ludo 2005-04-13 22:59:54 UTC
Is not it creator only centric?
I'v seen this behaviour from time to time, but after changes in other area, I
cannot see this anymore in 4.1 bits at all...
Can you attach a scenario where you can reproduce this in NetBeans 4.1 itself?
I guess Creator plugin is not uptodate with AS 8.1 plugin which is in 4.1

Comment 2 Marco Walther 2005-04-13 23:13:19 UTC
J2eeModuleProvider can return null.  And that's reason enough to handle it 
down the line;-) 
 
From 
j2eeserver-netbeans_release41-BLD200504050818/src/org/netbeans/modules/j2ee/deployment/devmodules/spi/J2eeModuleProvider.java 
 
-------------------------------------------- 
    public final ServerDebugInfo getServerDebugInfo () { 
        ServerInstance si = ServerRegistry.getInstance ().getServerInstance 
(getServerInstanceID ()); 
        StartServer ss = si.getStartServer(); 
        if (ss == null) { 
            return null; 
        } 
.... 
 
Thanks, 
-- Marco 
 
 
Comment 3 _ ludo 2005-04-13 23:59:58 UTC
I fixed it in the trunk.
It is a safe fix anyway.
Will start the process for 4.1 integration.
Comment 4 _ ludo 2005-04-14 00:00:48 UTC
41_HR_FIX
Comment 5 _ ludo 2005-04-15 01:22:02 UTC
When approved, can someone from Prague integrate this in the 4.1 branch?
Comment 6 Sherold Dev 2005-04-15 08:17:38 UTC
Fix looks OK, I will integrate it.
Comment 7 Jaroslav Pospisil 2005-04-15 13:04:06 UTC
No regressions found in build 200504141800. QE agrees with release41 branch
integration.
Comment 8 Sherold Dev 2005-04-15 13:35:30 UTC
Fix integrated to release41 branch.
Comment 9 zikmund 2005-07-12 16:29:52 UTC
v