java中的UnsatisfiedLinkError

发布于 2024-10-05 22:29:08 字数 4918 浏览 4 评论 0原文

我在我的应用程序中遇到以下错误。我不明白这是什么以及解决方案是什么?请指导我

   java.lang.UnsatisfiedLinkError: no otfxjni in java.library.path
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at com.digitalpersona.onetouch.jni.FeatureExtractionLibrary.<clinit>(FeatureExtractionLibrary.java:16)
        at com.digitalpersona.onetouch.jni.FeatureExtractor.<clinit>(FeatureExtractor.java:8)
        at com.digitalpersona.onetouch.processing._impl.DPFPFeatureExtractionFactoryImpl$FeatureExtractionImpl.<init>(DPFPFeatureExtractionFactoryImpl.java:32)
        at com.digitalpersona.onetouch.processing._impl.DPFPFeatureExtractionFactoryImpl.createFeatureExtraction(DPFPFeatureExtractionFactoryImpl.java:19)
        at VarifyServer.extractFeatures(VarifyServer.java:121)
        at VarifyServer.callClient(VarifyServer.java:71)
        at Bean.callServer(Bean.java:30)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
        at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
        at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
        at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:88)
        at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
        at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:743)
        at javax.faces.component.UICommand.broadcast(UICommand.java:368)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
        at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17)
        at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:94)
        at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:54)
        at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:26)
        at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
        at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
        at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:38)
        at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
        at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
        at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:55)
        at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:19)
        at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
        at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Unknown Source)

Following error I got in my application. I can't understand what is it and what is the solution ? Please guide me

   java.lang.UnsatisfiedLinkError: no otfxjni in java.library.path
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at com.digitalpersona.onetouch.jni.FeatureExtractionLibrary.<clinit>(FeatureExtractionLibrary.java:16)
        at com.digitalpersona.onetouch.jni.FeatureExtractor.<clinit>(FeatureExtractor.java:8)
        at com.digitalpersona.onetouch.processing._impl.DPFPFeatureExtractionFactoryImpl$FeatureExtractionImpl.<init>(DPFPFeatureExtractionFactoryImpl.java:32)
        at com.digitalpersona.onetouch.processing._impl.DPFPFeatureExtractionFactoryImpl.createFeatureExtraction(DPFPFeatureExtractionFactoryImpl.java:19)
        at VarifyServer.extractFeatures(VarifyServer.java:121)
        at VarifyServer.callClient(VarifyServer.java:71)
        at Bean.callServer(Bean.java:30)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
        at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
        at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
        at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:88)
        at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
        at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:743)
        at javax.faces.component.UICommand.broadcast(UICommand.java:368)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
        at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17)
        at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:94)
        at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:54)
        at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:26)
        at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
        at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
        at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:38)
        at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
        at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
        at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:55)
        at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:19)
        at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
        at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Unknown Source)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

青萝楚歌 2024-10-12 22:29:08

您的 com.digitalpersona.onetouch.jni.FeatureExtractionLibrary 类正在使用 JNI 调用 otfxjni 原生库(.so 或 .dll 扩展名)。但是该库不在您的库路径中。

您可以通过将 -Djava.library.path= 参数添加到运行时进程来手动设置此路径。

your com.digitalpersona.onetouch.jni.FeatureExtractionLibrary class is using JNI to call out to the otfxjni native library (.so or .dll extension). However that library is not in your library path.

You can manually set this path by adding the -Djava.library.path=<path to otfxjni file> argument to your runtime process.

王权女流氓 2024-10-12 22:29:08

这意味着JVM找不到“otfxjni”库。您应该检查您是否确实拥有该库以及它是否位于正确的位置(当然,这取决于操作系统)。

编辑:如果您打印出 java.library.path 系统变量的值,这样您就知道它在哪里查找,这将会有所帮助。

It means that the JVM cannot find the "otfxjni" library. You should check if you actually have that library and that it is in the right place (which will be OS dependent, of course).

EDIT: It will help if you print out the value of the java.library.path system variable so you know where it is looking.

看轻我的陪伴 2024-10-12 22:29:08

我看到的可能原因是,您的 java 库路径中没有库 otfxjni.dll(如果您使用的是 Linux,则没有 otfxjni.so)。

来自 JavaDoc(UnsatisfiedLinkError):

如果Java虚拟机抛出
找不到合适的
方法的本机语言定义
声明为本机

The probable cause I see, is that there's no library otfxjni.dll (or otfxjni.so if you're using linux) in your java library path.

From JavaDoc (of UnsatisfiedLinkError):

Thrown if the Java Virtual Machine
cannot find an appropriate
native-language definition of a method
declared native.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文