Project

Profile

Help

Error generated when compiling XQuery to Java

Added by Anonymous over 16 years ago

Legacy ID: #4829827 Legacy Poster: Brent Evans (superslug)

I apologies in advance if this has been covered already by I can't seem to find any information on this forum regarding this issue. I'm attempting to use the newly supported feature in Saxon (since 8.9sa I think) whereby XQuery can be converted to Java, which can them be compiled. When I try building our rather large and complex XQuery program, I get then following error. I've created a small XQuery program and was able to generate Java, however I can reproduce this error in my small example if a include any Java extension calls. I'm not sure what I am missing here, any advice would be appreciated. Exception in thread "main" java.lang.UnsupportedOperationException: No compiler exists for class net.sf.saxon.functions.ExtensionFunctionCall at com.saxonica.codegen.CompilerService.getExpressionCompiler(CompilerSe rvice.java:147) at com.saxonica.codegen.CompilerService.compileToItem(CompilerService.ja va:1505) at com.saxonica.codegen.CompilerService.compileGlobalVariable(CompilerSe rvice.java:1043) at com.saxonica.codegen.QueryCompiler.compileQueryToJava(QueryCompiler.j ava:301) at com.saxonica.CompileQuery.run(CompileQuery.java:123) at com.saxonica.CompileQuery.main(CompileQuery.java:25) Cheers, Brent


Replies (2)

RE: Error generated when compiling XQuery to - Added by Anonymous over 16 years ago

Legacy ID: #4829974 Legacy Poster: Michael Kay (mhkay)

I'm afraid I was aware of this restriction - that calls to external functions cannot be compiled to Java - but I appear to have failed to document it (at least in the obvious place, http://www.saxonica.com/documentation/using-xquery/querycompilation/limitations.html). Apologies for the inconvenience. There has been relatively little feedback on the code-generation feature, and this might account for the fact that I haven't got around to fixing these limitations. Your message will automatically raise its priority, though I can't offer any guarantees. Intrinsically, it should be possible to do a very good job by calling external functions directly without any use of reflection.

RE: Error generated when compiling XQuery to - Added by Anonymous over 16 years ago

Legacy ID: #4830123 Legacy Poster: Brent Evans (superslug)

First, thank you for your quick reply. I suspected it might be a limitation but I couldn't find anything on the Saxonica site. I assume from "Intrinsically, it should be possible to do a very good job by calling external functions directly without any use of reflection." You mean that you intend to implement this by calling compiled external .class (.jar) files directly instead of using reflection. I will endeavor to keep abreast of developments in the area. Hopefully you'll find some time to look into the issue. Your assistance in this matter is much appreciated, Cheers, Brent

    (1-2/2)

    Please register to reply