Reproduce illlegal Thread exception message

Hi,

I am trying to perform the encrypt & decrypt of test string using the service “wm.openpgp:execPGPs” & it is successful. But the problem what I am facing is the same service is being used in Production environment for encryption & decryption but the constant debug message like “got an iltse” are being written to nohup.out file.

Got an iltse means " Illegal Thread of Exception"

But everything is working fine as expected in Dev & Test environment.

Here is the part of code below which present in all environments, I request if any one can help me out on how to reproduce the message in dev or test environment so that I can take the necessary action to fix the issue permanently. Also It would be very helpful to know the root cause why constant messages are being written to nohup only for PROD.

Please take a look on the below code & suggest me if I have to perform any changes.

	if (!_timedout) {
		if (_waitForExit) {
			
			do {
				try {
					// Need to sleep a bit before getting exit code
					_xit = proc.exitValue();
					Thread.sleep(250);
				} catch (InterruptedException ie) {
					/* IGNORE */
				} catch (IllegalThreadStateException iltse) {
					System.out.println("got an iltse");
					continue;
				}
				break;
			} while (!(_timedout = (System.currentTimeMillis() > end)));
		} else {
			try {
				_xit = proc.exitValue();
			} catch (IllegalThreadStateException iltse) {
				_timedout = true;
			}
		}
	}

	if (_timedout) {
		System.out.println("timeout on: " + _command);
		if (_destroyOnTimeout) {
			proc.destroy();
		}
	}
}

Regards,
Kiran