Error while running JBE as windows service
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
Accepted answer
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.
One other answer
"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.
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.
Comments
Scott Cowan
JAZZ DEVELOPER Jul 15 '14, 9:17 a.m.Hi Karthik, Can you paste the log of a successful build when jbe is not running as a service?
Karthik Krishnan
Jul 16 '14, 9:19 a.m.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