https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2019-03-29T07:39:00ZSaxonica Developer CommunitySaxon - Support #4184: Error: Invalid configuration property extensionFunctionhttps://saxonica.plan.io/issues/4184?journal_id=134402019-03-29T07:39:00ZMartin Honnenmartin.honnen@gmx.de
<ul></ul><p>Does it work if you use <code>public class ShiftLeft ...</code>? I think that's what the error message is trying to tell, that the class is not available as the default (i.e. non modifier instead of an explicit <code>public</code>) doesn't make such a class available in a different package.</p> Saxon - Support #4184: Error: Invalid configuration property extensionFunctionhttps://saxonica.plan.io/issues/4184?journal_id=134412019-03-29T12:40:16ZKenneth Hughes
<ul></ul><p>Martin Honnen wrote:</p>
<blockquote>
<p>Does it work if you use <code>public class ShiftLeft ...</code>? I think that's what the error message is trying to tell, that the class is not available as the default (i.e. non modifier instead of an explicit <code>public</code>) doesn't make such a class available in a different package.</p>
</blockquote>
<p>Hi Martin, good idea, and I believe you're right that the class access modifier should be <code>public</code> to be visible outside of its package. However, I'd done that to no avail in in my original code. The simplified variation I posted was the one with <code>ShiftLeft</code> exactly as provided in the <a href="http://www.saxonica.com/html/documentation/extensibility/integratedfunctions/ext-full-J.html" class="external">documentation</a>, and making the class <code>public</code> is not working in the simplified example either.</p> Saxon - Support #4184: Error: Invalid configuration property extensionFunctionhttps://saxonica.plan.io/issues/4184?journal_id=134422019-03-29T12:50:31ZKenneth Hughes
<ul></ul><p>Ahh, but that does lead me to try taking <code>ShiftLeft</code> out of the package I put it in, and with that change, the extension function is found. Thanks, Martin!</p>
<p>I'm still unclear as to why as a <code>public</code> class <code>ShiftLeft</code> is not found when placed in a package.</p> Saxon - Support #4184: Error: Invalid configuration property extensionFunctionhttps://saxonica.plan.io/issues/4184?journal_id=134572019-04-02T21:41:07ZMichael Kaymike@saxonica.com
<ul></ul><p>You're not talking about Java 9 modules are you? If so, we have no experience with them; I've no idea how dynamic loading will work.</p>
<p>Martin correctly identified the original problem, that the class was not public, which meant it could not be dynamically loaded.</p>
<p>You say it doesn't work when you change the class to public but does when you take the class out of the package (and put it in a different package?) I can't see why that should be, and it seems to be doing exactly what our test cases do, so I think I will need more information about exactly what you are doing and exactly how it is failing. It might be a good idea to switch on some of the Java command line options that trace class loading, this may give better diagnostics.</p> Saxon - Support #4184: Error: Invalid configuration property extensionFunctionhttps://saxonica.plan.io/issues/4184?journal_id=134632019-04-08T14:55:47ZKenneth Hughes
<ul></ul><p>No, wasn't talking about Java 9 modules.</p>
<p>Yes, main issue was that the extension class was not public.</p>
<p>Secondary issue I'm no longer able to reproduce -- may have been a build problem on my side. All's well now.</p>
<p>Thanks Martin and Michael.</p> Saxon - Support #4184: Error: Invalid configuration property extensionFunctionhttps://saxonica.plan.io/issues/4184?journal_id=139422019-08-13T17:42:03ZMichael Kaymike@saxonica.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>Closing this thread as the issue seems to have been resolved.</p>