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

NoClassDefFoundError Product when instatiating a new BloomFilter #36

Open
il-bert opened this issue Jun 10, 2018 · 5 comments
Open

NoClassDefFoundError Product when instatiating a new BloomFilter #36

il-bert opened this issue Jun 10, 2018 · 5 comments

Comments

@il-bert
Copy link

il-bert commented Jun 10, 2018

Instantiating a simple bloom filter with the following command

    val expectedElements = 10000
    val falsePositiveRate: Double = 0.1
    val bf = BloomFilter[String](expectedElements, falsePositiveRate)

at the last line ( val bf = ...)
I am getting the following error


[error] (run-main-0) java.lang.NoClassDefFoundError: scala/Product$class
[error] java.lang.NoClassDefFoundError: scala/Product$class
[error] 	at bloomfilter.CanGenerateHashFrom$CanGenerateHashFromString$.<init>(CanGenerateHashFrom.scala:20)
[error] 	at bloomfilter.CanGenerateHashFrom$CanGenerateHashFromString$.<clinit>(CanGenerateHashFrom.scala)
@alexandrnikitin
Copy link
Owner

Thanks for reporting that. Can you specify Java and Scala versions you use please.

@il-bert
Copy link
Author

il-bert commented Jun 11, 2018

Hi,
Scala 2.12.6 on jvm 1.8

@LuckyCamel
Copy link

I got the same error with Scala 2.10.6 and Java 1.8. And fixed via turning the maven dependency scope from 'provided' to 'compile'. Hope this may help.

@alexandrnikitin
Copy link
Owner

@il-bert Yes, it could be dependency config related thing. I can't reproduce the issue 😢 . I'll be happy to fix it if you can provide a repro project for it.

@Maybrittnelson
Copy link

I get the same issue. My previouse versions of Scala-library and bloom-filter were inconsistent.But when I set them to be consistent, everything is getting better. Here is my pom.xml

    <dependency>
          <groupId>org.scala-lang</groupId>
          <artifactId>scala-library</artifactId>
          <version>2.10.3</version>
      </dependency>

      <dependency>
          <groupId>com.github.alexandrnikitin</groupId>
          <artifactId>bloom-filter_2.10</artifactId>
          <version>0.11.0</version>
      </dependency>

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

4 participants