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

Error while running JBE as windows service

I've created Windows service for JBE using https://jazz.net/wiki/bin/view/Main/JbeAsAWindowsService

All was fine. After requesting the build, I get the following error

Failed logs (via Windows service)
2014-07-15 10:58:23 [Jazz build engine]
2014-07-15 10:58:23 [Jazz build engine] Substituted the following build property variables:
2014-07-15 10:58:23 [Jazz build engine]     team.scm.fetchDestination = D:\b\123\${buildEngineId}   -->   team.scm.fetchDestination = D:\b\123\
2014-07-15 10:58:23 [Jazz build engine] 
2014-07-15 10:58:23 [Jazz build engine] 
2014-07-15 10:58:23 [Jazz build engine] Substituted the following configuration element property variables:
2014-07-15 10:58:23 [Jazz build engine]     com.ibm.team.build.ant : com.ibm.team.build.ant.workingDir = ${team.scm.fetchDestination}\Project   -->   com.ibm.team.build.ant.workingDir = D:\b\123\Project
2014-07-15 10:58:23 [Jazz build engine]
2014-07-15 10:58:23 [Jazz build engine] running on host: X79
2014-07-15 10:58:23 [Jazz build engine] Should build occur?
2014-07-15 10:58:23 [Jazz build engine] Yes: Always build a user initiated request.
2014-07-15 10:58:23 [Jazz build engine] Invoking pre-build participant "com.ibm.team.build.jazzscm"
2014-07-15 10:58:23 [Jazz build engine] Accepting changes into workspace "cc_ws" ...
2014-07-15 10:58:25 [Jazz build engine] Fetching files to fetch destination "D:\b\123\" ...
2014-07-15 11:00:15 [Jazz build engine] Invoking build participant "com.ibm.team.build.ant"
com.ibm.team.build.internal.engine.InvalidPropertyValueException: CRRTC3512E: The location that the "com.ibm.team.build.ant.buildFile" property refers to does not exist. The location is "D:\build\ANT_XML\build_me.xml".
    at com.ibm.team.build.internal.engine.AntBuildParticipant.getBuildFile(AntBuildParticipant.java:456)
    at com.ibm.team.build.internal.engine.AntBuildParticipant.validateBuildFile(AntBuildParticipant.java:80) at com.ibm.team.build.internal.engine.AntBuildParticipant.validateProperties(AntBuildParticipant.java:66)
   at com.ibm.team.build.internal.engine.CommandLineBuildParticipant.build(CommandLineBuildParticipant.java:96)
    at com.ibm.team.build.internal.engine.BuildLoop.invokeBuildParticipants(BuildLoop.java:962)
    at com.ibm.team.build.internal.engine.BuildLoop$2.run(BuildLoop.java:746)
    at java.lang.Thread.run(Thread.java:738)

Success log (via Scheduled task)

2014-07-15 11:05:13 [Jazz build engine] 
2014-07-15 11:05:13 [Jazz build engine] Substituted the following build property variables:
2014-07-15 11:05:13 [Jazz build engine]     team.scm.fetchDestination = D:\b\123\${buildEngineId}   -->   team.scm.fetchDestination = D:\b\123\jbe
2014-07-15 11:05:13 [Jazz build engine]
2014-07-15 11:05:13 [Jazz build engine]
2014-07-15 11:05:13 [Jazz build engine] Substituted the following configuration element property variables:
2014-07-15 11:05:13 [Jazz build engine]     com.ibm.team.build.ant : com.ibm.team.build.ant.workingDir = ${team.scm.fetchDestination}\Project   -->   com.ibm.team.build.ant.workingDir = D:\b\123\jbe1\Project
2014-07-15 11:05:13 [Jazz build engine]
2014-07-15 11:05:13 [Jazz build engine] running on host: X79
2014-07-15 11:05:13 [Jazz build engine] Should build occur?
2014-07-15 11:05:13 [Jazz build engine] Checking for changes incoming to workspace "cc_ws" ...
2014-07-15 11:05:13 [Jazz build engine]  found changes (1)
2014-07-15 11:05:13 [Jazz build engine] Yes: Pre-build participant "com.ibm.team.build.jazzscm" would like to build.
2014-07-15 11:05:14 [Jazz build engine] Invoking pre-build participant "com.ibm.team.build.jazzscm"
2014-07-15 11:05:14 [Jazz build engine] Accepting changes into workspace "cc_ws" ...
2014-07-15 11:05:19 [Jazz build engine] Fetching files to fetch destination "D:\b\123\jbe1" ...
2014-07-15 11:07:07 [Jazz build engine] Invoking build participant "com.ibm.team.build.ant"
Buildfile: D:\build\ANT_XML\build_me.xml
<build continues successfylly>



This happens only when the bulid is run as service.

Any idea how to overcome this?

The build works fine if the JBE is run via command prompt

0 votes

Comments

Hi Karthik, Can you paste the log of a successful build when jbe is not running as a service?

Hi Scott,

I have updated the original post with success and failure log. The success log was from scheduled build and failure was requested by me


Accepted answer

Permanent link
ok, so you manually put the build file into that folder. the build request did not do it.

I think it is permissions..

logon to the build server with the service specified ID and password to verify.

this is typically the problem with services.
Karthik Krishnan selected this answer as the correct answer

1 vote


One other answer

Permanent link
I assume you run in a different location or the load structure is different. The message

"com.ibm.team.build.internal.engine.InvalidPropertyValueException: CRRTC3512E: The location that the "com.ibm.team.build.ant.buildFile" property refers to does not exist. The location is "D:\build\ANT_XML\build_me.xml""

complains about not being able to find the build file.

You load to "D:\b\123\" which might be related to the issue.

2 votes

Comments

PS: you can set the workspace the build uses using the -data folderlacation parameter.

Thanks Ralph for the feedback., Only difference is that instead of a scheduled task, the JBE is running as a Windows service. rest all remains the same. Right now I have disabled the Windows service and started back the Scheduled task, everything is working fine

The build file remains as is. Interestingly the file is accessible if it is run as scheduled tasks but not as service

Odd. Not sure. What Java version is used? If you run it as service, have you considered to pass the parameters from the JBE.ini. Not sure how you run it a service, however, sometimes due to the different context and way to start you need to do something like that.

I am using the JDK from IBM (com.ibm.java.win32.jdk_6.0.14.20130926) which is part of RTC 4.0.5 Eclipse client

I simply followed the steps mentioned in https://jazz.net/wiki/bin/view/Main/JbeAsAWindowsService along with forum posts when I encountered the error

I haven't passed the jbe.ini parameter. If so, how can i do that?

I am not sure in this context. But you see that the jbe.exe is not called. instead the launcher il called. Not sure if that looks for data such as the parameters in the .ini file.

I agree that the discrepancy between the load directory, "D:\b\123\", and where it looks for the Ant file, "D:\build\ANT_XML\build_me.xml", is likely to be the issue. How are these both configured in the build definition? I wouldn't expect this to work differently whether running as a Windows service or not.

I've updated my post with both the logs

is D:\build  accessible (permissions) by the service userid?  note that c:\program files is not!..

how did the build file get to d:\build?  if it wasn't loaded as part of the workspace load?

Yes the folder is accessible. In the Build definition, I have provided the ANT File location in the tab "Ant" of build definition (this is a special build that is why the build file is outside the workspace)

hmm. I will check that. Also the service itself runs with system account

OK Sam you are correct. The path for the build XML file is actually a Symlink. Thanks a lot for the pointer.

Edit: Sam, I cannot make your comment as answer. Hence accepting this whole thread as the answer

Another problem you can run into when running as a service is that the service account often has a different (i.e. minimal) setup for environment variables, drive mappings, etc, than when logged in as a regular user.  I was wondering whether you might have been missing the D: drive mapping, but then the load would have failed too.

showing 5 of 12 show 7 more comments

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: Jul 15 '14, 5:08 a.m.

Question was seen: 5,403 times

Last updated: Jul 16 '14, 3:12 p.m.

Confirmation Cancel Confirm