Community
Participate
Working Groups
Driver: WTP 3.0 11/29 driver. I created 2 dynamic Web projects (a1 and a1Client) and published to Tomcat 5.5. Then I created 2 other dynamic Web projects (a2a and a2aClient) and tried to publish them to Tomcat 5.5. The Web project "a2a" published OK but when I tried to publish "a2aClient", I got: Could not publish server configuration for Tomcat v5.5 Server at localhost. Multiple Contexts have a path of "". I checked the server view and all 4 Web projects have been added to Tomcat properly. Server state is "Restart & republish". I tried to republish manually and restarting server and it still failed with the same error. I had to remove "a2aClient" and then the server would restart OK. Once I tried adding back "a2aClient", it would fail again. I have the workspace where this problem happens.
Kathy, Could you provide what the Context Root setting is for each of these projects as indicated on the Web Project Settings page of project properties? Thanks. Larry
I isolated the problem a bit more and it's actually a problem with programmatically created dynamic Web project having context root set to "". In the Web services wizard, we create a project using: ProjectFacetsManager.create() and then add the jst.web and the jst.java facets to the project using: Set actions = getInstallActions(projectFacetVersions); fproject.modify(actions, shellMonitor); Starting with WTP 3.0 M3, the dynamic Web project that's created by the Web service project programmatically all have context root set to "". This is the cause of the problem when trying to publish to Tomcat. I re-tried the same scenario in WTP 2.0.2. The context root of dynamic Web project created programmatically is properly set to the name of the dynamic Web project.
Since we do some similar project creation at SAS, I took a look at this last night. It appears that the fix for Bug 209268 changed the wst.common.modulecore plugin.xml in a way that broke org.eclipse.wst.common.project.facet.core.internal.FacetedProject. In FacetedProject.modifyInternal(), it attempts to adapt the config object to an org.eclipse.wst.common.project.facet.core.IActionConfig, which due to the plugin.xml change, now returns null. This prevents the project name property from being set on the model, and since that is used as the backup value for the "context-root" property, the "context-root" property returns "".
Larry, Thanks for looking into this. I think I know what might be root of the problem here. Once I have a fix, what's the easiest way to see if it works?
I have a development environment in which I can try out changes, either as patches or modified jars. You can attach to this bug or e-mail me directly. Thanks. Larry
Konstantin, You can easily try it out with a WTP 3.0 driver as well. In a new workspace, 1. Install a Tomcat runtime. 2. Select Web services -> Web service client. 3. In the Web service client wizard, select a WSDL file using in the workspace using Browse or paste the following URL in the service definition field: http://developerdays.com/cgi-bin/tempconverter.exe/wsdl/ITempConverter 4. Click Finish. It would generate a new dynamic Web projecdt named "WebServiceProject". Just check the context root of that project. If you have other Web project in the workspace, just click the Client project link to type in a name for a non-existing Web project. The wizard will create it for you.
I have a fix that passes Kathy's test in Comment #6 and will release it shortly.
*** Bug 211896 has been marked as a duplicate of this bug. ***
Fix released into the 3.0 code stream.
Thanks Kathy. I was being dense about how to test. I was using a web project with a bean and creating a web service and client from that bean. Using the I20071205140343 WTP build, I have verified that the client project is created with the proper context-root. I'll leave official verification to Kathy.
Verified on 1206 WTP 3.0 driver.
Closing bug. Thanks Konstantin.