HTTP状态500 - 处理程序处理失败;嵌套异常是java.lang.UnsatisfiedLinkError:找不到指定的模块

时间:2017-11-22 09:49:38

标签: java eclipse spring-mvc tesseract tess4j

我正在尝试使用tess4j实现OCR。当我在eclipse中运行应用程序时工作正常。但是当我将WAR文件部署到tomcat或Jboss时,我收到了以下错误

  

HTTP状态500 - 处理程序处理失败;嵌套异常是   java.lang.UnsatisfiedLinkError:指定的模块不能   找到。

     

输入例外报告

     

消息处理程序处理失败;嵌套异常是   java.lang.UnsatisfiedLinkError:指定的模块不能   找到。

     

description服务器遇到阻止它的内部错误   完成此请求。

     

例外

     

org.springframework.web.util.NestedServletException:处理程序   处理失败;嵌套异常是java.lang.UnsatisfiedLinkError:   找不到指定的模块。

     

org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1303)     org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:977)     org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)     org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)     org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)     javax.servlet.http.HttpServlet.service(HttpServlet.java:622)     org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)   根本原因

     

java.lang.UnsatisfiedLinkError:指定的模块不能   找到。

     

com.sun.jna.Native.open(原生方法)     com.sun.jna.Native.open(Native.java:1759)     com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:260)     com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)     com.sun.jna.Library $处理程序。(Library.java:147)     com.sun.jna.Native.loadLibrary(Native.java:412)     com.sun.jna.Native.loadLibrary(Native.java:391)     net.sourceforge.tess4j.util.LoadLibs.getTessAPIInstance(LoadLibs.java:75)     net.sourceforge.tess4j.TessAPI。(TessAPI.java:42)     net.sourceforge.tess4j.Tesseract.init(Tesseract.java:367)     net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:280)     net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:212)     net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:196)     org.infotech.jdol.pdfjs.Utils.doOCRSample(Utils.java:77)     org.infotech.jdol.pdfjs.Utils.imageAsPDF(Utils.java:54)     org.infotech.jdol.pdfjs.controllers.PdfViewerController.getViewer(PdfViewerController.java:25)     sun.reflect.NativeMethodAccessorImpl.invoke0(原生方法)     sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     java.lang.reflect.Method.invoke(Method.java:498)     org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)     org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)     org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:111)

1 个答案:

答案 0 :(得分:1)

我只针对我在这里发布的apache实现了

在apache tomcat中创建如下所示的文件夹结构。 Apache的Tomcat的8.0.39 \ TEMP \ tess4j \ Win32的x86-64的

将以下dll粘贴到win32-x86-64文件夹中

  1. gsdll64.dll
  2. liblept174.dll
  3. libtesseract305.dll
  4. 注意:我使用的eclipse和java是64位

    下面是关于添加的dll路径的截图

    image link

相关问题