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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1182)
- Stylus Studio Technical Forum (14569)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-> + Problem with SAXO processor - ... (5)
-> + PDF Format Help (4)
-> + License check unreliable (2)
-> - XML related issue (1)
-> + Need help regarding pipeline o... (2)
-> + Error converting XML to EDIFAC... (4)
-> + XSLT Profiling for XSLT 1.0 s... (2)
-> + Grouping (2)
-> + Best Practice for Pipeline err... (2)
-> + pdf generation (4)
-> + Problems excuting a Pipeline w... (2)
-> + XML serializer (3)
-> + Supported EDIFACT versions (5)
-> - Anyone know XActimate ESX file... (1)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (247)
+ XSLT Help and Discussion (7617)
+ XQuery Help and Discussion (1966)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Doug HoopleSubject: XQuery debugger java exception
Author: Doug Hoople
Date: 04 Aug 2005 05:39 PM
Hi,

I'm evaluating Stylus Studio Professional, downloaded today. My primary reason for evaluating is to be able to do XQuery debugging with the Saxon parser (owing to heavy use of the saxon:evaluate() extension). I have Saxon 8.4 selected in the scenario processor dropdown.

But when I tried to call up the Variables window, I received a "class java.lang.NullPointerException. Now when I run with a breakpoint, I get the same exception every time, with the following in the output window:

com.stylusstudio.debugger.utils.UserStopException: XQuery Processing has been stopped
at com.stylusstudio.debugger.saxon.DebugRemote.sendNotification(DebugRemote.java:221)
at com.stylusstudio.debugger.saxon.DebugRemote.sendError(DebugRemote.java:176)
at com.stylusstudio.debugger.saxon.DebugTracer.sendError(DebugTracer.java:96)
at com.stylusstudio.debugger.saxon.CSaxonXQueryDriver.run(CSaxonXQueryDriver.java:170)
at java.lang.Thread.run(Unknown Source)

I'm sure it's something quirky in my Java runtime environment (J2SE1.4 at this stage). My machine's littered with all sorts of jartifacts. I also have both your competitors stuff installed, too (neither of which will debug with a 3rd party XQuery processor).

Any thoughts? I'm keeping my fingers crossed, and I'm rooting for you guys!

Doug Hoople

Postnext
Ivan PedruzziSubject: XQuery debugger java exception
Author: Ivan Pedruzzi
Date: 04 Aug 2005 06:22 PM
Hi Doug,

Could you post a sample (XQuery + XML) that produces the problem?
Which Stylus Studio build are you running?

Ivan Pedruzzi
Stylus Studio Team

Postnext
Doug HoopleSubject: XQuery debugger java exception
Author: Doug Hoople
Date: 04 Aug 2005 07:44 PM
Hi Ivan,

Good call. I was in such a hurry to try my own stuff out, I didn't test against the samples. The variables window works with the samples. I just assumed it was my Java environment, and not the XML.

My XML is a little involved, so I'll try to isolate things and pare it down to something manageable before I submit it.

Thanks.
Doug

Postnext
Doug HoopleSubject: XQuery debugger java exception
Author: Doug Hoople
Date: 04 Aug 2005 08:24 PM
Hi Ivan,

I've trimmed down my XML to a reasonable size, and in the process have had to toggle back and forth between the Saxon processer and the built-in, because the only error report I got back from Saxon was something generic like "static error in evaluating query" or something like that. This indicates that in debug, the Saxon parser barfs and doesn't say what's wrong. When run in preview, it does the same. To find out what's going on, it requires restoring the built-in for long enough to fix the problem.

Of course, when I switch, the first thing I encounter is the dreaded 'namespace saxon unrecognized' error that I was coming to you to avoid in the first place.

Sorry, but the debugger with Saxon isn't ready for prime time, at least not for full-time use.

Thanks anyway.
Doug

Postnext
Tony LavinioSubject: XQuery debugger java exception
Author: Tony Lavinio
Date: 05 Aug 2005 09:55 AM
There are a few other things to try.

1. Do View|Output Window; this will often show additional diagnostic
information about the problem.

2. Can you tell us which release you are on?

3. Does running Saxon8 from the command line give a different diagnostic?
We've been working with Michael Kay to constantly improve the debugging
interface between Saxon and Stylus, and would really like to be able to
find a way to solve this for all of us.

If you wish, you can send the files to stylus-field-report (at) stylusstudio.com, and the engineering team will take a look at it ASAP.

Postnext
Doug HoopleSubject: XQuery debugger java exception
Author: Doug Hoople
Date: 05 Aug 2005 12:13 PM
Look, not to put too fine a point on it, your marketing literature claims that you're the only IDE with debugging support for third-party XQuery processors. You're not. Not really. Not yet. Because the support provided is no better than not having the feature at all. If that's a difficulty that's simply inherited from the problem domain of integrating unlike products, then that's one thing, but you shouldn't be making claims to have solved a problem that hasn't been solved.

You can get any of your developers to write just about anything in XQuery from scratch, and in the process of bumping into things as simple as syntax errors, you'll have so little information about what's going on, you'll scream. I doesn't take much of a flaw to get the whole thing to go belly up. A simple QA cycle with just about any script still under active development should have turned this up, so please don't ask me for diagnostics.

The build was whatever was on the Professional evaluation download queue yesterday, Thursday, August 4, 2005.

Maybe it's just that particular build that introduced a single, simple regression that caused the whole 'third party integration' feature to fail. I suspect, though, that it's really a case of an advertised feature not being ready.

I hope I'm wrong, because the world's ready for this to work. I certainly am.

Good luck to you in your efforts.

Postnext
Ivan PedruzziSubject: XQuery debugger java exception
Author: Ivan Pedruzzi
Date: 05 Aug 2005 06:13 PM

Everybody is entitled to his opinions, so let me share mine.

It seems like you came to the conclusion that Saxon support is useless because of a defect, we would really appreciate if you could produce a test case.

Regarding QA, Stylus Studio has to pass a test suite that takes more then 50 hours before going into production that includes thousands of tests. For each reproducible defect a new test is designed and added to the suite.

In the mean while in the last year developers around the world have been successfully using Stylus Studio and Saxon for debugging their queries and XSLTs.

The SSDN forum amply illustrates the Stylus Studio team's willingness to listen to our users' complaints and suggestions about our product, and to respond with Stylus Studio updates containing fixes and enhancements on a timely basis.

The XQuery specification started to settle down just recently and the implementations have been evolved to catch up; nevertheless Saxon XQuery (and XSLT2) integration even if not perfect already delivers great benefits: step by step execution, watch points, profiling, back-mapping.

Our collaboration with Dr. Michael Key is the testimony of our ongoing effort to improve the synergy between the two products.


Regards
Ivan Pedruzzi
Stylus Studio Team

Postnext
Doug HoopleSubject: XQuery debugger java exception
Author: Doug Hoople
Date: 05 Aug 2005 09:00 PM
It's a pretty big defect then, so you have to forgive me. If developers all over the world are using this debugger with this XQuery processor, then I've stumbled into some weird corner case. It's hard to imagine, though.

I'm been unable to set a breakpoint or step into the simplest of queries. Like the following:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<
declare namespace dd = "urn:thisisatest";
declare function dd:testing123( $input as xs:string ) as xs:string
{
"testing123"
};

<x>{dd:testing123("something really simple")}</x>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<

I'm an XQuery newbie, so I may have done something really stupid, but this seems pretty straightforward to me. I still get a NullPointerException when I try to set a breakpoint. Like I said, maybe you've just had a whopper of a regression in this build (377, by the way).

The Output window shows the following exception information:

com.stylusstudio.debugger.utils.UserStopException: XQuery Processing has been stopped
at com.stylusstudio.debugger.saxon.DebugRemote.sendNotification(DebugRemote.java:221)
at com.stylusstudio.debugger.saxon.DebugRemote.sendError(DebugRemote.java:176)
at com.stylusstudio.debugger.saxon.DebugTracer.sendError(DebugTracer.java:96)
at com.stylusstudio.debugger.saxon.CSaxonXQueryDriver.run(CSaxonXQueryDriver.java:170)
at java.lang.Thread.run(Unknown Source)

When I run the Saxon parser from the command line, it executes fine, but seems to complain a bit about the namespace declaration (I fiddled with a couple of format variants and got the same results). I get the following:

D:\XQuery>java net.sf.saxon.Query -T -TJ testing234.xquery
Loading urn:thisisatest
No Java class urn:thisisatest could be loaded
<trace saxon-version="8.4" >
<element name="x" line="7" column="1" module="testing234.xquery">
<function name="dd:testing123" line="2" column="1" module="testing234.xquery">

</function>
</element>
</trace>
<?xml version="1.0" encoding="UTF-8"?>
<x>testing123</x>
D:\XQuery>

I have to admit that having the trace feedback from the command line gives me more information to work with, and makes the situation a bit more bearable. I was at least able to ascertain what my errors were in cleaning up my syntax problems.

Still, from within Stylus Studio, I can't step, I can't break, I can't watch. I hope you're right, and that it's simply a defect. Ideally, I'll have done something really obvious and stupid, for which there's a simple workaround. It would also not be so bad if it were something for which the fix is relatively trivial. I just don't understand how I'm the only developer in the world who's had the misfortune to step into this one, seeing how basic it is. Just my luck.

Thanks.
Doug Hoople

Postnext
Ivan PedruzziSubject: XQuery debugger java exception
Author: Ivan Pedruzzi
Date: 05 Aug 2005 10:10 PM
The problem seems to arise when the "Variables" window is visible.

To avoid the error do the following

- Switch to the built-in processor.
- Set a break point and hit F5.
- When the execution is suspended turn off the Variables window.
- Switch back to Saxon now you should be able to debug.
To inspect variable values use the Watch Window instead.

Note that the query you posted gets optimized by Saxon replacing the function call with the function body (in-line optimization) so if you set a break point in the function it will never break.

The problem will be fixed in the next update.


Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Doug HoopleSubject: XQuery debugger java exception
Author: Doug Hoople
Date: 06 Aug 2005 01:50 AM
Being able to break and see what my function is doing is a pretty critical element of debugging. I know that XQuery isn't a traditional programming language, but the traditionals have an option for turning off optimization for the purpose of being able to debug what's apparent to the human eye.

Again, I know I'm asking a lot, but you'd have to admit that I'm not asking for much, no? :-)

Thanks.
Doug

Postnext
Doug HoopleSubject: XQuery debugger java exception
Author: Doug Hoople
Date: 06 Aug 2005 01:50 AM
BTW, thanks for a quick response!

I'm still rooting for you guys.

Doug

Postnext
Doug HoopleSubject: XQuery debugger java exception
Author: Doug Hoople
Date: 06 Aug 2005 01:58 AM
You're absolutely right, the submitted snippet was downright trivial. That was as intended, since the task was to provide an easily reproducible scenario. Had it been a real emergency, I would have told you where to go... :-)

Postnext
Tony LavinioSubject: XQuery debugger java exception
Author: Tony Lavinio
Date: 08 Aug 2005 01:55 PM
Thank you for the snippet; a fix will be in the next patch release.
The problem, in case you're curious, was a case of minor stupidity.
In order to catch the case where an object being serialized was null
or an unexpected class, there was an exception clause. But in the
exception message, a reference was made to the object's .getClass()
method, which of course would cause an NPE.
This is what happens sometimes when you try for the "belt AND suspenders"
approach. :)

Posttop
Doug HoopleSubject: XQuery debugger java exception
Author: Doug Hoople
Date: 08 Aug 2005 02:59 PM
Hi Everyone,

You already knew this, but it works!

Once I closed the Variables window running the debugger with the built-in processor, as you instructed for the workaround, I was finally able to debug with the Saxon processor. Sweet!

Now that I've got a little more context, and I know what piles not to step in, everything's sorta-mostly as it's supposed to be. I'll be glad to get the Variables window back, though.

Thanks again for your help in getting me up and running. Y'all are GOOD!

Doug

   
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.