All Apps and Add-ons

Splunk DB Connect 2: Why am I getting error "(JRE) version 1.8 is not supported by this driver" trying to connect to a MS SQL Database?

jizzmaster
Path Finder

Trouble getting DB Connect v2 to connect to a MS-SQL database.

[ERROR] [__init__.py] java.lang.UnsupportedOperationException:Java Runtime Environment (JRE) version 1.8 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
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 38, 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: java.lang.UnsupportedOperationException:Java Runtime Environment (JRE) version 1.8 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.

Using RHEL 6.6.

The prerequisites state to install Oracle's Java, not OpenJDK. I've done this now and it is installed in /usr/java/jre1.8.0_40 (which is where I've set DB Connect v2 to as the JRE Installation Path. I've run sudo /usr/sbin/alternatives --config java and selected Oracle's Java. Now when I do a java -version I get:

java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

I've also installed JDBC from the Microsoft, http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774. I put the jar files in the /usr/java/jre1.8.0_40/lib folder.

Unfortunately, I am still getting the error I have posted above about JRE 1.8 not supported by the driver. I suspect I have done something wrong with the JDBC driver from Microsoft. But I can't figure it out. Any suggestions?

0 Karma
1 Solution

bwang_splunk
Splunk Employee
Splunk Employee

The error says to use sqljdbc4.jar. Do you have this under splunk_app_db_connect/bin/lib directory?

View solution in original post

bwang_splunk
Splunk Employee
Splunk Employee

The error says to use sqljdbc4.jar. Do you have this under splunk_app_db_connect/bin/lib directory?

jizzmaster
Path Finder

I didn't before. I figured DB Connect v2 would use the Java directory specified in the settings as /usr/java/jre1.8.0_40. But I just copied the sqljdbc4.jar over there, different message. Now getting login credential issues. So it appears this was the fix. I didn't realize it had to be in that specific directory. Thank you.

0 Karma

xdp4
Explorer

Did you resolve your login credential issue? I'm using 1.2 with Java 8 and running into the same problem.

0 Karma

jizzmaster
Path Finder

Yes, kind of. I was trying to use LDAP account credentials, but DB Connect v2 only accepts SQL account credentials. There was a separate Splunk Answers post that helped me out: http://answers.splunk.com/answers/228878/how-to-connect-splunk-db-connect-2x-to-ms-sql-usin.html. Although I didn't implement this workaround. Basically, I read it as DB Connect v2 does not support domain or LDAP authentication easily and it must be SQL account authentication.

Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...