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

Message "Job manager has been shut down." appears within output of scm.exe utility

Environment: RTC 4.0.2 (both client and server)

We encountered problems with output of scm.exe command. The common pattern is that the emitted output (stdout) of scm command contains error message "java.lang.IllegalStateException: Job manager has been shut down." followed by stack trace. This occured for both raw and JSON formatted output in many cases of using scm.

Commands that caused described problems:

  • create changeset
  • changeset comment
  • changeset complete
  • status

We have encountered 3 following cases:

  1. Scm output contains exception message followed by stack trace, command result is "success".
    The fragment of output of "changeset comment" command is as follows:
    Comment set.
    java.lang.IllegalStateException: Job manager has been shut down.
        at org.eclipse.core.internal.jobs.JobManager.schedule(JobManager.java:1104)
        at org.eclipse.core.internal.jobs.InternalJob.schedule(InternalJob.java:427)
        at org.eclipse.core.runtime.jobs.Job.schedule(Job.java:462)
        ...
  2. JSON output of scm.exe is followed by error message and stack trace, command result is "success". JSON is not corrupted.
    The fragment of output of "create changeset" command is as follows:
    {
        "url": "https:\/\/jazz\/ccm\/",
        "uuid": "_7ng9MZumEeKJorJDoZ2vpw"
    }
    java.lang.IllegalStateException: Job manager has been shut down.
        at org.eclipse.core.internal.jobs.JobManager.schedule(JobManager.java:1104)
        at org.eclipse.core.internal.jobs.InternalJob.schedule(InternalJob.java:427)
        at org.eclipse.core.runtime.jobs.Job.schedule(Job.java:462)
        ...
  3. JSON output of scm.exe is corrupted by error message followed by stack trace (both inside JSON!!!), command result is sometimes "success", sometimes "failure". JSON output must be explicitly fixed before parsing.
    The fragment of the output of "status" command is as follows:
    (Please ignore "unreachable-workspaces" response here - it was caused by corrupted sandbox. We are still awaiting proper JSON output...)
    {
        "unreachable-workspaces": [
            {
                "error-message": "Could not determine the URI required to connect to the repository. The UUID of the repository is _np_1QcXTEeG8Sf7V5YZT5g. If you know the repository URI run 'login' command providing the repository URI. If not, please contact your administrator.",
                "name": "WS_tst_build",
                "repo-id": "_np_1QcXTEeG8Sf7V5YZT5g",
                "url": "",
                "uuid": "_0PMssWxPEeKiOfHPFcp5GQ"
            }
        ]
        java.lang.IllegalStateException: Job manager has been shut down.
            at org.eclipse.core.internal.jobs.JobManager.schedule(JobManager.java:1104)
            at org.eclipse.core.internal.jobs.InternalJob.schedule(InternalJob.java:427)
            at org.eclipse.core.runtime.jobs.Job.schedule(Job.java:462)
            at ...
    }

The crucial things:

  1. Can be guaranteed that the result of the requested scm operation succeeded in case when scm command returns "success" but the output (raw or JSON) contains "Job manager has been shut down." exception incl. stack trace?
  2. Each JSON output must be pre-processed to filter unexpected content before parsing... :(

Note: We are switching from RTC 4.0 to 4.0.2. We did not encounter the described problems ever before.

Regards,
David

0 votes



5 answers

Permanent link
There are a few work items that appear related:

IllegalStateException: Job manager has been shut down in CLI on z/OS (239599)
[cli] "java.lang.IllegalStateException: Job manager has been shut down" after scm deliver (238735)
UpdateChangesJob scheduled during shutdown (217382)

Could you subscribe to UpdateChangesJob scheduled during shutdown (217382)  and provide the information provided here for further investigation please?

0 votes

Comments

There is one key question there - or rather a problem which blocks our efforts of upgrading RTC to version 4.0.2: Can it be guaranteed that the result of the requested scm operation succeeded in case when scm command returns "success" but the output (raw or JSON) contains "Job manager has been shut down." exception incl. stack trace?

If the answer is yes, we will just ignore this exception in our code - it is a problem in JSON output because exception messages such as this one fail the subsequent JSON parsing (the messages break the JSON format). But we already do that with another problem type ("Job found still running after platform shutdown..."), so we would just add this one.

Another topic would be why we are getting these errors in the first place - but I lack the ambition to get that one resolved if we can work around it :-).

Thanks!
Petr


Permanent link


Hello,
I have found this java.lang.IllegalStateException in log, but it is not regular output, it is on error-output. The question remains: could I rely on "Result code: 0" and be sure, that in this case changeset was created?

RTC client 4.0.2 Win7 x64
RTC server 4.0.2

4/22/2013 2:45:08 PM: Executing: "C:\Program Files (x86)\IBM\Rational Team Concert Client for Microsoft Visual Studio IDE\3rd Party\scmtools\eclipse\scm.exe" -a n create changeset -r "https://jazz/ccm/" -d "D:\Sandbox\tstbx" -w "_WVslsczwEFG81f7V5YZT5g" --no-current -j --component "ws_bx"
4/22/2013 2:45:13 PM: STD_ERR: java.lang.IllegalStateException: Job manager has been shut down.
4/22/2013 2:45:13 PM: STD_ERR: at org.eclipse.core.internal.jobs.JobManager.schedule(JobManager.java:1104)
4/22/2013 2:45:13 PM: STD_ERR: at org.eclipse.core.internal.jobs.InternalJob.schedule(InternalJob.java:427)
4/22/2013 2:45:13 PM: STD_ERR: at org.eclipse.core.runtime.jobs.Job.schedule(Job.java:462)
4/22/2013 2:45:13 PM: STD_ERR: at com.ibm.team.filesystem.rcp.core.internal.changes.util.listeners.UpdateChangesJob.requestModelUpdate(UpdateChangesJob.java:105)
4/22/2013 2:45:13 PM: STD_ERR: at com.ibm.team.filesystem.rcp.core.internal.changes.update.util.UpdateManager.requestModelUpdate(UpdateManager.java:38)
4/22/2013 2:45:13 PM: STD_ERR: at com.ibm.team.filesystem.rcp.core.internal.changes.util.listeners.EventManager.handleEvents(EventManager.java:578)
4/22/2013 2:45:13 PM: STD_ERR: at com.ibm.team.repository.client.util.EventSource$BackgroundEventDispatcher$1.run(EventSource.java:712)
4/22/2013 2:45:13 PM: STD_ERR: at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
4/22/2013 2:45:13 PM: STD_ERR: at com.ibm.team.repository.client.util.EventSource$BackgroundEventDispatcher.process(EventSource.java:707)
4/22/2013 2:45:13 PM: STD_ERR: at com.ibm.team.repository.client.util.EventSource$BackgroundEventDispatcher$3.run(EventSource.java:757)
4/22/2013 2:45:13 PM: STD_ERR: at com.ibm.team.repository.client.util.ThreadCheck.runProhibitingLongOps(ThreadCheck.java:174)
4/22/2013 2:45:13 PM: STD_ERR: at com.ibm.team.repository.client.util.EventSource$BackgroundEventDispatcher.process(EventSource.java:743)
4/22/2013 2:45:13 PM: STD_ERR: at com.ibm.team.repository.client.util.EventSource$BackgroundEventDispatcher$4.run(EventSource.java:772)
4/22/2013 2:45:13 PM: STD_ERR: at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
4/22/2013 2:45:13 PM: STD_ERR: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
4/22/2013 2:45:13 PM: STD_ERR: at java.lang.Thread.run(Thread.java:738)
4/22/2013 2:45:13 PM: Result code: 0

David

0 votes


Permanent link
We're seeing the same thing on RTC 4.0.6 (4.0.5 Build Toolkit). WIndows 7, 64-bit:

[INFO] Executing: cmd.exe /X /C "scm create changeset --username srv-escriptscm --password ***** "[maven-release-plugin] prepare release scheduler-1.0.0-122""
[INFO] Working directory: E:\reb\KAISER\TEST_SCHEDULER\scheduler
[ERROR] Error: java.lang.IllegalStateException: Job manager has been shut down.
	at org.eclipse.core.internal.jobs.JobManager.schedule(JobManager.java:1104)
	at org.eclipse.core.internal.jobs.InternalJob.schedule(InternalJob.java:427)
	at org.eclipse.core.runtime.jobs.Job.schedule(Job.java:462)
	at com.ibm.team.filesystem.rcp.core.internal.changes.util.listeners.UpdateChangesJob.requestUpdate(UpdateChangesJob.java:151)
	at com.ibm.team.filesystem.rcp.core.internal.changes.update.util.UpdateManager.requestUpdate(UpdateManager.java:77)
	at com.ibm.team.filesystem.rcp.core.internal.changes.util.listeners.EventManager.handleEvents(EventManager.java:611)
	at com.ibm.team.repository.client.util.EventSource$BackgroundEventDispatcher$1.run(EventSource.java:720)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at com.ibm.team.repository.client.util.EventSource$BackgroundEventDispatcher.process(EventSource.java:713)
	at com.ibm.team.repository.client.util.EventSource$BackgroundEventDispatcher$3.run(EventSource.java:771)
	at com.ibm.team.repository.client.util.ThreadCheck.runProhibitingLongOps(ThreadCheck.java:174)
	at com.ibm.team.repository.client.util.EventSource$BackgroundEventDispatcher.process(EventSource.java:756)
	at com.ibm.team.repository.client.util.EventSource$BackgroundEventDispatcher$4.run(EventSource.java:790)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:906)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:929)
	at java.lang.Thread.run(Thread.java:738)
	
This is preventing our Maven implementation from moving forward.

Any ideas?

0 votes


Permanent link
What we did... we are now ignoring all std-err output from scm.exe command line tool. Btw we are seeing "Job manager has been shut down" error message after almost all scm.exe call in RTC client 4.0.5 :(

0 votes

Comments

Cool, thanks -- in our case we're using the Jazz SCM provider (essentially a wrapper to scm commands), so I'm not sure how we'd ignore std-err.


Permanent link

I am also getting this in v4.0.6 on Windows 32-bit scmtools.   Apparently v5.0.0 has a fix for it

http://www-01.ibm.com/support/docview.wss?uid=swg1PI15553

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
× 1,201
× 456

Question asked: Apr 09 '13, 6:41 a.m.

Question was seen: 11,318 times

Last updated: Aug 08 '14, 5:04 a.m.

Confirmation Cancel Confirm