Wrong error message

General discussion on the JZOS batch launcher and toolkit
Post Reply
gehlert
Posts: 7
Joined: Thu Nov 17, 2005 2:00 pm
Location: Frankfurt, Germany

Wrong error message

Post by gehlert »

Got the following error message:

java.lang.IllegalStateException: No mvsCallbackThread active - callback can be set

My mistake, I guess -- started the application not via the batch launcher but from a shell script. But, shouldn't the error message read "callback cannot be set"?

Not a big deal, I know... but anyway...
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

Thanks for catching this - we'll correct this in the next release
gehlert
Posts: 7
Joined: Thu Nov 17, 2005 2:00 pm
Location: Frankfurt, Germany

Post by gehlert »

Just to verify -- is it true that the callback thread can only be established when using the batch launcher? Or should it also work when running the app from USS? (If so, I must have done something else wrong.)

More generally, is batch launcher code ever invoked from the JVM, or only code that resides in shared libraries?
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

The batch launcher establishes the mvs console interaction thread when it initializes, shortly after it constructs the JVM. If you run with trace level logging (LOGLVL='+T') you'll see the call from the launcher to the JVM.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

I've not attempted it, but you should be able to use ZUtil.establishMvsCommandWaiter() yourself if not running under the batch launcher.
gehlert
Posts: 7
Joined: Thu Nov 17, 2005 2:00 pm
Location: Frankfurt, Germany

Post by gehlert »

Tried that before but this causes an abend & LE dump when I am running under the batch launcher (see one of my previous posts), so, stuck betweeen a rock and a hard place...

Doesn't matter anyway since this was only a quick test, and I'll use the batch laucher from now on.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

How about catching the IllegalStateException from setMvsCommandCallback() and in the catch block calling establishMvsCommandWaiter and retrying....
Post Reply