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
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext 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.

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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.