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 ViscontiSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Vincent Visconti
Date: 23 Feb 2005 02:54 PM
Hello,

I am currently evaluating the Stylus Studio software, I am attempting to generate an XML document via mapping data from my AS/400 relational database to an XML schema. However, I am experiencing problems when SS attempts to connect to the AS/400.

I have an ODBC System DSN that I am referencing in the DataDirect SequeLink 5.4 Snapin (per the "Configuring an ODBC Data Source Using DataDirect SequeLink Server" Tutorial)

I receive the following message: String index out of range: 4

Details of error message:
java.lang.StringIndexOutOfBoundsException: String index out of range: 4

at java.lang.String.substring(Unknown Source)
at ZC.jxtr.JXTRLicense.getConnectionType(Unknown Source)
at ZC.jxtr.JXTRLicense.<init>(Unknown Source)
at ZC.jxtr.JXTRLicense.createJXTRLicense(Unknown Source)
at ZC.jdbc.jxtr.JXTRDriverConnection.<init>(Unknown Source)
at ZC.jdbc.jxtr.JXTRDriverConnectionSequeLink.<init>(Unknown Source)
at ZC.jdbc.jxtr.JXTRDriverLoaderSequeLink.NewJXTRDriverConnectionSequeLink(Unknown Source)
at ZC.jdbc.jxtr.JXTRDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.stylusstudio.DataDirectStub.connect(DataDirectStub.java:130)
at com.stylusstudio.DataDirectStub.getConnection(DataDirectStub.java:399)


Please advise.

Thank you,
Vincent

Postnext
Ivan PedruzziSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Ivan Pedruzzi
Date: 23 Feb 2005 03:29 PM
Hi Vincent,

Stylus Studio supports DB2(1) natively, you should't need sequelink.

Regarding the error, could you post the database URL you are using
and the Stylus Studio version?

Hope this helps
Ivan

1:http://www.stylusstudio.com/doc/jdbcug.pdf

Postnext
Vincent ViscontiSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Vincent Visconti
Date: 23 Feb 2005 03:39 PM
Thanks for the quick reply. Attached is the information you requested. Can you give me an example of a database URL I would use to connect to an AS/400. If needed, AS/400 Version is V5R2.

Thank you,
Vincent


>Hi Vincent,
>
>Stylus Studio supports DB2(1)
>natively, you should't need
>sequelink.
>
>Regarding the error, could you
>post the database URL you are
>using
>and the Stylus Studio version?
>
>Hope this helps
>Ivan
>
>1:http://www.stylusstudio.com/
>doc/jdbcug.pdf
>


DocumentStylusStudio1.doc
Stylus Studio Info

Postnext
Ivan PedruzziSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Ivan Pedruzzi
Date: 23 Feb 2005 04:14 PM
To use DB2 select IBM DB2 as Database type; the URL should look like this

//localhost:50000;locationName=;collectionId=;packageName=

Take a look to your ODBC data source settings
to figure out the parameter value to pass

In my previous post I also pointed to the JDBC user guide
to have a better understanding of Stylus Studio DB2 support.

Ivan

Postnext
Vincent ViscontiSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Vincent Visconti
Date: 24 Feb 2005 11:34 AM
Ivan,

I am still experiencing difficulty in connecting to my database on the AS/400. I have been going through the documentation you sent me yesterday, however, it really hasn't been that helpful. It references tools that I don't have (i.e. DataDirect Test, DataDirect DB2 Package Manager). I assume this is because we are only privliged to a subset of the DataDirect functionality (This makes using their documentation very difficult). So, I've being trying to establish a connection using a connection string, however I don't fully understand the the parameter meanings (documentation is not very clear with the definitions given) and what might be valid values. Below is a list of the parameters and values I am trying to use, maybe you can give me some pointers on what I might be doing wrong.

Server URL: //BIJOUX;locationName=Z_VMV;collectionId=DEFAULT;packageName=JDBCPKG;CreateDefaultPackage=TRUE
//BIJOUX; Name of my AS/400 (I tried using the IP address, specifying ports, get the same error message every time)
locationName=Z_VMV; Library on AS/400 where the tables I want to convert to XML exist?
collectionId=DEFAULT; Not really sure what this value should be?
packageName=JDBCPKG;
CreateDefaultPackage=TRUE Set to true for initial connection, set to false thereafter

I keep getting the following error message:
java.sql.SQLException: [StylusStudio][DB2 JDBC Driver]Error establishing socket. Connection refused: connect
at ZC.jdbc.jxtr.JXTRDriverConfig.translateSQLException(Unknown Source)
at ZC.jdbc.jxtr.JXTRDriverConfig.createSQLException(Unknown Source)
at ZC.jdbc.jxtr.JXTRDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.stylusstudio.DataDirectStub.connect(DataDirectStub.java:130)
at com.stylusstudio.DataDirectStub.getConnection(DataDirectStub.java:399)

I was thining this was a security issue on the AS/400 side, but my admin gave me full authority to EVERYTHING.

I'm totally stumped... Please help.

Thank you,
Vincent

>To use DB2 select IBM DB2 as
>Database type; the URL should
>look like this
>
>//localhost:50000;locationName
>=;collectionId=;packageName=
>
>Take a look to your ODBC data
>source settings
>to figure out the parameter
>value to pass
>
>In my previous post I also
>pointed to the JDBC user guide
>to have a better understanding
>of Stylus Studio DB2 support.
>
>Ivan
>

Postnext
Ivan PedruzziSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Ivan Pedruzzi
Date: 24 Feb 2005 04:44 PM
Vincent,

From the error it seems that the host adress or port is wrong (Error establishing socket. Connection refused: connect)
could you verify that host name and port are correct?

Ivan

Postnext
Vincent ViscontiSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Vincent Visconti
Date: 24 Feb 2005 05:40 PM
Ivan,

I obtained the host name from another application (see attached) that connects to the AS/400 database(succesfully), the port number is optional and left blank.

I tried to mirror these settings in the connection string, but there are certain parameters that do not relate.

Thanks,
Vincent


DocumentStylusStudio2.doc

Postnext
Ivan PedruzziSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Ivan Pedruzzi
Date: 25 Feb 2005 09:58 AM
Vincent

Here is a more accurate analysis from DB2 JDBC Driver support team

When connecting to the AS/400 DataDirect DRDA driver will always connect to port 446.
There are several drivers for the AS/400 available that are not a DRDA driver and therefore
connect to a different port.

Here are some details that may be helpful when connecting to the AS/400

Tcp Port: The port number for the DRDA listener on the AS/400 is 446.
DRDA is the communicating protocol for communicating with DB2.
To verify the correct port number, execute 'NETSTAT' from an AS/400 command line.
Chose option 3 to display a list of active ports on the AS/400.
Find the entry for DRDA and press F-14 to toggle the display the port number.
If DRDA is not currently listening, the AS/400 command "CHGDDMTCPA AUTOSTART(*YES) PWDRQD(*YES)"
will start the listener and ensure that it will be active at IPL.

Location Name: The name of the relational database (RDB) on your AS/400.
The AS/400 command "WRKRDBDIRE" will provide you with a list of possible values for this setting.
The name of the relational database that is listed as *LOCAL will be what you want to provide the driver for this parameter.

Postnext
Vincent ViscontiSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Vincent Visconti
Date: 25 Feb 2005 10:48 AM
Hi Ivan,

I verified that the DRDA port (446) is listening and the local DB name is BIJOUX.
Using the connection URL: //BIJOUX:446;locationName=BIJOUX;collectionId=DEFAULT;packageName=JDBCPKG;CreateDefaultPackage=TRUE
I get the following error:

java.sql.SQLException: [StylusStudio][DB2 JDBC Driver]Unsupported VM encoding Cp500.
at ZC.jdbc.jxtr.JXTRDriverConfig.translateSQLException(Unknown Source)
at ZC.jdbc.jxtr.JXTRDriverConfig.createSQLException(Unknown Source)
at ZC.jdbc.jxtr.JXTRDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.stylusstudio.DataDirectStub.connect(DataDirectStub.java:130)
at com.stylusstudio.DataDirectStub.getConnection(DataDirectStub.java:399)


I also tried substituting the ip address for the server name, I get the same error.

Thanks for your help so far, I hope we are able to resolve this issue.
Vincent

Postnext
Ivan PedruzziSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Ivan Pedruzzi
Date: 25 Feb 2005 11:04 AM

This is easy to solve

You are missing the JVM encoding libraries.
When installing the java virtual machine you need select support
for international languages.

Ivan


Postnext
Vincent ViscontiSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Vincent Visconti
Date: 25 Feb 2005 11:37 AM
Ivan,

Mission accomplished...

Thanks for all your help,
Vincent

Postnext
John pelletierSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: John pelletier
Date: 18 Oct 2007 03:46 PM
Hello, I'm having this exact same problem, except I'm not able to get to the mission accomplished stage. How do I reinstall the JVM encoding libraries?

Postnext
Ivan PedruzziSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Ivan Pedruzzi
Date: 18 Oct 2007 04:08 PM

Re-install the Java JRE and tick on "Additional Languages".

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
John pelletierSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: John pelletier
Date: 18 Oct 2007 04:27 PM
Hi Ivan, I never installed the "Java JRE". Sorry for sounding like a dope but all I did was download your software and I'm trying to get at my 400..ooops, iSeries. Are the any docs on what I need to do?

Thanks

Postnext
Ivan PedruzziSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Ivan Pedruzzi
Date: 18 Oct 2007 04:53 PM

Hi John,

Stylus Studio requires the Sun Java Virtual Machine in order to use the database connectivity.

Your system has Java already installed but unfortunately the default installation doesn't contain the "Additional Languages" support.

In order to get the Sun JRE installation visit
http://java.sun.com/javase/downloads/index.jsp

The fourth link going down is where you need to click

Once you have downloaded and run the Java installer, see the screenshot in my previous message, go to Stylus Studio then click
Tools -> Options -> Java Virtual Machine and click auto-detect.

Restart Stylus Studio and at that point you should be able to connect.

Ivan Pedruzzi
Stylus Studio Team

Postnext
John pelletierSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: John pelletier
Date: 19 Oct 2007 07:55 AM
We're gaining on it, but now I have a different error:

java.sql.SQLException: [XQuery][DB2 JDBC Driver][DB2]QSYS.DEFAULT IS AN UNDEFINED NAME

at com.ddtek.xquery.jdbc.base.BaseExceptions.createException(Unknown Source)

at com.ddtek.xquery.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.ddtek.xquery.jdbc.db2.drda.DRDARequest.processSQLCA(Unknown Source)

at com.ddtek.xquery.jdbc.db2.drda.DRDARequest.processCodePoint(Unknown Source)

at com.ddtek.xquery.jdbc.db2.drda.DRDABindRequest.processCodePoint(Unknown Source)

at com.ddtek.xquery.jdbc.db2.drda.DRDARequest.processReply(Unknown Source)

at com.ddtek.xquery.jdbc.db2.DB2PackageManager.createPackageSet(Unknown Source)

at com.ddtek.xquery.jdbc.db2.DB2PackageManager.initialize(Unknown Source)

at com.ddtek.xquery.jdbc.db2.DB2ImplConnection.open(Unknown Source)

at com.ddtek.xquery.jdbc.base.BaseConnection.connect(Unknown Source)

at com.ddtek.xquery.jdbc.base.BaseConnection.setupImplConnection(Unknown Source)

at com.ddtek.xquery.jdbc.base.BaseConnection.open(Unknown Source)

at com.ddtek.xquery.jdbc.base.BaseDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at com.stylusstudio.DataDirectDDXQStub.connect(DataDirectDDXQStub.java:76)

at com.stylusstudio.DataDirectDDXQStub.getConnection(DataDirectDDXQStub.java:111)



//172.16.1.2:446;locationName=INTERPAK;collectionId=DEFAULT;packageName=JDBCPKG;CreateDefaultPackage=TRUE

I'm getting to the server because I can see 446 listening, and being hit.

Thanks for your help.

Postnext
Ivan PedruzziSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Ivan Pedruzzi
Date: 19 Oct 2007 09:39 AM

John,

Could you please provide detailed information on the DB2 version you are trying to connect?

Thanks!
Ivan Pedruzzi
Stylus Studio Team

Postnext
John pelletierSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: John pelletier
Date: 19 Oct 2007 12:08 PM
Ivan, we're an iSeries running v5r3 with db2.

Also, I changed the collectionid parameter from DEFAULT to a library name and I don't get any errors. However, I'm also not able to drill into the DB and see the tables in the library. The plus sign is temporary beside the db, but when I click it is goes away and doesn't open. Does this make sense?

Thanks again

Postnext
Ivan PedruzziSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Ivan Pedruzzi
Date: 19 Oct 2007 09:45 PM
John

Please refer to this technical article on CollectionID

http://knowledgebase.datadirect.com/kbase.nsf/ce24d9443437511f85256e57006bfe2a/16767bff8eaa8e9185256be30009b646?OpenDocument&Highlight=0,collectionid

You may need to contact the DB administrator to gather to correct connection information

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
John pelletierSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: John pelletier
Date: 22 Oct 2007 08:11 AM
Hi Ivan,

The link doesn't help - it basically says that I should use DEFAULT.

This doesn't seem like it should be hard - is there any documentation on how to connect to an iseries db2 library?

I'm evaluating this product - I appreciate your help, but I'm making no progress with making this connection. Are there any fee based, face-to-face technical support options available for this product?

Thanks again

Postnext
Ivan PedruzziSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: Ivan Pedruzzi
Date: 24 Oct 2007 10:47 PM

The problem has been solved after an offline conversation

Using a simplify server URL John was able to connect to his DB2 server

//172.16.1.2:446;locationName=INTERPAK

Ivan Pedruzzi
Stylus Studio Team

Posttop
John pelletierSubject: Problems Connecting to DB2/400 via DB to XML Source
Author: John pelletier
Date: 25 Oct 2007 07:11 AM
mission accomplished!

 
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.