-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Milestone
Description
Upgrading Ivy solves an annoying issue with missing classes from the transitive dependencies defined via %maven magic.
Steps to Reproduce
For the record, here are the maximally simplified steps to reproduce:
rm -rf ~/.ivy2- Create a notebook with the sections below (all dependencies are publicly-available on Maven central)
- Run it once (you'll get a DB connection error at the end, but that's fine. It is not the one we are chasing)
- Close the browser, stop jupyter
- Running jupyter and going through this notebook again causes
NoClassDefFoundErrorbelow when instantiating the connector
I don't know if this is a coincidence, but the NoClassDefFoundError is always on the "invisible" dependency (i.e. the classes we don't interact with directly in the code). The failing class is org/slf4j/LoggerFactory, loaded via the following dependency chain: dflib-jupyter -> dflib-jdbc -> slf4j-api, when a class from dflib-jdbc (SimpleDataSource) is invoked explicitly.
Notebook code
%maven org.dflib:dflib-jupyter:1.0.0-M20
%maven org.postgresql:postgresql:42.7.2
import org.dflib.jupyter.*;
import org.dflib.*;
import org.dflib.jdbc.*;
DFLibJupyter.init(getKernelInstance());var connector = Jdbc.connector("jdbc:postgresql://localhost:15432/")
.userName("postgres")
.password("test")
.build();
connectorError
ava.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.dflib.jdbc.datasource.SimpleDataSource.<clinit>(SimpleDataSource.java:19)
at org.dflib.jdbc.connector.JdbcConnectorBuilder.createDataSource(JdbcConnectorBuilder.java:97)
at org.dflib.jdbc.connector.JdbcConnectorBuilder.build(JdbcConnectorBuilder.java:76)
at .do_it$Aux(#24:4)
at .(#24:1)
Metadata
Metadata
Assignees
Labels
No labels