Troubleshooting: Publishing application fails during workspace setup

During workspace setup, an error is encountered when publishing the application, which results in a BUILD FAILURE status in WCDE_installdir\logs\setup.log.

Problem

The following log snippet shows an example of the sort of error you might see:
configureServer:
[createServer] Server created: WebSphere Commerce Test Server
[deleteServer] Server does not exist: WebSphere Application Server v6.0
[deleteServer] Server does not exist: WebSphere Application Server v6.1
[deleteServer] Server does not exist: WebSphere Application Server v7.0 at localhost

publishApplication:

restoreSOAPClientProps:
[copy] Copying 1 file to C:\IBM\WCDE_E~1\wasprofile\properties

BUILD FAILED
C:\IBM\WCDE_E~1\setup\setup.xml:79: The following error occurred while executing this line:
C:\IBM\WCDE_E~1\setup\setup.xml:200: Timed out while starting the server. Check WAS logs for details. 
or similar to the following:
BUILD FAILED
C:\WCDE_E~1\setup\setup.xml:79: The following error occurred while executing this line:
C:\WCDE_E~1\setup\setup.xml:200: java.lang.NoClassDefFoundError: org.eclipse.emf.ecore.resource.ResourceSet 

Solution

Publishing the application is the last step of the setup process in setup.log. If the publishing step fails, you can publish the application manually to complete the setup process by using the following steps:
  1. Open WebSphere Commerce Developer.
  2. In the Servers view, right-click the test server and click Publish.
After publishing is complete, workspace setup is complete as well. There is no need to restore and re-create the workspace because of the publishing application error.