All Apps and Add-ons

Splunk DB Connect 2: What should the serviceClass be for my custom jdbc database (Unidata)?

bgriffis
Explorer
  1. I've tested the jdbc connector with a little java program so I know it works.
  2. I've got this in local/db_connection_types.conf

    [local]

    [unidata]
    displayName = Unidata
    serviceClass = com.splunk.dbx2.UniJDBCDriver
    jdbcUrlFormat = jdbc:rs-u2://:/;dbmstype=UNIDATA
    jdbcDriverClass = com.rs.u2.jdbc.UniJDBCDriver

  3. What should the serviceClass be? Can I just make it up?

  4. When I try to set one up, I get an error that just says com.splunk.dbx2.UniJDBCDriver with no details

  5. dbx2.log says:

    06/11/2015 13:45:08 [WARNING] [health.py] com.splunk.dbx2.UniJDBCDriver
    06/11/2015 13:45:08 [ERROR] [init.py] com.splunk.dbx2.UniJDBCDriver
    Traceback (most recent call last):
    File "/opt/splunk/lib/python2.7/site-packages/splunk/rest/init.py", line 184, in dispatch
    methodOutput = method()
    File "/opt/splunk/etc/apps/splunk_app_db_connect/bin/dbinfo.py", line 39, in handle_GET
    return self.get_catalogs(conn)
    File "/opt/splunk/etc/apps/splunk_app_db_connect/bin/health.py", line 206, in wrap_it
    return w.logIt (self, f, l, *args, **kwargs)
    File "/opt/splunk/etc/apps/splunk_app_db_connect/bin/health.py", line 177, in logIt
    if err : raise err
    AvroRemoteException: com.splunk.dbx2.UniJDBCDriver
    06/11/2015 13:45:08 [DEBUG] [init.py] simpleRequest < server responded status=200 responseTime=0.9807s
    06/11/2015 13:45:08 [DEBUG] [health.py] Health logging is ON.
    06/11/2015 13:45:08 [DEBUG] [rh_connections.py] com.splunk.dbx2.UniJDBCDriver
    06/11/2015 13:45:08 [WARNING] [health.py] com.splunk.dbx2.UniJDBCDriver
    06/11/2015 13:45:08 [ERROR] [rh_connections.py] exception com.splunk.dbx2.UniJDBCDriver

  6. Any ideas ?

-- worthy of note:
unijdbc.jar isn't good enough on its own, it needs some .class files in a local dir called asjava - so I'm not sure where to put those on my linux Search Head.

sjohnson_splunk
Splunk Employee
Splunk Employee

you should use the com.splunk.dbx2.DefaultDBX2JDBC

splunkIT
Splunk Employee
Splunk Employee

Unfortunately, you cannot determine that info in DB Connect. In DBVisualizer, once you have created a new driver (under Driver Manager), you should be able to see the driver class info., which you then can use in DB Connect.

https://www.dbvis.com/download/

0 Karma

bgriffis
Explorer

I assume you meant the driverClass. I have that, though dbviz looks EXTRAORDINARY! thanks for the tip:)
I need the serviceClass - which is a splunk setting of some sort.

0 Karma

bgriffis
Explorer

to Splunk support I go 🙂

0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...