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 (1192)
- Stylus Studio Technical Forum (14621)
-> + XPath documentation confusion (2)
-> + Extra block/CR generated (6)
-> + Apache FOP (2)
-> + Inserting Java Script (2)
-> + Convert EDIFACT to X12 or vice... (6)
-> + XSD: Restricting an attribute ... (2)
-> + Creating dynamically named ele... (2)
-> + Report reverts back to XHTML-C... (2)
-> + Certificate error (7)
-> + Opening DITA files and associa... (4)
-> + Cannot see links from source d... (10)
-> + SS 2007 vs. SS 2008 calling a ... (3)
-> + Unable to compile java file (8)
-> + Unable to use xsi:type attribu... (2)
-> + Unable to save xslt file after... (5)
-> + .NET XslTransform Compiled out... (3)
-> + Reporting Comparison (2)
-> + problems setting up the fonts ... (3)
-> + XML conversion (5)
-> + XQUERY: Application Crash (3)
-- Previous [1321-1340] [1341-1360] [1361-1380] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Vincent De GrooteSubject: Exception in generated java code
Author: Vincent De Groote
Date: 07 Sep 2007 07:07 AM
Hello,

I'm new with Stylus Studio and Java. I've build a pipeline which runs successfully when invoked from Stylus Studio. When I generate the java code, the compilation is successfull, but the program ends on a null pointer exception:

Exception in thread "main" com.stylusstudio.xmlpipeline.runtime.PipelineException: main: exception during init().
at com.stylusstudio.xmlpipeline.runtime.AbstractOperation.conditionalInit(AbstractOperation.java:102)
at com.stylusstudio.xmlpipeline.runtime.AbstractOperation.go(AbstractOperation.java:77)
at com.stylusstudio.xmlpipeline.runtime.AbstractPipeline.go(AbstractPipeline.java:273)
at test.main(test.java:35)
Caused by: java.lang.NullPointerException
at com.stylusstudio.xmlpipeline.runtime.DDXQCollectionSet.add(DDXQCollectionSet.java:37)
at test.init(test.java:74)
at com.stylusstudio.xmlpipeline.runtime.AbstractOperation.conditionalInit(AbstractOperation.java:97)
... 3 more


Documenttest.pipeline
The pipeline

Unknownselect_from_db.xquery
xquery

Unknowntest(2).xslt
xslt file

Postnext
(Deleted User) Subject: Exception in generated java code
Author: (Deleted User)
Date: 10 Sep 2007 04:24 PM
Vincent,

Sorry for the delay.

You seem to have found a bug in my code.
The generated java file contains a line like this:
m_DDXQCollectionSet.add("sqlserver_null_localhost1433", "jdbc:xquery:sqlserver://localhost:1433", null, "", true, "full");

The collection url in your xquery seems to be missing a userid. It is a little bit of a mystery to us right now how that could happen.
Our first question is: Are you using Windows integrated security to access the database, or the builtin database security?

If you are using Windows integrated security, the jdbc: url should contain a field AuthenticationMethod=Type2

If you are not using Windows integrated security, then you must supply a userid when you first connect to the database using the Stylus Studio file explorer docking windows.

We would like to know exactly how you are connecting to the database in Stylus Studio.

Anyway, as a temporary workaround to fix the java program, you can replace the first null parameter with a valid userid like this:

m_DDXQCollectionSet.add("sqlserver_null_localhost1433", "jdbc:xquery:sqlserver://localhost:1433", "myuserid", "", true, "full");

, or replace it with "" and add the ;AuthenticationMethod=Type2 field to the jdbc url in the java file. It will look something like this:

m_DDXQCollectionSet.add("sqlserver_null_localhost1433", "jdbc:xquery:sqlserver://localhost:1433;AuthenticationMethod=Type2", "", "", true, "full");

Please let us know how this works out so we can fix our code generator

Thanks very much.
Clyde Kessel
Stylus Studio development team.

Posttop
Vincent De GrooteSubject: Exception in generated java code
Author: Vincent De Groote
Date: 12 Sep 2007 04:14 AM
I was using the Windows authentication mode. I didn't need to provide any userid/password when using Stylus Studio at the logon/password just push ENTER in the dialog box).
Now I switched to sql server authentication, providing a userid, and everything works without problems.

   
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.