All Apps and Add-ons

serviceClass for AS400 and jt400.jar [as400.access.AS400JDBCDriver]

Path Finder

Hello

I'm trying to connect to a DB2 Database using Database Connect v2 with a personalize stanza in splunk:
/etc/deployment-apps/splunkappdbconnect/local/dbconnection_types.conf

With these configs:

[db2400]
displayName = DB2 on OS400
jdbcDriverClass = com.ibm.as400.access.AS400JDBCDriver
jdbcUrlFormat = jdbc:as400://<host>;translate binary=true
testQuery = SELECT CURRENT USER FROM SYSIBM.SYSDUMMY1
port = 8471
maxConnLifetimeMillis = 500000

But I miss the serviceClass Configuration I try to use the following:
serviceClass = com.splunk.dbx2.DB2JDBC

But appears an error with the message saying that the com.ibm.as400.access.AS400JDBCDriver is not present, but that driver is present in jt400.jar which is in the /etc/deployment-apps/splunkappdb_connect/bin/lib directory installed correctly

Thanks

0 Karma

Engager

Utiliza esta configuración. Me funciono.
En el archivo "dbconnectiontypes.conf" que esta ubicada en la ruta de instalación del App en mi caso es {/opt/splunk/etc/apps/splunkappdb_connect/default}

[AS400]
displayName = DB2 on OS400
serviceClass = com.splunk.dbx2.DB2JDBC
jdbcDriverClass = com.ibm.as400.access.AS400JDBCDriver
jdbcUrlFormat = jdbc:as400:;prompt=false

testQuery = VALUES 1
port = 8471
maxConnLifetimeMillis = 500000
alt text

En la configuración de la conexión del App se crea utilizando el tipo de Base de Datos que se adiciono.
alt text

Para traer los Datos lo haces por el Query en la forma avanzada. Digitando la instrucción SQL que deseas.
Ej. SELECT * MyLib.MyFile

Path Finder

Following with the case:

I'm trying these configuration:

[db2as400I]
displayName = DB2 on OS400I
serviceClass = com.splunk.dbx2.DB2JDBC
jdbcDriverClass = com.ibm.as400.access.AS400JDBCDriver
jdbcUrlFormat = jdbc:as400://<host>:<port>/<database>;translate binary=true
testQuery = SELECT CURRENT USER FROM SYSIBM.SYSDUMMY1
port = 8471
maxConnLifetimeMillis = 500000


[OS400I]
connection_type = db2as400I
database = PENSDAT
host = 10.200.65.253
identity = SQLServer
port = 8471

The error about the Driver disappear but now the error is around a Headless exception:

Validating connection with URL [jdbc:as400://10.200.65.253:8471/PENSDAT;translate binary=true] failed: java.awt.HeadlessException:java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it.

Changing the start parameter with
-Xmx2048m -XX:+UseConcMarkSweepGC -Djava.awt.headless=true

The error now is:

Validating connection with URL [jdbc:as400://10.200.65.253:8471;translate binary=true] failed: java.awt.HeadlessException:java.awt.HeadlessException

0 Karma

Splunk Employee
Splunk Employee

I think that it would require some work on our side to implement some Java code. Feel free to put in an enhancement request for OS400I with support.

0 Karma