| Summary: | org.eclipse.wst.server.core.internal.ServerWorkingCopy.save(...) unexpectedly set the Server's modules array to null | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP ServerTools | Reporter: | Raymond Lai <rkklai> | ||||||||
| Component: | wst.server | Assignee: | wst.server <wst.server-inbox> | ||||||||
| Status: | NEW --- | QA Contact: | Angel Vera <arvera> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | rbondi | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Raymond Lai
Created attachment 248261 [details]
Full stacktrace of NPE from log
Created attachment 248262 [details]
org.eclipse.wst.server.core.prefs before restarting eclipse
This is .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs once a Tomcat 7 server runtime has been selected in Eclipse.
Created attachment 248263 [details]
org.eclipse.wst.server.core.prefs
This is .plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs after restarting Eclipse. The tomcat 7 information is now gone.
Using: * Eclipse Java Web Developer Tools 3.6.1.v201409111852 org.eclipse.jst.web_ui.feature.feature.group Eclipse Web Tools Platform * Eclipse Luna SR1 (4.4.1) Build id: v20141016-0854-gg6 To reproduce: ------------- * In Eclipse, create two or more Servers via the Servers View (Right-click > New > Server, etc), with any webapp(s). Choose Tomcat 7 as your server runtime environment. It doesn't matter whether your servers use the same or a different one to reproduce this bug. * Restart Eclipse. Expected result: ---------------- Both servers still exist as before, unchanged. Actual result: -------------- One or more of the servers will have lost its "Runtime Environment". The "Runtime Environment" link is inactive. Furthermore: * If you click the Modules tab and remove the webapp you added, then attempt to save this change, you get a NullPointerException dialog. In the .log file is this exception (full stacktrace is attached): java.lang.NullPointerException at org.eclipse.jst.server.tomcat.ui.internal.editor.ServerLocationEditorSection.getSaveStatus(ServerLocationEditorSection.java:534) Workaround ---------- * Don't attempt to remove the webapp as above. * Window > Preferences > Server > Runtime Environment * Click Add... * Add a tomcat 7 runtime environment (choose Apache > Apache Tomcat v7.0, Finish" * Click OK to exit Preferences * In Servers view, double-click a server that is missing a "Runtime Environment" * Its "Runtime Environment" menu now contains the runtime you just added: select it. * Repeat for each server without a "Runtime Environment" * File > Save All Notes: ------ What is happening when you restart Eclipse is that the .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs file is being overwritten, losing all the config information in it. (Astonishingly, chmod-ing it to read only, even changing the owner, doesn't work: Eclipse just makes it writable again by the user and overwrites it!) Two files are attached: a org.eclipse.wst.server.core.prefs before and after an Eclipse restart. |