It's all about the answers!

Ask a question

getting org.eclipse.core.resources The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes during RTC build using headless workspace

Ugo Soave (2547) | asked Apr 04 '14, 7:00 a.m.
edited Apr 04 '14, 9:32 a.m.
Hi to all, I'm facing a very annoying problem, in build process of our developers team.
Our conf is: Win 7 professional 64-bit, RAD v 8.5.5, RTC 4.0.4
we use the jazz build system to produce our JARs and EARs, running an ant task that does the following:
  • accept from stream, by executing scm.exe with accept parms, using ant task <exec>:
  <exec executable="${scmExe}" failonerror="false" >
    <arg value="accept" />
............ accept parms........
  • modify manifest file of the Web/Java module to write some useful info's (number of release, build timestamp) using ant task <manifest>
<buildnumber file="build.num" />
   <property name="" value="${}.1.00.${build.number}.${builddatetime}"/>
     <manifest file="${projectlocation}/META-INF/MANIFEST.MF" mode="update">
            <attribute name="Implementation-Version" value="${}"/>
            <attribute name="Project-Location" value="${projectlocation}"/>

  • builds the project: this is done calling from the ant procedure, the runtant.bat command provided by RAD installation, and passing as input a task ant that use <buildProject>.(I'm attaching only the EAR building, but the Jar build process is similar).
    <target name="buildProject" >
        <exec executable="${runAnt}" failonerror="true" vmlauncher="false">
            <env key="workspace" value="${}" />
            <arg value="${}" />
            <arg value="-Drtc.root.project=${rtc.root.project}" />
            <arg value="${}" />
            <arg value="-Dbuild.type=${build.type}" />
            <arg value="-Dbuild.mode=${build.mode}" />
            <arg value="-file" />
            <arg value="${}/AntBuild/ant/" />
            <arg value="makeEar" />

and this is the content of <makeEar> task

    <target name="makeEar" depends="buildWspc" >
        <earExport failonerror="true" refresh="true" exportsource="false"
            earprojectname="${rtc.root.project}" earexportfile="${}" overwrite="true" />
   <target name="buildWspc" >
      <setDebugInfo  debuginfo="true"  propertyName="settings" />
      <eclipse.refreshLocal resource="${}" depth="infinite" />
      <eclipse.incrementalBuild project="${}" kind="clean"  />
       <projectBuild projectName="${}" buildType="Full" failOnError="true" debugCompilation="true"  />

  • postbuild meaningless activities
In a random and obscure way we get in the accept phase and/or in the build phase this message in the [Workspace_Folder]/.metadata/.log file
ENTRY org.eclipse.core.resources 2 10035 2014-04-04 11:44:19.974
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
or, as well
ENTRY 4 1000 2014-04-04 09:45:13.099
!MESSAGE Status ERROR: code=0 Job Broadcasting local changes has been in state 1 for too long null

and the build process hangs for a lot of minutes (6-15 minutes), seemingly doing nothing.

Any help is appreciated
Thanks in advance

Be the first one to answer this question!

Register or to post your answer.