Page 1 of 1

XQuery plugin not validating Java extensions

Posted: Fri Oct 21, 2005 10:24 pm
by spopescu
Hi,

I am trying to get the clipse plugin to work for XQuery validation. The problem is that if I have a Java class referenced from the XQuery, like:

declare namespace ju="java:com.a.b.c.XQueryUtils";
....
<adress>{ju:ipToString($address)}</address>

gives the following error when validating the XQuery file:

"Cannot find a matching 1-argument function named {java:com.a.b.c.XQueryUtils}ipToString() ... "

The java class is on the project's classpath.

It works when running standalone oXygen.

TIA,

Serban

Posted: Mon Oct 24, 2005 11:28 am
by george
Hi Serban,

Have you added your class in the classpath for the oXygen standalone, for instance have you placed the jar containing the class in the oXygen lib folder?
To add something in the classpath for the Eclipse plugin you need also to edit the plugin.xml file and add a library entry in the runtime section pointing to that jar then restart Eclipse making sure you pass -clean in the Eclipse command line.

Best Regards,
George

Posted: Mon Oct 24, 2005 5:41 pm
by spopescu
Hi George,

Thanks for the answer. I need to add a java class to the classpath of the plugin, not a jar. How can I do that?

Thanks,
Serban

Posted: Mon Oct 24, 2005 5:59 pm
by george
Hi Serban,

You need to add then the folder that contains the class, if the class specifies a package then you need to add the folder that contains the first package folder, for instance if your class is in com/a/b/test.class then you need to add the parent folder of com. The [oXyge]/lib folder is already added so you can also copy the com/a/b/test.class in the [oXygen]/lib folder where [oXygen] is the oXygen plugin folder, the one that contains the plugin.xml descriptor file.

Best Regards,
George