-
Notifications
You must be signed in to change notification settings - Fork 219
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
Error accessing transitive dependencies via %maven #63
Comments
Also maybe related... Artifact resolution starts with "central", not "local" per screenshots above. This makes things pretty slow, as it pings central every single time (which is a separate problem, but still worth mentioning). Anyways, as an experiment, I added |
Another pieces of
So:
After this I can't rerun So it gets stuck when for some reason it tries to download So the culprit is obviously Ivy, but I didn't get any further than that. Any insights are welcome. |
Hi @andrus, I really appreciate the detailed error reports here. School has taken priority as of lately and as a result I haven't had much free time to work on IJava and friends other than try and keep up with replying to issues. So please don't take the recent lack of progress as lack of interest in maintaining the project. There are 2 issues here that are motivating a switch I want to make with the classpath. As the kernel has a dependency on the base kernel and the user space shares the kernel classpath, adding a new basekernel can causes issues with the kernel itself with old classes being replaced. Could you try marking the basekernel with the The other issue is that I would like to have smarter resolution and skip dependencies for which an artifact with the same coordinates is already on the classpath. I'm not sure if we can capture things manually added but at least be smarter about conflict resolution with additional explicit maven dependencies. We can actually check which snippets of code break when a dependency is added. Maybe it is as simple as running them again after their class gets reloaded by the same one? |
I'll also link #22 for reference as if we go the user classpath route we could fix that one at the same time. |
No worries. As a long time open source developer I can relate.
This solved the second issue - the conflict between 2 notebooks. It no longer appears. |
More classpath fun. I reworked DFLibJupyter to use Logack for logging (this allows dynamic log level changes among other things). When I start with a clean Ivy repo ( I don't think this problem falls under your previous description, as it happens even after a restart. Looks like some kind of Ivy issue. Any idea what that might be, or at least where to dig?
|
Thanks for providing this nice tool. I also got my small Java test working, but stumble over a very similar problem that is described here when doing the following: %maven com.graphhopper:graphhopper-core:1.0
%maven com.graphhopper:graphhopper-reader-osm:1.0
%maven com.carrotsearch:hppc:0.8.1
%maven org.slf4j:slf4j-api:1.7.30
%maven org.slf4j:slf4j-log4j12:1.7.30
%maven log4j:log4j:1.2.17
import com.graphhopper.*;
import com.graphhopper.config.*;
import com.graphhopper.util.*;
import com.graphhopper.reader.osm.*;
import com.graphhopper.routing.util.*;
if(!new File("osm.pbf").exists()) {
System.out.println("download OpenStreetMap data ...");
new Downloader("GraphHopper Downloader").downloadFile("http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf", "osm.pbf");
}
System.out.println("start importOrLoad ...");
GraphHopper hopper = new GraphHopperOSM().
setOSMFile("osm.pbf").
setProfiles(Collections.singletonList(new Profile("car").setVehicle("car").setWeighting("fastest"))).
setEncodingManager(EncodingManager.create("car")).
setGraphHopperLocation("graph-cache").
importOrLoad();
GHResponse rsp = hopper.route(new GHRequest(52.532932,13.341522, 52.503684,13.404694).setProfile("car"));
if(rsp.hasErrors())
throw new RuntimeException(rsp.getErrors().get(0));
ResponsePath best = rsp.getBest();
System.out.println("distance " + best.getDistance()); I sometimes get errors that a certain class is missing although it should be included from one of the
or
or
Sometimes it affects the last And one time I was able to remove such an error when I switched from |
I've been having this issue consistently, and now I hope myself or my team will be able to dig into the sources and find a solution. Steps to ReproduceFor the record, here are the maximally simplified steps to reproduce:
I don't know if this is a coincidence, but the Notebook code
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();
connector Error
|
This should solve SpencerPark#63
Hi @SpencerPark @andrus |
So I am working on the DFLib Jupyter integration per dflib/dflib#44 . It mostly works well. Found one problem though. I am including all the DFLib modules as "compile" dependencies of "dflib-jupyter" , so I assumed I can only specify
%maven com.nhl.dflib:dflib-jupyter:0.6-SNAPSHOT
once, and get all of them. Apparently not. Here is a screenshot where Jupyter fails to import a package from one of the dependencies:Oddly enough, when instead of importing "com.nhl.dflib", I import "com.nhl.dflib.jdbc" package (from another module), the error is NoClassDefFound on the core DFLib package... So it seems to be ok with jdbc import, but still can't find the core library.
The text was updated successfully, but these errors were encountered: