Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting NoClassDefFoundError / ClassNotFoundException on java.sql.Date while running SBT assembly jar #523

Open
itbeans opened this issue Mar 25, 2023 · 1 comment
Labels
question Further information is requested

Comments

@itbeans
Copy link

itbeans commented Mar 25, 2023

I am getting below error while creating an SBT assembly (fat) jar. The same code works in Intellij Idea just fine.

java.lang.NoClassDefFoundError: java/sql/Date
at com.influxdb.client.JSON.(JSON.java:113)
at com.influxdb.client.internal.AbstractInfluxDBClient.(AbstractInfluxDBClient.java:117)
at com.influxdb.client.internal.AbstractInfluxDBClient.(AbstractInfluxDBClient.java:79)
at com.influxdb.client.internal.InfluxDBClientImpl.(InfluxDBClientImpl.java:99)
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:261)
....
Caused by: java.lang.ClassNotFoundException: java.sql.Date
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 53 more

@powersj
Copy link
Contributor

powersj commented Mar 27, 2023

Hi,

Were you able to resolve your issue?

I am getting below error while creating an SBT assembly (fat) jar. The same code works in Intellij Idea just fine.

I think this would indicate that your build is missing some file, specifically java/sql/Date.

@powersj powersj added the question Further information is requested label Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants