Teamcity/Clearcase creates bad buildAgent work area (Duplicate class errors on compile)

We have recently begun evaluating BASE Clearcase with Teamcity 4.0.2 (build 8222).

The TeamCity server runs on a OpenSUSE server, Linux gbnlu0425s 2.6.5-7.282-smp #1 SMP Tue Aug 29 10:40:40 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux. 
We are running the server on Java jdk 1.5.0_09


For around a month we've had great success but recently we have found that the build agent work area that is created from our clearcase snapshot view is becoming polluted with a strange directory structure which is causing "duplicate class" errors on our java compiles.

For example we will get ...

com/somecompany/client/ClientTest.java


and...

com/somecompany@@/main19/client/ClientTest.java


It looks like the TeamCity Clearcase VCS task that builds the agent work area is getting confused and writing out native clearcase structure into the work area.

As I've previously mentioned, the fact that ClientTest.java source exists twice on the classpath causes the javac to fail with "duplicate class" errors.

We have tried to clean the build directory and also completely clear down the data area by deleting the directories.  This seems to fix the problem once, but afterwards it always comes back.

Examing the snapshot view does not show any of this directory structure pollution.

Has anybody else suffered a similiar issue with Clearcase and Teamcity?

I hope somebody can help us with this problem as it looks likely that we will have to stop using TeamCity if we cannot continue with our evaluation.  It's a shame because I think its the best CI server we've tried out so far, barring this issue.

More information...The Build Agent is running on the same server, We are using the internal DB and we have VCS to automatically checkout to server on Build.

<build-type id="bt4" name="Continuous Daily Compile and Test on check in" run-type="Ant" checkout-on-server="true" checkout-on-agent="false" labeling-type="NONE" labeling-pattern="build-%system.build.number%">
    <description />
    <options>
      <option name="cleanBuild" value="true" />
    </options>
    <requirements />
    <run-parameters>
      <param name="coverage.include.source" value="true" />
      <param name="coverage.instr.parameters" value="-ix -*Test*" />
      <param name="target" value="tests2" />
      <param name="build-file-path" value="build.xml" />
      <param name="jvmArgs" value="-Djava.library.path=/home/mdsadmin/tibco/lib:/opt/mds/lib -Xms1280M -Xmx1280M -XX:MaxPermSize=256m" />
      <param name="teamcity.tests.runRiskGroupTestsFirst" value="recentlyFailed,newAndModified" />
    </run-parameters>
    <parameters>
      <param name="env.LD_LIBRARY_PATH" value="/home/mdsadmin/tibco/lib:/opt/mds/lib" />
    </parameters>
    <build-triggers sleeping-interval-sec="30">
      <vcs enabled="true" quiet-period="240" quiet-period-mode="USE_CUSTOM">
        <ignore-files>
          <pattern>-:client-jarjar.xml</pattern>
        </ignore-files>
      </vcs>
    </build-triggers>
    <vcs-entry-ref root-id="1" set-label="false">
      <checkout-rule rule="-:classes" />
      <checkout-rule rule="-:client" />
      <checkout-rule rule="-:configurations" />
      <checkout-rule rule="-:cops-support" />
      <checkout-rule rule="-:cpp_src" />
      <checkout-rule rule="-:db" />
      <checkout-rule rule="-:dist" />
      <checkout-rule rule="-:docs" />
      <checkout-rule rule="-:DOTNET_EXCEL_ADDIN" />
      <checkout-rule rule="-:Group Management" />
      <checkout-rule rule="-:Manage Change" />
      <checkout-rule rule="-:NEW_DOTNET_EXCEL_ADDIN" />
      <checkout-rule rule="-:scripts" />
      <checkout-rule rule="-:spirit-support" />
      <checkout-rule rule="-:support" />
      <checkout-rule rule="-:testing" />
      <checkout-rule rule="-:tools" />
      <checkout-rule rule="-:typedefs" />
      <checkout-rule rule="-:wix" />
    </vcs-entry-ref>
  </build-type>



Regards
David Brimley

1 comment
Comment actions Permalink

I may have stumbled across the fix, when turning on clearcase debug logs there was StdErr entry on a cleartool force update command

cleartool was throwing a warning to its command line which complained of a prior running update command from some weeks ago.  The command line option was asking whether or not it should terminate this previous update process, the default response was [no].  It looks as if the Teamcity clearcase process was taking this, or maybe just pressing enter.

I accessed cleartool manually for the vob and selected YES to terminate the previous update process.

It now looks as if the checkout to build agent work area is working without the strange clearcase structures and the compile is working.

For now.......

I will report back after a day or so of builds to confirm if this has fixed the issue.

Regards
David Brimley

0

Please sign in to leave a comment.