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.
Here is the relevant email exchanges with Ludo's team on this issue. ------------------ Parsing domain.xml for local scenario can be done. But I won't be able to get to it this week. Maybe on Monday. Nitya ludo wrote: > Peter Liu wrote: > >> Hi Nitya, >> >> Any solution to this issue? Thanks. > > > Well, we cannot know this value until the server is started.... > Even if we have a different default value, we would still be wrong is the server is installed with different ports... > Maybe Nitya could (only for the the local install) calculate the real value by reading the domain.xml instead od querying the running server, but I am not sure this can be done for Beta. Nitya? > > Ludo > >> >> Peter >> >> Srividhya Narayanan wrote: >> >>> Hi Nitya, >>> >>> Peter Liu from my team has identified the cause for the InstanceProvider issue I raised on not returning the HTTP_PORT_NUMBER. Can you please tell us how to initialize the port setting code? >>> >>> Thanks, >>> - Vidhya >>> >>> >>> ------------------------------------------------------------------------ >>> >>> Subject: >>> Re: endpoint url issue >>> From: >>> Peter Liu <Peter.Liu@Sun.COM> >>> Date: >>> Tue, 25 Apr 2006 15:58:12 -0700 >>> To: >>> Srividhya Narayanan <Srividhya.Narayanan@Sun.COM> >>> >>> To: >>> Srividhya Narayanan <Srividhya.Narayanan@Sun.COM> >>> >>> >>> One more thing, once the http port is initialized to 8080, it will remain 8080 across sessions. >>> It's really just the very first time you install the server, the port is set to 4848. >>> >>> Peter >>> >>> Peter Liu wrote: >>> >>>> Vidhya, >>>> >>>> I figured out why we are getting 4848 and sometimes 8080. What's happening >>>> is that the deployment port (8080) doesn't get initialized until the IDE detects >>>> that the server is running. The following is the stacktrace showing the thread that >>>> does this. >>>> at org.netbeans.modules.j2ee.deployment.impl.InstancePropertiesImpl.setProperty(InstancePropertiesImpl.java:88) >>>> at org.netbeans.modules.j2ee.sun.ide.j2ee.DeploymentManagerProperties.setHttpPortNumber(DeploymentManagerProperties.java:271) >>>> at org.netbeans.modules.j2ee.sun.ide.j2ee.StartSunServer.isRunning(StartSunServer.java:606) >>>> at org.netbeans.modules.j2ee.deployment.impl.ServerInstance$3.run(ServerInstance.java:498) >>>> at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493) >>>> at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926) >>>> >>>> So far, I noticed that the thread gets invoked when you open up the server node. >>>> This means that if you don't open up the server node, the port number will be 4848. >>>> If you do, it will be 8080. Now the question is how to trigger the initialization >>>> code. Could you ask the NB engineer that you've been talking to see if there is a way >>>> to trigger this programmatically? >>>> >>>> Peter
Radko, I believe we encountered the issue with port 4848 before, in the web service client area, correct? Do you know how it was addressed? We may want to see whether the same approach could be used here as well. Thanks.
You probably mean issue 75231, if so then it was fixed by Milan, see [URL] for diff.
This has nothing to do with invoking it via websvc/core.. This is when I use the InstanceProperties in J2eModuleProvider. Seems like the other bug is for a different issue. Nitya in the email conversation enclosed has the complete context of what needs to be changed.
Can you tell if you want this info only when the server is running, or also when the server is not running or has not ran at all. This is important for the best fix.
Ludo, yes we need this info when the server is running, not running or has never been ran. Thanks.
> You probably mean issue 75231 No, what I meant is issue 73638.
Issue #73638 was fixed by Milan. It is implemented in org.netbeans.modules.websvc.core.jaxws.nodes.JaxWsNode.getWsdlURL()
I am looking at the code, and I cannot find how the default value can be ever set to 4848. It is defaulted to 8080 if not known... Can you confirmed you've seen a 4848 value? The code I see cannot do that, so I am puzzled.
We are looking for server port using the following : J2eeModuleProvider provider = (J2eeModuleProvider)project.getLookup().lookup(J2eeModuleProvider.class); InstanceProperties instanceProperties = provider.getInstanceProperties(); // getting port String portNumber = instanceProperties.getProperty(InstanceProperties.HTTP_PORT_NUMBER); if(portNumber == null || portNumber.equals("")) { portNumber = "8080"; //NOI18N } If instanceProperties.getProperty(InstanceProperties.HTTP_PORT_NUMBER) returns null the port is set to 8080.
It looks like this issue has already been fixed. It's no longer reproducible. Please close this bug.
Ok, marking as FIXED.