Subject:External Java functions with built-in XQuery processor = implementation not found Author:David Isaac Date:26 Sep 2008 01:56 PM
Hello-
Can anyone tell me how to access something like java.math.BigInteger.gcd() using the built-in XQuery processor? It works fine when I use the DataDirect processor, but when I use the built-in processor for debugging I get an "implementation not found" error.
Subject:External Java functions with built-in XQuery processor = implementation not found Author:(Deleted User) Date:01 Oct 2008 03:18 PM
Hi David,
the built-in XQuery processor only supports instance methods only when the class has a default constructor (i.e. with no arguments), that unfortunately BigInteger doesn't provide. You can workaround the limitation by creating a custom Java class with a static method with two arguments that internally builds the BigInteger using the first argument and then calls the gcd() method using the second one.
Subject:External Java functions with built-in XQuery processor = implementation not found Author:David Isaac Date:01 Oct 2008 05:43 PM
Well, that explains it, but I must say it is very inconvenient to wrap every Java class without default constructors that we want to use.
Any plans for Stylus to make the built-in processor work like SAXON or the DataDirect engine in this regard? Right now, we can either debug or use the core Java classes, but not both at once.
Subject:External Java functions with built-in XQuery processor = implementation not found Author:David Isaac Date:02 Oct 2008 04:58 PM
Thanks, Alberto! I thought I had read that the debugger worked only with the built-in processor.
FYI, I think all the <symbol unknown> values in the watch window left over from prior debugging reinforced my belief that the debugger was not working with SAXON. It would be nice if there was a clean way to delete variables from the watch window. Select, backspace, enter, and restart Studio seems to be the only way to clear a watch variable, and even then it doesn't always delete the selected variable and sometimes gives a "pure virtual function call" error and hangs Studio.