Connecting to DB2 via JDBC (missing jar)

One Star

Connecting to DB2 via JDBC (missing jar)

Hi there,
am using Talend Open Studio for Data Integration 5.4. When trying to connect to DB2 Express-c 10.5 database it is also required to install "db2jcc_licence_cisuz.jar" (Open Studio and DB2 are running on Linux). As far as I know this is part of DB2 Connect and required to connect to DB2 on mainframes. Why is it required by Open Studio if I don't want to connect to DB2 on mainframe? Since I don't have DB2 Connect, how can I use DB2 on Linux without Open Studio prompting for the missing jar-file all the time.
Thanks and greetings
One Star

Re: Connecting to DB2 via JDBC (missing jar)

works fine for me by using "generic jdbc" and "db2jcc4.jar". however, new problem: cannot retrieve schemas, cause I cannot see any tables under schemas
same as in topic 32811 (http://community.talend.com:80/t5/Design-and-Development/resolved-Could-not-create-the-Java-virtual-...), but am running Open Studio and DB2 on Linux (CentOS 6.5)
any idea what to do?
Moderator

Re: Connecting to DB2 via JDBC (missing jar)

Hi,
Have you checked the document TalendHelpCenterSmiley Frustratedetting up a JDBC connection for your Talend Open Studio for Data Integration 5.4.?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seventeen Stars

Re: Connecting to DB2 via JDBC (missing jar)

I would not recommend using the generic connection. You will run into trouble while reading metadata and also the type mapping does not work correctly.
The DB2 driver configuration has a misconfiguration in Talend because the Modules view show both license files:
db2jcc_licence_cisuz.jar
db2jcc_licence_cu.jar
as needed but only one is needed. This looks like a bug.
You can fix that by removing the line with the need first license file in:
/path/to/TOS/plugins/org.talend.designer.components.localprovider_5.4.1.r111943/components/tDB2Connection/tDB2Connection_java.xml
and all other DB2 components you use.
Alternatively you can change the attribute to REQUIRED="false"
One Star

Re: Connecting to DB2 via JDBC (missing jar)

@xdshi: yes, checked the document and can connect to db2, but still no tables under the schemas; I get result with "select * from sysibm.tables", so there should be no access issues
@jlolling: thx for your hint, searched all files for "db2jcc_license_cisuz.jar" and removed all lines, however Open Studio is still asking for the file
any other ideas how to solve the two problems?
One Star

Re: Connecting to DB2 via JDBC (missing jar)

this is how the connection is configured

and here the retrieve schema window without tables

btw retrieving the tables is working fine with mysql, just checked it
Seventeen Stars

Re: Connecting to DB2 via JDBC (missing jar)

The missing library will be referenced from all DB2 components - like the tDB2Input. You have to remove the line in this component also.
You can try to copy+rename your current working license file into the wanted file. This prevents you from connecting to main frame servers but this is not your use case.
Yes I know this bug. It is a bug what is caused by a changed behavior from DB2 in the last releases (starting from 10.1). I will file a bug report. Currently I am working on a patch to solve this issue (for release 5.1.1 because this is our current release).
One Star

Re: Connecting to DB2 via JDBC (missing jar)

found out that db2jcc_licence_cisuz.jar is delivered with IBM Data Studio, so I used it from there; deleting the references from all DB2 components didn't work out
tried now TOS DI and DB2 v10.5 Enterprise Server (not express-c) on Windows Server 2008 64 bit, problems with retrieving schemas remains but is a little bit different: synonyms can be retrieved but no tables and views. seems to be a general problem / bug in retrieving schemas from DB2 databases (maybe just from the newer versions)
where can I find and change the SQL queries for retrieving schemas from DB2 databases?
Seventeen Stars

Re: Connecting to DB2 via JDBC (missing jar)

What you can do at the moment is:
You can retrieve the schema for the input components be the "Get Schema" function. This works well.
You have to define the SQL for your self - on my opinion - it is much better than using the bloated generated statements from studio. After that klick on retrieve schema and thats it.
I have created a bug ticket:
https://jira.talendforge.org/browse/TUP-1615
By the way, to retrieve the metadata the JDBC API provides methods. Using self defined queries for it is only a workaround and never an good idea, because you have to keep up to date every changes.
For the output you can do a workaround:
create a select which contains all output related columns and retrieve the schema like described above. Then copy&paste the schema to your output component.

Re: Connecting to DB2 via JDBC (missing jar)

Hello there,
I am using Talend DI v6.2, but I'm struggling to set a DB2 connection.
There are  few jar modules missing:
db2jcc.jar
db2jcc_license_cisuz.jar
db2jcc_license_cu.jar
which I presume should be into JDBC 3.0 
I have downloaded 'Microsoft SQL Server JDBC Driver 3.0' and tried to map those module to the unpack folder (clicking into the action button) but it seems Talend DI GUI doesn't map automatically the package.
PS. I have tried from http://www.java2s.com/Code/Jar/d/Downloaddb2jccjar.htm but doesn't allow the download (do you have a repository for all the required drivers).
Can you please help me setting this?
Thank you
Moderator

Re: Connecting to DB2 via JDBC (missing jar)

Hi GiacomoPerticone,
Have you already checked document about:TalendHelpCenter:Install external modules?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: Connecting to DB2 via JDBC (missing jar)

Hi Sabrina,
Yes I did, but as said before maybe my issue is on finding the right jar files.
Although I have tried to install manually another jar file (__https://help.talend.com/search/all?query=Installing+external+modules&content-lang=en?focusedCommentI...) and the process didn't work.
Can you please help me to fix these issues?

Update.
I managed to find by myself the right place where to download and the package.
___https://www-01.ibm.com/marketing/iwm/iwm/web/signup.do?source=swg-dm-db2trial&S_TACT=M1610PPW&lang=en_US&S_PKG=ov12916
Installing the complete version you'll get those three jars.
Five Stars

Re: Connecting to DB2 via JDBC (missing jar)

Hi Talend Team, 
We have also encountered this one. We are trying load data into a DB2 database, but when we tried to create a metadata connection, we are prompted to install the three jar files(db2jcc.jar, db2jcc_license_cisuz.jar, db2jcc_license_cu.jar). We dont know where to acquire these Jar files. By the suggestion of this Talend Article, it is stated that these Jars are external modules that needed to be MANUALLY installed in order to establish connection to their respective database. What we dont know is that, Is there a particular DB2 studio that needs to be installed in order to acquire these jar files?(Enterprise edition perhaps?). We have been using DB2 Express C and IBM Data Studio for our DB2 database. We have also been using Talend Data Fabric 6.3.1
Any help with this is gladly appreciated. 
Regards,
Locke