MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Exception message from java: MathLink connection was lost.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107482] Re: Exception message from java: MathLink connection was lost.
  • From: Andrey <andrey.siver at gmail.com>
  • Date: Sun, 14 Feb 2010 05:58:42 -0500 (EST)
  • References: <hkp1ol$7ge$1@smc.vnet.net> <hkr40b$ahk$1@smc.vnet.net>

The problem appears after

ml.waitForAnswer();

(where ml is KernelLink).

The stack trace shows that exception arise in class
com.wolfram.jlink.NativeLink in the following method:
...
	public synchronized int nextPacket() throws MathLinkException {

		if (link == 0) {
			throw new MathLinkException(MLE_LINK_IS_NULL, LINK_NULL_MESSAGE);
		}
		int pkt = MLNextPacket(link); // <-- Probably Here
		int errCode = MLError(link);
		if(errCode == 0) {
			return pkt;
		} else {
			throw new MathLinkException(errCode, MLErrorMessage(link));
		}
	}
...
So, it looks like the problem is in native library.

Of course, probably, it's possible to avoid the problem by rewriting
the mathematica code...

-Andrey

On Feb 11, 1:16 pm, David Bailey <d... at removedbailey.co.uk> wrote:

> A good way to explore this problem might be to call ShowJavaConsole[] to
> produce a console, and then add calls to
>
> System.out.println(whatever)
>
> in your Java code.

I do not understand now how to do it and how it can help.

But thanks for the suggestion.

-Andrey


  • Prev by Date: Re: .eps file in MATHEMATICA
  • Next by Date: Polar coordinates - ReplaceAll issue
  • Previous by thread: Re: Exception message from java: MathLink connection was lost.
  • Next by thread: Re: Exception message from java: MathLink connection was lost.