Giter Site home page Giter Site logo

Comments (5)

dragonsinth avatar dragonsinth commented on August 19, 2024

@Koshak118 I think this exception generally means that the target class failed to initialize properly-- ie its static initializer(s) threw an exception. But I would have expected to see more information in the stack trace, or a separate exception trace detailing why LibGmp failed to load.

from jna-gmp.

Koshak118 avatar Koshak118 commented on August 19, 2024

Hi @dragonsinth

Thanks for the fast answer. The following is the more comprehensive stack trace with my own code wiped out (I am working under NDA and cannot disclose the exact functionality which uses your library). Generally the logic is trying to make a "multiply" operation in homomorphic encryption algorithm which includes "mod" operation as well

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.squareup.jnagmp.LibGmp
	at com.squareup.jnagmp.Gmp.<init>(Gmp.java:175)
	at com.squareup.jnagmp.Gmp.<init>(Gmp.java:33)
	at com.squareup.jnagmp.Gmp$1.initialValue(Gmp.java:133)
	at com.squareup.jnagmp.Gmp$1.initialValue(Gmp.java:131)
	at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
	at java.lang.ThreadLocal.get(ThreadLocal.java:170)
	at com.squareup.jnagmp.Gmp.modPowInsecure(Gmp.java:95)
	at ********************************************************************
	at ********************************************************************
	at ********************************************************************
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:545)
	at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:438)
	at *******************************************************************************

from jna-gmp.

dragonsinth avatar dragonsinth commented on August 19, 2024

@Koshak118 are you on the latest version? Those line numbers make no sense based on the current source code I'm looking at.

from jna-gmp.

Koshak118 avatar Koshak118 commented on August 19, 2024

Hi @dragonsinth

Sorry for the delayed answer, was with a limited access to the internet for a couple of days

Upgrading the code to the latest version didn't fix a crash; what did fix it is trying to run the code on Mac rather than on Windows, so it looks like it was an environment setup issue

As far as I am concerned you can close the issue

Thanks for the assistance

from jna-gmp.

dragonsinth avatar dragonsinth commented on August 19, 2024

Ah, yes. We don't provide a pre-built binary libgmp for Windows. You'd need to build libgmp yourself.

from jna-gmp.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.