XQuery plugin not validating Java extensions

Having trouble installing Oxygen? Got a bug to report? Post it all here.
spopescu
Posts: 14
Joined: Fri Sep 30, 2005 1:55 am

XQuery plugin not validating Java extensions

Post 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
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
spopescu
Posts: 14
Joined: Fri Sep 30, 2005 1:55 am

Post 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
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
Post Reply