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.
Summary: | Installed Glassfish domain is not used | ||
---|---|---|---|
Product: | serverplugins | Reporter: | esmithbss <esmithbss> |
Component: | Sun Appserver 9 | Assignee: | Vince Kraemer <vkraemer> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | CC: | mkuchtiak |
Priority: | P4 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
esmithbss
2007-12-04 18:03:07 UTC
This is particularly troublesome when developing web services since the WSDL being generated contains a hard-coded URL based on the port number of the server. If the service is created against a Glassfish domain on port 10047 instead of port 8080 then upod deployment, the WSDL appears to automatically refer to the wrong location. (I just spent an hour searching for the web services I just deployed before I realized it was on a different port). When the IDE or GF is installed by root, the default domains end up belonging to root. We create a personal domain for users in that case, so they have the ability to control the domain without being root. There are a couple work-arounds that you could probably apply for your situation: 1. register the default domain as a remote domain. OR 2. create a personal domain that uses the default ports, via the registration wizard. This may lead to the question: why doesn't the IDE use work-around 2 by default? the answer is pretty simple. the guy that wrote the plugin cannot tell whether you have installed NetBeans onto a laptop or a server capable of hosting 100's of IDE users. He cannot write code that will be able to make the correct guess on this question either. Do you have any other suggested strategies for this? it sounds like this is really a web service development and deployment issue... not a server plugin issue. The server plugin doesn't create the wsdl does it? The user can create a custom domain that uses the "default" ports safely via the create presonal domain option if they need/want to resolve this issue safely. reassigned to wrong component... try again In WS development there are 2 cases : 1. WS is created from Java Code GlassFish generates WSDL during the deployment. WSDL: wsdlPort -> address is generated based on the port GlassFish is running on, e.g. : <wsdl:service name="CalculatorService"> <wsdl:port name="Calculator" binding="tns:CalculatorSoapBinding"> <soap:address location="http://localhost:8080/WebApplication1/CalculatorService"/> </wsdl:port> </wsdl:service> 2. WS is generated from WSDL file. GlassFish takes the existing wsdl file but replaces the wsdlPort -> address with new address, based on the port wsdl is running on : Example : Original WSDL : <wsdl:service name="CalculatorService"> <wsdl:port name="Calculator" binding="tns:CalculatorSoapBinding"> <soap:address location="whatever"/> </wsdl:port> </wsdl:service> Modified WSDL (by GlassFish) : <wsdl:service name="CalculatorService"> <wsdl:port name="Calculator" binding="tns:CalculatorSoapBinding"> <soap:address location="http://localhost:8080/WebApplication1/CalculatorService""/> </wsdl:port> </wsdl:service> The conclusion is that Netbeans WS Support relies on GlassFish JAX-WS plugin to generate/modify wsdl correctly. We cannot do much with that. You are closer on a solution in the first section when you discuss the problem in terms of who owns the domain. But the question that should be asked is why does it matter that the domain is owned by root? If I have a Glassfish domain installed on server A and am developing on workstation B, then what operations will I need to perform against the domain and what privileges do I need to have to perform these privileges? Since the only operations I can think of that need command line root authentication are starting and stopping the server you could test during installation whether NB and GF are being installed as root and if so, flag it in the profile to: a) ask the user if they want to create/install a private domain, b) ask the user for root authentication data when performing root operations. c) provide a command string for the user to manually launch GF with the proper parameters. or you could do d) During installation, ask the user which user they want to install GF as/for. Should they install it for everyone, in which case it would be installed as root, or should they install it only for themselves? It may seem counterintuitive, but on a notebook running Linux, many users would rather install applications as root, but install dynamic components like the GF domain as a specific user. While I know that one of the goals of NB is to have the cleanest and easiest to use interfaces for developers, there are inherent problems with firewalls, network configurations, etc..., and significant confusion when multiple domains are installed on some machines. Particularly when the developer is using the information from the installer to determine which instance needs to be set up as a service. With this info, I would think this would actually boil down to an installer issue instead of a GF or JAX-WS issue. I will take another look at this there really isn't a good fix for this that works for all people all the time. The user is free to create a personal domain and assign it to the "default ports"... thus overriding the decision to create and register a domain for them automatically. I'm sorry, but the last comment doesn't make much sense. When NB + GF is installed, it creates a domain. Period. If a domain is already available, there is no way to hook up the existing domain as the domain to use during installation. This is a problem if there is a desire to develop SOA systems, etc... where the component relies on a GF instance to exist on the box. Assume I have Glassfish V2-UR2 downloaded from glassfish.dev.java.net, installed on my machine, and set to start when I boot up. This is where I've been developing web services with JDeveloper, Eclipse, JBuilder, etc... Now I want to switch to NetBeans. I download the version I need to develop SOA systems and go to install it. In order for me to install the SOA components for development, I need to install Glassfish. I already have GF installed, but the IDE requires me to install a new instance. Not only that, but it requires me to create a second domain on my box and doesn't (during installation) allow me to reuse the existing domain or installed version of Glassfish. Now when I develop (assuming I didn't catch the port changes in the installation form) I believe I'm using the original GF domain and go to deploy my web services. Everything appears to work well until I login to my known domain on port 4848 and find that the web services that I'm running don't exist. I believe what is needed is a mechanism in the installation that tests for an existing Glassfish instance on the machine. If one is found, is found to be compatible, and (if it's owned by root) authentication is provided that allows accesss, the choice is given to the installer to use the existing instance. If it is not chosen, then a new instance can be installed. NetBeans.org Migration: changing resolution from LATER to WONTFIX |