It's all about the answers!

Ask a question

Error while running JBE as windows service


Karthik Krishnan (8825117163) | asked Jul 15 '14, 5:08 a.m.
edited Jul 16 '14, 9:20 a.m.
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


Comments
Scott Cowan commented Jul 15 '14, 9:17 a.m.
JAZZ DEVELOPER

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


Karthik Krishnan commented 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

Accepted answer


permanent link
sam detweiler (12.5k6195201) | answered Jul 16 '14, 10:49 a.m.
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

One other answer



permanent link
Ralph Schoon (63.1k33645) | answered Jul 15 '14, 5:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.

Comments
Ralph Schoon commented Jul 15 '14, 5:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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


Karthik Krishnan commented Jul 15 '14, 7:18 a.m.

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


Ralph Schoon commented Jul 15 '14, 7:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Karthik Krishnan commented Jul 15 '14, 8:00 a.m. | edited Jul 15 '14, 8:02 a.m.

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?


Ralph Schoon commented Jul 15 '14, 9:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Nick Edgar commented Jul 15 '14, 4:18 p.m.
JAZZ DEVELOPER

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.


Karthik Krishnan commented Jul 16 '14, 9:19 a.m.

I've updated my post with both the logs


sam detweiler commented Jul 16 '14, 9:27 a.m. | edited Jul 16 '14, 9:27 a.m.

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?


Karthik Krishnan commented Jul 16 '14, 10:29 a.m.

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)


Karthik Krishnan commented Jul 16 '14, 10:59 a.m.

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


Karthik Krishnan commented Jul 16 '14, 11:49 a.m. | edited Jul 16 '14, 11:51 a.m.

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


Nick Edgar commented Jul 16 '14, 3:12 p.m.
JAZZ DEVELOPER

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