Unable to connect db2 database in JMeter - jdbc

Getting below response on connecting to DB2 database:
"Cannot create PoolableConnectionFactory ([jcc][t4][10109][10354][3.59.81] The version of the IBM Universal JDBC driver in use is not licensed for connectivity to QDB2 databases. To connect to this server, please obtain a licensed copy of the IBM DB2 Universal Driver for JDBC and SQLJ.
An appropriate license file db2jcc_license_.jar for this target platform must be installed to the application class path. Connectivity to QDB2 databases is enabled by any of the following license files: [ db2jcc_license_cisuz.jar ]. ERRORCODE=-4472, SQLSTATE=42968)"*
db2jcc.jar and db2jcc_license_cisuz.jar already added in JMeter(3.2)'s lib folder.
My configuration:
Screenshot of the jmeter/lib folder:

Although the message seems to indicate a license issue , I see an error in your configuration on Validation Query.
Can you try to fix it and see if you still get the error ?
Change it to:
select 1 from sysibm.sysdummy1
Also can you show a screenshot of the jmeter/lib folder and highlight the presence of the 2 jars for DB2 ?

The error you're getting is about mismatch of the DB2 JDBC Driver you are trying to use with JMeter and DB2 version on the server.
See IBM data server client and driver types IBM KB article for more information on JDBC driver types.
Personally I would recommend obtaining JDBC driver directly from your DB2 installation, it normally lives under java or jdbc folder in the DB2 server installation root.
So I would recommend copying the following files somewhere to JMeter Classpath (normally "lib" folder of your JMeter installation)
db2jcc4.jar
db2jcc_license_cu.jar
(depending on your DB2 version and type you might need other files as well)
JMeter restart will be required to pick the .jars up.
See The Real Secret to Building a Database Test Plan With JMeter article to learn more about databases load testing concept using JMeter.

Related

Tableau desktop 2021.02 oracle server 19c frequent disconnection - error code dacbe23f

I recently started using tableau. I followed below step to connect with oracle.
I placed ojdbc8-19.3.0.0.jar into C:\Program Files\Tableau\Drivers directory, java 8 installed and JAVA_HOME is set.
Below is the jdbc jar i am using
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.10.0.0</version>
</dependency>
Then I am able to connect to oracle database, but during data filtering I am getting disconnection very frequently, almost unusable and this error code "dacbe23f"
Also in log below error
"user":"-","k":"msg","v":"Cannot load library from preferred location, "C:\Program Files\Tableau\Tableau 2021.2\bin\oci.dll", since it doesn't exist.","ctx":{"client-procid":..............."
Load library failed: Cannot load library oci: The specified module
could not be found
After checking on tableau support, I found this post. Please read this question it is same with my situation, however this post is post suggesting the use of oracle client, I am not using oracle client
I found oracle client in here
I am thinking of setting oracle home in env variable and copy the dll files to oracle_home directory as mentioned in env variable.
Can anyone please suggest do I really need to install oracle client or specifying the ORACLE_HOME should be enough.
Also I am little confused why tableau is looking for oracle client ddl where as it is using jdbc jar for connection and able to connect.
You might want to use Oracle JDBC driver instead of JDBC-OCI driver with Tableau.
The JDBC OCI driver use requires you to set ORACLE_HOME and LD_LIBRARY_PATH.

Jasperserver and oracle autonomous database

I am trying to connect jasperserver to oracle autonomous database (OADB), but with no success. I have successfully configured OADB access from jaspersoft studio by following this tutorial (https://www.oracle.com/a/ocom/docs/database/adw-conn-tibco-jaspersoft.pdf). I also have access to the target OADB from sqlplus on the same server where jasperserver is installed. I tried to configure access for jasperserver similarly to the instructions for jaspersoft studio, also for configuration I used the recommendations from this JDBC Thin Connections with Wallets (mTLS) tutorial. I'm trying to create a connection to the OADB using the jasperserver web interface, but it doesn't seem to accept the format of the string that contains the wallet path (err example image).
Is it even possible to connect jasperserver to oracle autonomous database at the moment? Please help if someone faced a similar task. I would be grateful for any help.
My software environment:
Jasperserver Community Edition 7.8
OS: Oracle-Linux-7.9-2021.08.27-0
Java: openjdk 11.0.12
Oracle driver: ojdbc8
At this link you will see pre-requisites:
JDBC Thin Connections with Wallets (mTLS)
on section 3. tells about the JDK version you must use when connecting with this JDBC.
AND Per link:
https://community.jaspersoft.com/questions/821941/how-can-i-tell-jaspersoft-studio-use-my-current-java-version-instead-bundled-one
Edit your Jaspersoft Studio.ini and remove the lines that read:
-vm
features/jre.win32.win32.x86_64.feature_1.8.0.u151/jre/bin
This will cause jaspersoftstudio to use the JDK you have installed in your computer (not the one that jaspersoft studio has "embedded"); so make sure your computer has at least jdk "1.8.0_171"

Tableau driver-resolver definition for JDBC Drivers in a custom connector

I'm trying to figure out how to get Tableau to recognize my JDBC Driver when creating a custom JDBC connector using the Tableau Connector SDK . Currently when Tableau loads my custom connector I can tell the driver is not found because there is a link that shows up in the Connector that says:
"Download and install the drivers, and then connect."
Tableau online does not have the drivers for the SAS data I want to connect to: so I cannot download the drivers to install from Tableau
Luckily I already have the .jar files and have placed them at C:\Program Files\Tableau\Drivers on Windows
In the Connector API Reference "driver-resolver" states that: "This is mainly used for ODBC connections but can be used for JDBC as well" but I do not see specific instructions for working with JDBC drivers explicitly. Except for the Postgres JDBC Example which DOES NOT use a driver-resolver. I also have not seen a JDBC example in the Resolvers github samples
In the Tableau logs I can see that the .jar files containing my driver are recognized by searching for their names, they are shown in the logs.
Logs Environment Section Excerpt:
"environment","v":{...all my jar files listed here}
Drivers not being recognized screenshot that says to download the drivers
Finally, here is what my .tdr file looks like with my current driver-resolver definition that does not work
<tdr class='sas_jdbc'>
<connection-resolver>
<connection-builder>
<script file="connectionBuilder.js" />
</connection-builder>
<connection-properties>
<script file="connectionProperties.js" />
</connection-properties>
</connection-resolver>
<driver-resolver>
<driver-match>
<driver-name type='exact'>com.sas.rio.MVADriver</driver-name>
</driver-match>
</driver-resolver>
</tdr>
Can anyone shed some light on this for me? I feel like I'm close. An example using a JDBC driver-resolver in a .tdr file would be nice.
You don't actually need a .tdr file with JDBC, as all the driver resolution happens in the connectionBuilder.js file today. The URL of the connection there includes the driver name. I added a story to our backlog to make this more clear. I should also mention, that hopefully you are using 2019.4 or higher for the best experience. Thanks for using the SDK!
The answer to this is that driver-resolver is not used in JDBC custom connector definitions. The problem I'm experiencing with getting the SAS JDBC Driver to work is because the SAS JDBC Driver is JDBC Type 2.0. JDBC Drivers need to be Type 4.0 to work with a Tableau custom connector using the Tableau Connector SDK.
The resolution is to use a Type 4.0 JDBC Driver which I have not seen from SAS yet.

How can I read a .dbf file with wso2 Data Services Server?

the documentation of WSO2 Data services server say you can read any database with a JDBC driver, and I found that there are some JDBC libraries for .DBF files.
DSS documentation: http://wso2.com/products/data-services-server/
JDBC for DBF files: http://www.csv-jdbc.com/stels_dbf_jdbc.htm
Someone has already done or did something similar?
I would appreciate your help
Yes, WSO2 DSS supports any RDBMS datasource type, provided a compatible driver is copied to the product. You can follow the below steps.
You can add the JDBC driver to the $DSS_HOME/repository/component/lib folder and start the server.
Create a dataservice by following the this doc
Add an RDBMS type datasource, as DBF is not listed in the pre-defined datasource types, select 'Generic' and give the driver class name, connection url, username and password according to the DBF specified
Add query and then an operation. Our official documentation has all the necessary steps.
Please note that, we have not tested with this driver, therefore, to use in a production environment, a comprehensive testing cycle will be needed (including load tests, long running tests .. etc).

Connecting to an Apache Derby/JavaDB database using Oracle SQL Developer [duplicate]

This question already has answers here:
How to use SQLDeveloper to connect to embedded Derby database
(4 answers)
Closed 5 years ago.
I've been trying to connect to an Apache Derby/JavaDB embedded database using Oracle SQL Developer but without much success.
I've tried to create a new connection using the following JDBC URL:
jdbc:derby:/path/to/file/database.derby;create=true
which resulted in an error:
Status : Failure -Test failed: Invalid connection info specified. Verify the URL format for the specified driver.
Previously I've added derby.jar through Tools > Preferences > Database > Third Party JDBC Drivers.
Given that JavaDB is now a supported Oracle product I'm not understanding why is not better integrated with its development tools.
Any guidance will be much appreciated. Thanks in advance.
Your derby url seems wrong. You need to point the url to the directory of the database, not the database itself.
jdbc:derby:/path/to/file/;create=true
Have a look at the examples.
jdbc:derby:/reference/phrases/french
Open a connection to the database /reference/phrases/french.
On a UNIX system, this would be the path of the directory. On a
Windows system, the path would be C:\reference\phrases\french if the
current drive were C. If a jar file storing databases were in the
user's classpath, this could also be a path within the jar file.
From the docs:
The connection URL syntax is as follows:
jdbc:derby:[subsubprotocol:][databaseName][;attribute=value]
Subsubprotocol, which is not typically specified, determines how Derby
looks for a database: in a directory, in memory, in a class path, or
in a jar file. Subsubprotocol is one of the following:
directory: The default. Specify this explicitly only to distinguish a database that might be ambiguous with one on the class
path.
try connecting to the Derby DB using the Eclipse Java EE IDE for Web Developers instead of Oracle SQL Developer. In the latest versions it is has the full integrations.

Resources