Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

[Solved] waitForTeamBuild fails with ClassCastException.

I'm having issues running waitForTeamBuild from my ant build script as it fails with a ClassCastException.

I'm running the following (had to strip the angle brackets from around waitForTeamBuild to get it to display in the forum)
-------

<echo>repositoryAddress=${repositoryAddress}</echo>

<echo>userId=${userId}</echo>
<echo>passwordFile=${passwordFile}</echo>
<echo>buildResultUUID=${async.test.build.uuid}</echo>
waitForTeamBuild repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}"
buildResultUUID="${async.test.build.uuid}"
buildStateProperty="fatbuildState"
verbose="true"
interval="10"
timeout="10800"

-------

and I get
---------
repositoryAddress=https://jazz1.hal.com:9443/jazz/
userId=builduser@hal.com
passwordFile=../../contbld.pass
buildResultUUID=_PvTr4FJSEeGraYolFu-tzQ
Not using a proxy to reach https://jazz1.hal.com:9443/jazz/
java.lang.ClassCastException: $Proxy18 incompatible with com.ibm.team.build.common.model.IBuildResult
at com.ibm.team.build.ant.task.WaitForTeamBuildTask.getBuildResult(WaitForTeamBuildTask.java:334)
/test/jazz_build/jbe_charles/jazz/buildsystem/buildengine/eclipse/personal_build/ant_build/build-it.xml:184: java.lang.ClassCastException: $Proxy18 incompatible with com.ibm.team.build.common.model.IBuildResult
at com.ibm.team.build.ant.task.AbstractTeamBuildTask.execute(AbstractTeamBuildTask.java:666)
at com.ibm.team.build.ant.task.WaitForTeamBuildTask.doExecute(WaitForTeamBuildTask.java:241)
at com.ibm.team.build.ant.task.AbstractTeamBuildTask.execute(AbstractTeamBuildTask.java:653)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

--------

has anyone any suggestions what I'm doing wrong or how I debug this?

------

I found the answer myself but can't accept my own answers to close the question.

1

1 vote



2 answers

Permanent link
I have not seen this, however, are you sure you have matching versions of JBE and RTC installed?


After further inveastigation it seems there are multiple UUIDs for each build. There is the requestUUID and the buildResultUUID. I was passing the requestUUID to waitForTeamBuild and I was labelling it the buildResultUUID. Once I changed my code to read

passwordFile="${passwordFile}"
requestUUID="${async.test.build.uuid}"
buildStateProperty="fatbuildState"

then it works.

I'm not entirely sure why we need multiple UUIDs and the error message could have been a little clearer but it was user error. Thanks for looking at this.

1 vote


Permanent link
Hi,

I have not seen this, however, are you sure you have matching versions of JBE and RTC installed?

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Feb 08 '12, 10:49 a.m.

Question was seen: 5,841 times

Last updated: Mar 19 '15, 2:07 p.m.

Confirmation Cancel Confirm