mmolimar/ksql-jdbc-driver

Unable to find class file: scala/Function1

joefromct opened this issue · 2 comments

Hi,

  • I've compiled the jdbc driver I believe correctly as per the instructions in the readme.
  • I have registered the jdbc driver in an application that allows for testing/analysis of generic jdbc connections, specically aqua data studio.
    • This basically consists of shutting down the app, and adding my jar file for ksql to the lib directory of the aqua data studio java app, and restarting.
  • I'm getting the error message "unable to find class file: scala/Function1" ...
  • I'm not sure if it's related, but aqua data studio is running over jvm 1.8.
  • Not sure on the user/password for my little test, but at this point i'm not even getting that far...

Any tips appreciated, thanks.

Register Server:

inbox org_20180815_082702_nuyvq1

Driver setup:

inbox org_20180815_082722_1vbvd2

The actual error:

inbox org_20180815_082939_ytwnxt

You don't have in the application classpath the scala-library. If you put this library in that classpath, it should work.

Ok, you are right. I copied that into lib and it seems to get me past that error, and then actually complain on something like KsqlRest....

Because I wanted to give my other jvm sytsems just really a single jar file i started messing with sbt assembly to see if i could pull everything in...

I added this to your build.sbt:

assemblyMergeStrategy in assembly := {
  case PathList("META-INF", xs @ _*) => MergeStrategy.discard
  case x => MergeStrategy.first
}

assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = true, includeDependency = true)

And then i added the file project/assembly.sbt with the single line:

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.7")

Then i did this:

sbt clean
sbt assembly

And pulled out the compiled jar... this seems to have everything I need. Thanks very much for your help.