It's all about the answers!

Ask a question

Build Engine Not Working?


michael garvin (116119) | asked Mar 03 '08, 1:24 p.m.
Hi, I'm working through evaluating Jazz as an ALM candidate for our company. As part of this work I've been trying to use features of Jazz from end-to-end and today I was workign on setting up a build engine.

I created ant build file, setup a build definition and a build engine, downloaded the separate build system zip file and installed it. Then ran the jbe with my engineid to kick things off.

Everything seems to work, except that prior to actually doing my project build, I get an exception:

Invoking pre-build participant "com.ibm.team.build.jazzscm"
Accepting changes into workspace "Beginner Project Team Stream Workspace" ...
com.ibm.team.repository.common.ItemNotFoundException: Item not found: com.ibm.team.scm.common.internal.impl.WorkspaceHandleImpl@10f243b (stateId: <unset>, itemId: , origin: com.ibm.team.repository.client.internal.TeamRepository@9a9b65, immutable: true)
at com.ibm.team.scm.client.internal.WorkspaceManager.getWorkspaceConnection(WorkspaceManager.java:387)
at com.ibm.team.build.internal.scm.SourceControlUtility.acceptAllIncoming(SourceControlUtility.java:320)
at com.ibm.team.build.internal.scm.SourceControlUtility.acceptAllIncoming(SourceControlUtility.java:273)
at com.ibm.team.build.internal.engine.JazzScmPreBuildParticipant.performAccept(JazzScmPreBuildParticipant.java:193)
at com.ibm.team.build.internal.engine.JazzScmPreBuildParticipant.preBuild(JazzScmPreBuildParticipant.java:112)
at com.ibm.team.build.internal.engine.BuildLoop.invokePreBuildParticipants(BuildLoop.java:351)
at com.ibm.team.build.internal.engine.BuildLoop$2.run(BuildLoop.java:275)
at java.lang.Thread.run(Unknown Source)




I'm not sure how to fix this...I don't have anything in the traceback that can help me as a user know what I configured wrong :( Has anyone seen this before?

I may be absusing the the way jazz expects the build environment to be setup, I'm using an existing workspace of one of the users in the project. I didn't create a separate build user or separate build workspace...I just wanted to quickly get the build up and running so I can try out the usage of features that involve builds.

Is there a detailed guide somewhere on how to setup a build? I did try to follow along with this one:

https://jazz.net/learn/LearnItem.jsp?href=content/docs/client-tour/using-build.html

but didn't create a workspace specifically for a build. I'll give that a try though and see if it helps.

As with my other posting the error message seems not so helpful :( I really like what Jazz can do though, I hope it becomes more usable as things develop. Another note on usability; Having to go off and learn ant before you can even write a build.xml file presents a barrier to entry (as a new user), it would be a lot more usable if there was a wizard to generate a basic build.xml file for you that you just tweak. After learning about Ant I can see its not that big a deal, but when you are a new user, you don't know that, you just see "oh man, one more thing I have to learn that should already just be there and working".

Anyways, I'll see if I can set it up in a way that follows the rules better :) I'll also try to get a traceback on that issue with sharing files.

Related to that I've noticed that Eclipse (er Jazz) still seems to have its wonky behavior from the old days; meta data gets corrupted somehow and then the behavior goes weird. When sharing code I found that all night friday I couldn't share code from one of the users in my sample project, the Workbench would just silently do nothing when I tried to check in my code. Initially it worked for that user, but then for some reason after the first time I checked in some code it would just ignore my requests to check in code. When I tried from other users on other computers, it worked like a charm. It really seemed like one of those situations where the workspace meta data gets messed up and then the GUI gets wonky.

(^_^)/
mike.

8 answers



permanent link
michael garvin (116119) | answered Mar 03 '08, 2:19 p.m.
Hey, so I created a dedicated workspace for building and that seems to help a lot, there are still problems though, the tutorial says to use a "fetched" sub-directory, and my version of Jazz doesn't actually use a fetched sub-diretory. Beyond that the problem for me is that I can't checkin my build.xml file...the workbench just silently ignores my request. I'm going to try checking it in from a different user though, I think the meta data for this user is corrupt.

I figured out how to generate a build.xml, instead of writing one by hand, just export the project as Ant build file. Works good, but isn't really so obvious :(

(^_^)/
mike.

permanent link
michael garvin (116119) | answered Mar 03 '08, 10:01 p.m.
Hi, so I fixed my build.xml issue;

1) The tutorial says a "fetched" sub-directory is used.
This must be out of date, my download of the latest
Jazz does not use a fetched directory.

2) I think the meta data for my Jazz installation is
messed up on one of the machines I installed it on.
That machine (happens to be at work), can not check
in any files, the GUI just silently does nothing,
no Java exceptions in the log, just nothing :(
However, the Jazz I installed on my home machine can
check in and deliver without problem. And at work,
that machine can see the incomming changes once they
have been delivered. Can not see the changes when
only checked in...I think its supposed though? Are
you not supposed to be able to preview other designers
work before they actually deliver?

Anyways, I was able to do a build by incorporating changes from multiple (fake!) users, very cool. The build system seems very flexible, but it seems awkward that I have to manually accept changes into the build workspace before launching builds. For continuous integration it would be more convenient (I think) if the build enging could just build a load every hour say, and if there is an error, thats ok, that load is flagged for followup.

Is there a way to make the built in Jazz build system be more automatic so I don't have to manually launch builds on demand? I'm sure this has already been done by other people before.

(^_^)/
mike.

permanent link
Jason Bird (26) | answered Mar 04 '08, 3:08 p.m.
Hi Mike,

I'm glad you could get a build up and running. I'll try to address the
issues you've raised about your experience so far.

1) Ant and generating build files

The Build component is designed to allow integration between your build
system and Jazz. Creating the build scripts (in the case of Ant, the
build.xml files) themselves is beyond the scope of the component.
However, for first time users I can see how it could be helpful to
mention the export-as-ant-build-file capability of Eclipse.

2) Scheduling builds and accepting changes

You can schedule your builds to run at preset intervals by editing the
relevant build definition. Open your build definition editor and click
on the scheduling tab. You can indicate on what days the build should
run and either a set time or an interval.

On the "Jazz SCM" tab (for SCM builds) you can also specify whether or
not the build should accept current changes into the designated
workspace before building. You can also specify that the build be
performed only if new changes were accepted.

3) Incoming changes

Your "Pending Changes" view will show changes incoming from whichever
workspace or stream you currently have set as a "Flow Target". If, as
in the sample case, you are targeting a Stream, you will only see the
changesets after they are delivered to the Stream.

If your flow target is a workspace, then you will see the changes when
the user checks them in.

4) Fetched directory

On the "Jazz SCM" page of your build definition editor, there is a "Load
directory" item. There you can specify a directory on the build machine
as a destination for the fetched code (the default if you leave it blank
is the working directory of the build engine process). The tutorial
simply uses "fetched" as the name of the directory - you probably left
it blank, so the default directory was used.

Cheers!
Jason

dinobot71 wrote:
Hi, so I fixed my build.xml issue;

1) The tutorial says a "fetched" sub-directory is used.
This must be out of date, my download of the latest
Jazz does not use a fetched directory.

2) I think the meta data for my Jazz installation is
messed up on one of the machines I installed it on.
That machine (happens to be at work), can not check
in any files, the GUI just silently does nothing,
no Java exceptions in the log, just nothing :(
However, the Jazz I installed on my home machine can
check in and deliver without problem. And at work,
that machine can see the incomming changes once they
have been delivered. Can not see the changes when
only checked in...I think its supposed though? Are
you not supposed to be able to preview other designers
work before they actually deliver?

Anyways, I was able to do a build by incorporating changes from
multiple (fake!) users, very cool. The build system seems very
flexible, but it seems awkward that I have to manually accept changes
into the build workspace before launching builds. For continuous
integration it would be more convenient (I think) if the build enging
could just build a load every hour say, and if there is an error,
thats ok, that load is flagged for followup.

Is there a way to make the built in Jazz build system be more
automatic so I don't have to manually launch builds on demand? I'm
sure this has already been done by other people before.

(^_^)/
mike.



--
Jason Bird
Jazz Team Build

permanent link
michael garvin (116119) | answered Mar 06 '08, 3:06 p.m.
Hey Jason, thanks! Just saw your answer...I figure out most of that stuff by just playing around with the GUI...probably should have beeen more patient before asking :)

Basically my problems were due to being on windows and installing the server/client in a directory with spaces in its path and installing on different drives. Once I removed those two issues, everything has been running smoothly,

Although I've noticed that I can't open some work items in the news feed on remote machines. I've noticed also that someone else has reported this and their situation sounds exactly like mine. I'll monitor that discussion through to see what happens.

Basically, now I'm trying to figure out how to get JUnit results and compile results to show up as an artifact of the build. My build result says they are missing, although I edited the Ant command line to add the junit target and it gets run during the build. I don't see yet how in the workbench to tell Jazz to take the index.html file from the junit directory and use it as the "result" for JUnit testing.

I'll keep playing with it though and see if I can figure it out.

Thanks for all the help so far!

(^_^)/
mike.

permanent link
Don Weinand (7851) | answered Mar 06 '08, 3:20 p.m.
JAZZ DEVELOPER
If you already have the ant build creating your JUnit results then you've done the hard part and the rest is butter. You simply need to publish those results to your build result within your ant build using our task. The filePath can be a single file or a directory of results.

<junitLogPublisher buildResultUUID="${buildResultUUID}" repositoryAddress="${repositoryAddress}" userId="${userId}" password="${password}" filePath="${datadir}/junit.logs/com.ibm.team.build.tests.AllTests.results.xml/>

Don Weinand
Jazz Team Build

permanent link
Ryan Manwiller (1.3k1) | answered Mar 06 '08, 7:08 p.m.
JAZZ DEVELOPER
You might also want to follow these two work items. Once these are fixed,
you'll be able to get compile and junit results published without having to
modify your ant script.

https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/45935

https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/32400


---
Ryan Manwiller
Jazz Team Build

permanent link
michael garvin (116119) | answered Mar 06 '08, 7:37 p.m.
Cool, thanks guys! Yes I actually found the LogPublisher stuff mentioned in the example build.xml that is buried in the examples directory of the build engine. Once I plugged that in everything worked like a charm, except that the example is out of date for logging the compiler output. I couldn't find any options on the javac task that would work for sending output to a log file. So I still get a compile log missing status in the build result :(

There is -Xstdout, but it didn't seem to work, I might have messed something up though. I also tried using the <recorder> but then I couldn't use the LogPublisher after the <recorder>, some XML parsing error about not being able to include content in the prolog?

Oh well, not critical; the main thing is that I can clearly show scheduled continuous builds now with JUnit results easily being accessed from the build result. Basic continuous integration. So, I have pretty much traceability from end to end, I can create stories, make work items for them, change code and submit the code all within a traceable context. Nice!

I'll check out those other bug reports, I think I'm pretty much good to go though. I do want to take a look at some of the continuous integration tools I've heard about Continuum and Hudson? But Eclipse is already doing it at least in a minimum way so I think I'm good to go.

Thanks again for the help!

(^_^)/
moike.

permanent link
Ryan Manwiller (1.3k1) | answered Mar 06 '08, 7:48 p.m.
JAZZ DEVELOPER
Our compile publishing task only works with the eclipse java compiler (ECJ),
also known as the JDT compiler (thus the name of our
jdtCompileLogPublisher).

The example at
/jazz/buildsystem/buildtoolkit/examples/compile-and-test/build.xml includes
instructions at the top for using ecj instead of javac.

---
Ryan Manwiller
Jazz Team Build

Your answer


Register or 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.