XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Steven FancherSubject: External Java class problems
Author: Steven Fancher
Date: 22 Mar 2006 12:40 PM
Originally Posted: 22 Mar 2006 12:29 PM
I know this has been beaten to death, but having read the forms - I am still at a loss: Here's the data, First the java decl and reference from the query... declare namespace util ="java:QueryHelpers"; let $DNSAddress := util:resolveForwardDNS($hostname) let $reverse := util:resolveReverseDNS($loopback) * When I run this in an external saxon parser - it works like a charm. * When I run it under StylusStudio (using either built-in or saxon) it fails! The screen shots of the errors, the project classpath and the java classes in the /bin directory are are attached of they are helpful at all. Thanks in advance!! -Steven


ImageBuilt-in(1).jp2
Built-in error

Imagesaxon(1).jp2
Saxon Error

ImageCodepath(1).jp2
Project Classpath

DocumentQueryHelpers.class
Main Java Class

DocumentIpAddressException.class
Java Exception class uses by main class

Postnext
Ivan PedruzziSubject: External Java class problems
Author: Ivan Pedruzzi
Date: 22 Mar 2006 12:59 PM
Hi Steven,

Could you please post the QueryHelpers.java source?

Thank You
Ivan Pedruzzi
Stylus Studio Team

Postnext
Steven FancherSubject: External Java class problems
Author: Steven Fancher
Date: 23 Mar 2006 03:46 PM
Originally Posted: 23 Mar 2006 03:45 PM
oops - posted the classes instead of the source<br> <br> Source attached Thanks for the reply - this oune has me stumpped!


UnknownQueryHelpers.java


UnknownIpAddressException.java

Postnext
Minollo I.Subject: External Java class problems
Author: Minollo I.
Date: 22 Mar 2006 01:02 PM
Right click on your project root and select "Set classpath"; include the folder where your .class files are in the classpath. The query should work at that point.

I did try it, and it worked fine for me.
Minollo

Postnext
Steven FancherSubject: External Java class problems
Author: Steven Fancher
Date: 23 Mar 2006 03:48 PM
Tried it no go...when you said you tried it did you try it with my class files?

Postnext
Ivan PedruzziSubject: External Java class problems
Author: Ivan Pedruzzi
Date: 23 Mar 2006 04:01 PM
Steven,

You are right 7.1 doesn't let you run Saxon XQuery using java extension. This has been fixed in the upcoming 7.2

You can still use the built-in XQuery processor with slightly different syntax. Unfortunalty extension function binding is not part of the standard so each processor has its own way.

Here is an example

declare namespace util ="class:QueryHelpers";
declare function util:resolveForwardDNS($s as xs:string) external;

let $r := util:resolveForwardDNS('pedruzzi.com')
return $r

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Steven FancherSubject: External Java class problems
Author: Steven Fancher
Date: 26 Mar 2006 11:23 AM
Yes It helped Greatly!!

Too bad about not being able to do the java call from StylusSytudio directly... I use it to develop and test queries that I run through saxon via a java process.

Thanks again!

Postnext
Ivan PedruzziSubject: External Java class problems
Author: Ivan Pedruzzi
Date: 26 Mar 2006 02:40 PM
Steven,

If you truly need this feature, Stylus Studio 7.2 ia already available for download

http://www.stylusstudio.com/xml_download.html

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Steven FancherSubject: External Java class problems
Author: Steven Fancher
Date: 26 Mar 2006 03:24 PM
Thanks - is it stable enough for production use and can I cantinue to run the current version with it installed?

Postnext
Ivan PedruzziSubject: External Java class problems
Author: Ivan Pedruzzi
Date: 26 Mar 2006 04:49 PM
>Thanks - is it stable enough
>for production use and can I

It passed formal QA.

>cantinue to run the current
>version with it installed?

7.2 can run side by side with 7.1

Ivan Pedruzzi
Stylus Studio Team

Postnext
David KarrSubject: RE: External Java class problems
Author: David Karr
Date: 27 Mar 2006 02:27 PM
When I view the "About" dialog, I don't see anything that says version
7.1 or 7.2. It just says "Stylus Studio 2006 XML Enterprise Edition",
build 501i.

What is the difference between Stylus Studio 7.[12] and what I have?

> -----Original Message-----
> From: stylus-studio-xquery Listmanager
> [mailto:stylus-studio-xquery.listmanager@stylusstudio.com]
>
> From: Ivan Pedruzzi
>
> >Thanks - is it stable enough
> >for production use and can I
>
> It passed formal QA.
>
> >cantinue to run the current
> >version with it installed?
>
> 7.2 can run side by side with 7.1
>
> Ivan Pedruzzi
> Stylus Studio Team

Postnext
Minollo I.Subject: RE: External Java class problems
Author: Minollo I.
Date: 27 Mar 2006 02:35 PM
Sorry, 7.2 is the internal name for "2006 Release 2"; BL501 is "2006 (Release 1)".

You can download "2006 Release 2", BL591, from http://www.stylusstudio.com/download

Minollo

Postnext
David KarrSubject: RE: External Java class problems
Author: David Karr
Date: 27 Mar 2006 02:42 PM
Ok. Why does the "Check for latest version" operation tell me I'm using
the latest version?

> -----Original Message-----
> From: stylus-studio-xquery Listmanager
> [mailto:stylus-studio-xquery.listmanager@stylusstudio.com]
> Sent: Monday, March 27, 2006 11:38 AM
> Subject: RE: External Java class problems
>
>
> From: Minollo I.
>
> Sorry, 7.2 is the internal name for "2006 Release 2"; BL501
> is "2006 (Release 1)".
>
> You can download "2006 Release 2", BL591, from > href="http://www.stylusstudio.com/download">http://www.styluss
> tudio.com/download

>
> Minollo
>
>
>
> --
> To reply: mailto:stylus-studio-xquery.14461@stylusstudio.com
> To start a new topic: mailto:stylus-studio-xquery@stylusstudio.com
> To login: http://www.stylusstudio.com/SSDN/
> To (un)subscribe:
> mailto:stylus-studio-xquery.list-request@stylusstudio.com
>
>

Postnext
Minollo I.Subject: RE: External Java class problems
Author: Minollo I.
Date: 27 Mar 2006 02:58 PM
We will trigger the new version update notification later this week, when marketing formally launches the new release.

Minollo

Posttop
Steven FancherSubject: External Java class problems
Author: Steven Fancher
Date: 27 Mar 2006 02:49 PM
Thanks Ivan I will give it a spin!!

-Steven Fancher

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.