It's all about the answers!

Ask a question

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


David Hladuvka (1111) | asked Apr 09 '13, 6:41 a.m.

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

5 answers



permanent link
Sonia Dimitrov (27149) | answered Apr 10 '13, 9:40 a.m.
JAZZ DEVELOPER

Comments
Petr Lidman commented Apr 16 '13, 7:02 a.m.

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
Dɐvid Benǝda (14147) | answered Apr 22 '13, 9:16 a.m.


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

permanent link
Jason MacDonald (1146) | answered Mar 19 '14, 1:35 p.m.
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?


permanent link
Dɐvid Benǝda (14147) | answered Mar 19 '14, 1:42 p.m.
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 :(

Comments
Jason MacDonald commented Mar 19 '14, 3:03 p.m.

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
Stephen Long (14311013) | answered Aug 08 '14, 5:04 a.m.

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

Your answer


Register or to post your answer.