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

Caused by: java.lang.ClassNotFoundException: ch.ethz.globis.phtree.PhTreeF #25

Closed
lpellegr opened this issue Jul 31, 2023 · 6 comments
Closed
Assignees

Comments

@lpellegr
Copy link

lpellegr commented Jul 31, 2023

Using the last version (2.0.0) in a Java 20 app breaks as follows:

Exception in thread "main" java.lang.NoClassDefFoundError: ch/ethz/globis/phtree/PhTreeF
at org.tinspin.index.phtree.PHTreeP.(PHTreeP.java:34)
at org.tinspin.index.phtree.PHTreeP.create(PHTreeP.java:38)
...
Caused by: java.lang.ClassNotFoundException: ch.ethz.globis.phtree.PhTreeF
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
Caused by: java.lang.ClassNotFoundException: ch.ethz.globis.phtree.PhTreeF

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 6 more

The dependency to tinspin is made via Gradle:

implementation 'org.tinspin:tinspin-indexes:2.0.0'

To reproduce, this simple code snippet is enough:

PHTreeP.create(2);

Adding the following dependency fixes the issue:

implementation 'ch.ethz.globis.phtree:phtree:2.8.0'

@tzaeschke tzaeschke self-assigned this Jul 31, 2023
@tzaeschke
Copy link
Owner

Hi, thanks for reporting this!
Any suggestion how I can fix this? The pom.xml in tinspin-indexes already has a public dependency for ch.ethz.globis.phtree. Not sure what else I can do...?

@lpellegr
Copy link
Author

Thanks for your answer.

I am not sure about the reason but if you look at the pom file on Maven Central, it does not include the dependency to phtree with version 2.0.0 or 1.8.0:

https://repo1.maven.org/maven2/org/tinspin/tinspin-indexes/2.0.0/tinspin-indexes-2.0.0.pom
https://repo1.maven.org/maven2/org/tinspin/tinspin-indexes/1.8.0/tinspin-indexes-1.8.0.pom

In version 1.7.1 the dependency was present:
https://repo1.maven.org/maven2/org/tinspin/tinspin-indexes/1.7.1/tinspin-indexes-1.7.1.pom

So there is something in between 1.7.1 and 2.0.0 that changed. Maybe something with the release process?

@tzaeschke
Copy link
Owner

It appears the problem was triggered by updating the maven-shade-plugin from 3.2.4. to 3.4.1.
Thinking about this, I believe the there should be no shading of dependencies in tinspin-indexes so I will remove the plugin.

tzaeschke added a commit that referenced this issue Aug 1, 2023
tzaeschke added a commit that referenced this issue Aug 1, 2023
@lpellegr
Copy link
Author

lpellegr commented Aug 1, 2023

Great that you have found the cause. Would it be possible to make a new release on Maven Central?

@tzaeschke
Copy link
Owner

I just released tinspin-indexes 2.0.1.
Could you check whether it works now?

@lpellegr
Copy link
Author

lpellegr commented Aug 7, 2023

Thanks for the quick release, I confirm the issue is fixed with version 2.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants