Just now I spent considerable time figuring out why I get a message like this:
[FORG0006] Invalid arguments for com.avatar_reality.ai.OntologyManager.save(...) method.
In case you're wondering, it doesn't have anything to do with invalid arguments. It prints this whenever anything is wrong. Anything. It could be the wrong arguments. Or the wrong method name. Or the wrong class-name. Or even better, nothing like that at all, just any uncaught exception thrown by the method (or the class-loader) will cause it to print this error.
May kindly I suggest embedding the original cause in the error message? That would save a ton of time figuring out what exactly is the matter.
Mark
Hi Mark,
if your java method isn't set to static you have to instantiate the class first and pass it to the method you want to call. See the java binding page in our docu: http://docs.basex.org/wiki/Java_Bindings Here the FileWrite class gets instantiated with fw:new("output.txt") and then passed to the fw:write method.
Kind regards, Andreas
Am 22.01.2011 um 01:11 schrieb Mark Boon:
Just now I spent considerable time figuring out why I get a message like this:
[FORG0006] Invalid arguments for com.avatar_reality.ai.OntologyManager.save(...) method.
In case you're wondering, it doesn't have anything to do with invalid arguments. It prints this whenever anything is wrong. Anything. It could be the wrong arguments. Or the wrong method name. Or the wrong class-name. Or even better, nothing like that at all, just any uncaught exception thrown by the method (or the class-loader) will cause it to print this error.
May kindly I suggest embedding the original cause in the error message? That would save a ton of time figuring out what exactly is the matter.
Mark
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Hi Mark,
[FORG0006] Invalid arguments for com.avatar_reality.ai.OntologyManager.save(...) method. [...] May kindly I suggest embedding the original cause in the error message? That would save a ton of time figuring out what exactly is the matter.
A good point. I've revised the Java bindings to give better feedback for invocation target exceptions. As an example, the following query...
declare namespace fis = "java:java.io.FileInputStream"; fis:new("non-existing-file")
…now returns:
[FORG0006] Java call failed: non-existing-file (File cannot be found).
The updated code can be found in the repository and will be part of the next minor release (to be expected in Feb).
Christian
That's great, thank you. It will save a lot of time, especially because these only turn up at run time.
Mark Boon
On Jan 23, 2011, at 8:09 AM, Christian Grün christian.gruen@gmail.com wrote:
Hi Mark,
[FORG0006] Invalid arguments for com.avatar_reality.ai.OntologyManager.save(...) method. [...] May kindly I suggest embedding the original cause in the error message? That would save a ton of time figuring out what exactly is the matter.
A good point. I've revised the Java bindings to give better feedback for invocation target exceptions. As an example, the following query...
declare namespace fis = "java:java.io.FileInputStream"; fis:new("non-existing-file")
…now returns:
[FORG0006] Java call failed: non-existing-file (File cannot be found).
The updated code can be found in the repository and will be part of the next minor release (to be expected in Feb).
Christian
basex-talk@mailman.uni-konstanz.de