Bug 184296 - [package explorer] Duplicate dynamic Web project created programmatically
Summary: [package explorer] Duplicate dynamic Web project created programmatically
Status: CLOSED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.3 RC1   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 183409 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-26 14:19 EDT by Kathy Chan CLA
Modified: 2019-11-12 08:54 EST (History)
4 users (show)

See Also:
benno.baumgartner: review+


Attachments
proposed patch (3.91 KB, patch)
2007-05-08 07:11 EDT, Martin Aeschlimann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Chan CLA 2007-04-26 14:19:49 EDT
Driver:  WTP 2.0 04261031

When using the Web services wizard to programmatically create a dynamic Web project (say "bu1Client"), 2 projects with the same name got created.  The contents of the projects are:

bu1Client
- build
- src
- WebContent

bu1Client
- src
- Web App Library
- JRE System Library
- Apache Tomcat v5.5
- build
- WebContent

If I close and open the projects, the duplicate project disappears.  The same goes for closing and reopening the workspace.

To reproduce the problem, just go through a Web service scenario with client slider set to TEST with a non-existing client project.
Comment 1 Carl Anderson CLA 2007-04-26 16:04:59 EDT
This appears to only happen in the Java perspective.  The J2EE perspective, Resource perspective, and contents on disk all appear correct.  I would suspect that this is a base JDT problem.
Comment 2 Kathy Chan CLA 2007-05-01 14:15:58 EDT
Any news on this defect?  If you really think that it's a JDT problem, please reroute accordingly.  This is a regression from WTP 2.0 M6.
Comment 3 Chuck Bridgham CLA 2007-05-02 17:25:11 EDT
This appears to be a JDT problem- it only happens in the Java perspective's
Package view.  Carl ran the first smoke test from:
http://wiki.eclipse.org/index.php/Web_Servcies_Smoke_Test_Scenarios

Are there any recent changes in the Package view that might account for the
appearance of two versions of the same Project?  (One that is stale, the other
is up to date.)
Comment 4 Martin Aeschlimann CLA 2007-05-03 04:08:28 EDT
Benno, can you investigate?
Comment 5 Kathy Chan CLA 2007-05-03 13:11:27 EDT
Chuck, could this have been a project refresh issue with project creation?  I have the same problem with Java Utility projects created programmatically as well.
Comment 6 Kathy Chan CLA 2007-05-03 16:26:49 EDT
This was not a problem with the 04/12 WTP 2.0 driver.  It only starts to show up for the 04/26 WTP 2.0 driver.  This happens on the main path for Web services scenarios when the wizard creates a project for the user.
Comment 7 Benno Baumgartner CLA 2007-05-04 05:53:24 EDT
I'm sorry but I'm not able to download your integration built. Clicking on the I200704261031 link on your download page leads to:

Fatal error: Call to undefined function: simplexml_load_file() in /home/www/webtools/downloads/drops/R2.0/I-I200704261031-200704261031/index.php on line 28
Comment 8 John Lanuti CLA 2007-05-04 09:41:04 EDT
Try again, the link works fine for me.  You can also try this week's integration driver:

http://download.eclipse.org/webtools/downloads/drops/R2.0/I-I200705031628-200705031628/
Comment 9 Benno Baumgartner CLA 2007-05-04 10:00:26 EDT
(In reply to comment #8)
> Try again, the link works fine for me.  You can also try this week's
> integration driver:
> 
> http://download.eclipse.org/webtools/downloads/drops/R2.0/I-I200705031628-200705031628/
> 

Thanks, I was able to download it (seams to be a problem with the mirror we use to download from eclipse.org)
Comment 10 Benno Baumgartner CLA 2007-05-07 05:17:20 EDT
I can not reproduce this. When I click finish on the Web Service Wizard I get the exception below. I'm using Tomcat 6.0.10.

But then I'm not sure if I need to create a web service at all, comment #0 says it is when creating a dynamic web project first (resulting in only one project on my side), then you say I need to set the client slider to TEST, which I can only do on the web service wizard... Please, provide exact steps to reproduce the problem.

Processing file C:\e\workspaces\smallws\ConverterProj\WebContent\WEB-INF\ConverterService\wtp\deploy.wsdd
axis-admin failed with  {http://xml.apache.org/axis/}HTTP (404)/ConverterProj/services/AdminService
	at org.apache.axis.tools.ant.axis.AdminClientTask.logOrThrow(AdminClientTask.java:379)
	at org.apache.axis.tools.ant.axis.AdminClientTask.executeInCurrentVM(AdminClientTask.java:365)
	at org.apache.axis.tools.ant.axis.AdminClientTask.execute(AdminClientTask.java:316)
	at org.eclipse.jst.ws.internal.axis.consumption.core.command.AxisDeployCommand.executeAntTask(AxisDeployCommand.java:109)
	at org.eclipse.jst.ws.internal.axis.consumption.core.command.AxisDeployCommand.execute(AxisDeployCommand.java:70)
	at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:418)
	at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:358)
	at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:253)
	at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$5.run(SimpleCommandEngineManager.java:252)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
	at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:222)
	at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:96)
	at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.performFinish(WizardPageManager.java:255)
	at org.eclipse.wst.command.internal.env.ui.widgets.DynamicWizard.performFinish(DynamicWizard.java:332)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3673)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:182)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3673)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2365)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2329)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:497)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:436)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1162)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1137)
Comment 11 Kathy Chan CLA 2007-05-07 10:01:23 EDT
In the Java perspective, please follow instructions at:

http://www.eclipse.org/webtools/jst/components/ws/1.5/tutorials/BottomUpWebService/BottomUpWebService.html

Use Tomcat 5.0 or 5.5 (as we are finding problem with Tomat 6.0).  After you click Finish on the first page, you'll notice that there's 2 ConverterProjClient project in the Java Perspective.

Please let me know if you have any problem reproducing the problem.
Comment 12 Benno Baumgartner CLA 2007-05-08 06:22:49 EDT
Thanks, I'm now able to reproduce the problem.
Comment 13 Martin Aeschlimann CLA 2007-05-08 07:11:32 EDT
Created attachment 66271 [details]
proposed patch
Comment 14 Martin Aeschlimann CLA 2007-05-08 07:14:02 EDT
Benno, please review. The patch also fixes the missing Javadoc warnings.

To test have a look at 'AddJavaNatureAction' in the jdt.ui.tests examples package.
Comment 15 Benno Baumgartner CLA 2007-05-08 07:31:07 EDT
Not sure if it matters, but with your change handleAffectedChildren is not executed anymore when adding a java project. I guess there are no affected children in this case?
Besides that, patch looks good, and also fixes this bug. 
+1 for RC1
Comment 16 Martin Aeschlimann CLA 2007-05-08 08:14:26 EDT
Yes, handleAffectedChildren isn't necessary for an add.

patch released > 20070508
Comment 17 Benno Baumgartner CLA 2007-05-16 09:39:22 EDT
verified in I20070516-0010
Comment 18 John Lanuti CLA 2007-09-10 13:48:09 EDT
Closing.
Comment 19 Stephan Herrmann CLA 2019-11-12 08:54:37 EST
*** Bug 183409 has been marked as a duplicate of this bug. ***