Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342959

Summary: One runtime with invalid server path prevents creation of new servers
Product: [WebTools] WTP ServerTools Reporter: Patric Rufflar <patric>
Component: wst.serverAssignee: Angel Vera <arvera>
Status: CLOSED INVALID QA Contact: Angel Vera <arvera>
Severity: minor    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Patric Rufflar CLA 2011-04-15 08:09:18 EDT
Build Identifier: 3.2.3

Imagine WTP configured with 5 server runtimes.
A path to one of them will become invalid.

It's now impossible to create new servers, WTP will fail with exception:

org.eclipse.core.runtime.CoreException: Could not load the Tomcat server configuration at C:\servers\apache-tomcat-5.5.25\conf. The configuration may be corrupt or incomplete.
 at org.eclipse.jst.server.tomcat.core.internal.Tomcat55Configuration.load(Tomcat55Configuration.java:284)
 at org.eclipse.jst.server.tomcat.core.internal.Tomcat55Configuration.importFromPath(Tomcat55Configuration.java:292)
 at org.eclipse.jst.server.tomcat.core.internal.TomcatServer.importRuntimeConfiguration(TomcatServer.java:175)
 at org.eclipse.wst.server.core.internal.ServerWorkingCopy.importRuntimeConfiguration(ServerWorkingCopy.java:784)
 at org.eclipse.wst.server.core.internal.ServerType.createServer(ServerType.java:195)
 at org.eclipse.wst.server.ui.internal.wizard.page.ServerCreationCache.createServer(ServerCreationCache.java:58)
 at org.eclipse.wst.server.ui.internal.wizard.page.NewManualServerComposite.loadServerImpl(NewManualServerComposite.java:451)
 at org.eclipse.wst.server.ui.internal.wizard.page.NewManualServerComposite.handleTypeSelection(NewManualServerComposite.java:654)
 at org.eclipse.wst.server.ui.internal.wizard.page.NewManualServerComposite$1.serverTypeSelected(NewManualServerComposite.java:162)
 at org.eclipse.wst.server.ui.internal.viewers.ServerTypeComposite$2.selectionChanged(ServerTypeComposite.java:89)
 at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
 at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
 at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
 at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
 at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2162)
 at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1699)
 at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1139)
 at org.eclipse.wst.server.ui.internal.viewers.ServerTypeComposite$3$1.run(ServerTypeComposite.java:111)
 at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
 at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
 at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
 at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
 at org.eclipse.jface.window.Window.open(Window.java:801)
 at org.eclipse.wst.server.ui.internal.actions.RunOnServerActionDelegate.getServer(RunOnServerActionDelegate.java:119)
 at org.eclipse.wst.server.ui.internal.actions.RunOnServerActionDelegate.run(RunOnServerActionDelegate.java:255)
 at org.eclipse.wst.server.ui.internal.actions.RunOnServerActionDelegate.run(RunOnServerActionDelegate.java:689)
 at org.eclipse.wst.server.ui.internal.ServerLaunchShortcut.launch(ServerLaunchShortcut.java:41)
 at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:434)
 at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.run(LaunchShortcutAction.java:73)
 at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runWithEvent(LaunchShortcutAction.java:121)
 at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
 at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
 at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
 at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
 at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
 at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
 at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
 at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
 at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
 at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
 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:597)
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
Caused by: java.io.FileNotFoundException: C:\IDE-new\apache-tomcat-5.5.25\conf\catalina.policy (Das System kann den angegebenen Pfad nicht finden)
 at java.io.FileInputStream.open(Native Method)
 at java.io.FileInputStream.<init>(FileInputStream.java:106)
 at org.eclipse.jst.server.tomcat.core.internal.Tomcat55Configuration.load(Tomcat55Configuration.java:242)
 ... 58 more


Reproducible: Always

Steps to Reproduce:
1. create a regular server runtime 
2. delete path to application server
3. try to create a server
Comment 1 Patric Rufflar CLA 2011-04-15 08:28:14 EDT
Sometimes, there's an additional reason provided by this exception:

CoreException calling delegate importConfiguration()
ServerWorkingCopy Apache Tomcat v5.5 - trunk at localhost"
Comment 2 Angel Vera CLA 2011-04-15 09:45:06 EDT
Hi Patric, This is an error scenario the path of the runtime was deleted, an error is meant to occur. Perhaps you need explain us how do you expect this situation can be improved?
Comment 3 Patric Rufflar CLA 2011-04-15 10:10:27 EDT
Hi Angel,

a team member showed the behavior to me and I thought that one runtime with an invalid path stops WTP from creating a new server of _any_ runtime.

I did now a retest of this bug and I have to admin that everything works as expected on my machine, I can create new servers of other, non-deleted, runtimes.

Sorry for this.

=> Closing the bug report.