Java POS 健康检查返回“java.lang.UnsatisfiedLinkError”

发布于 2024-12-05 10:27:11 字数 7418 浏览 2 评论 0原文

我为通过以太网连接的 Epson 打印机 TMU230 安装了 Java pos adk (1.11.18)。我通过运行 setupPos.exe 文件配置打印机。 当我运行 healthCheck.bat 文件时,它在控制台中显示此错误。

    Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jp_co_
epson_upos_firm_FirmNativeAccess in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        at jp.co.epson.upos.pntr.CommonPrinterService.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at jp.co.epson.uposcommon.util.EpsonJposServiceInstanceFactory.createIns
tance(Unknown Source)
        at jpos.loader.simple.SimpleServiceConnection.connect(Unknown Source)
        at jpos.BaseJposControl.open(Unknown Source)
        at checkhealthtool.CheckHealthTool.executeCheckHealth(Unknown Source)
        at checkhealthtool.CheckHealthTool.checkHealthButton_Click(Unknown Sourc
e)
        at checkhealthtool.CheckHealthTool.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
95)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6288)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:6053)
        at java.awt.Container.processEvent(Container.java:2041)
        at java.awt.Component.dispatchEventImpl(Component.java:4651)
        at java.awt.Container.dispatchEventImpl(Container.java:2099)
        at java.awt.Component.dispatchEvent(Component.java:4481)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
        at java.awt.Container.dispatchEventImpl(Container.java:2085)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4481)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
        at java.awt.EventQueue.access$000(EventQueue.java:84)
        at java.awt.EventQueue$1.run(EventQueue.java:602)
        at java.awt.EventQueue$1.run(EventQueue.java:600)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:87)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:98)
        at java.awt.EventQueue$2.run(EventQueue.java:616)
        at java.awt.EventQueue$2.run(EventQueue.java:614)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:87)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not
 initialize class jp.co.epson.upos.pntr.U230Service
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at jp.co.epson.uposcommon.util.EpsonJposServiceInstanceFactory.createIns
tance(Unknown Source)
        at jpos.loader.simple.SimpleServiceConnection.connect(Unknown Source)
        at jpos.BaseJposControl.open(Unknown Source)
        at checkhealthtool.CheckHealthTool.executeCheckHealth(Unknown Source)
        at checkhealthtool.CheckHealthTool.checkHealthButton_Click(Unknown Sourc
e)
        at checkhealthtool.CheckHealthTool.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
95)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6288)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:6053)
        at java.awt.Container.processEvent(Container.java:2041)
        at java.awt.Component.dispatchEventImpl(Component.java:4651)
        at java.awt.Container.dispatchEventImpl(Container.java:2099)
        at java.awt.Component.dispatchEvent(Component.java:4481)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
        at java.awt.Container.dispatchEventImpl(Container.java:2085)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4481)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
        at java.awt.EventQueue.access$000(EventQueue.java:84)
        at java.awt.EventQueue$1.run(EventQueue.java:602)
        at java.awt.EventQueue$1.run(EventQueue.java:600)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:87)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:98)
        at java.awt.EventQueue$2.run(EventQueue.java:616)
        at java.awt.EventQueue$2.run(EventQueue.java:614)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:87)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

我使用的是 Windows Server 2003 和 JDK 1.5。

缺少哪些库文件?

I installed the Java pos adk (1.11.18) for Epson printer TMU230 connected through ethernet. I configured the printer by running setupPos.exe file.
When I run the healthCheck.bat file it is showing this error in console.

    Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jp_co_
epson_upos_firm_FirmNativeAccess in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        at jp.co.epson.upos.pntr.CommonPrinterService.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at jp.co.epson.uposcommon.util.EpsonJposServiceInstanceFactory.createIns
tance(Unknown Source)
        at jpos.loader.simple.SimpleServiceConnection.connect(Unknown Source)
        at jpos.BaseJposControl.open(Unknown Source)
        at checkhealthtool.CheckHealthTool.executeCheckHealth(Unknown Source)
        at checkhealthtool.CheckHealthTool.checkHealthButton_Click(Unknown Sourc
e)
        at checkhealthtool.CheckHealthTool.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
95)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6288)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:6053)
        at java.awt.Container.processEvent(Container.java:2041)
        at java.awt.Component.dispatchEventImpl(Component.java:4651)
        at java.awt.Container.dispatchEventImpl(Container.java:2099)
        at java.awt.Component.dispatchEvent(Component.java:4481)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
        at java.awt.Container.dispatchEventImpl(Container.java:2085)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4481)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
        at java.awt.EventQueue.access$000(EventQueue.java:84)
        at java.awt.EventQueue$1.run(EventQueue.java:602)
        at java.awt.EventQueue$1.run(EventQueue.java:600)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:87)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:98)
        at java.awt.EventQueue$2.run(EventQueue.java:616)
        at java.awt.EventQueue$2.run(EventQueue.java:614)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:87)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not
 initialize class jp.co.epson.upos.pntr.U230Service
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at jp.co.epson.uposcommon.util.EpsonJposServiceInstanceFactory.createIns
tance(Unknown Source)
        at jpos.loader.simple.SimpleServiceConnection.connect(Unknown Source)
        at jpos.BaseJposControl.open(Unknown Source)
        at checkhealthtool.CheckHealthTool.executeCheckHealth(Unknown Source)
        at checkhealthtool.CheckHealthTool.checkHealthButton_Click(Unknown Sourc
e)
        at checkhealthtool.CheckHealthTool.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
95)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6288)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:6053)
        at java.awt.Container.processEvent(Container.java:2041)
        at java.awt.Component.dispatchEventImpl(Component.java:4651)
        at java.awt.Container.dispatchEventImpl(Container.java:2099)
        at java.awt.Component.dispatchEvent(Component.java:4481)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
        at java.awt.Container.dispatchEventImpl(Container.java:2085)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4481)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
        at java.awt.EventQueue.access$000(EventQueue.java:84)
        at java.awt.EventQueue$1.run(EventQueue.java:602)
        at java.awt.EventQueue$1.run(EventQueue.java:600)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:87)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:98)
        at java.awt.EventQueue$2.run(EventQueue.java:616)
        at java.awt.EventQueue$2.run(EventQueue.java:614)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCo
ntrolContext.java:87)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

I am using Windows Server 2003 and JDK 1.5.

Which library files are missing?

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

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

发布评论

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

评论(2

阪姬 2024-12-12 10:27:11

从 Java 技术角度来看:DLL 和 java 库要么丢失,要么位于不同的位置。

从应用程序的角度来看:由于您有安装例程(手册)和 adk 附带的一些批处理文件,我非常确定您应该再次阅读文档。我猜您错过了一个步骤或更改了安装路径,因此批处理文件查看了错误的位置。

From a technical Java perspective: a DLL and a java library are either missing or expected at a different location.

From an application perspective: As you have an installation routine (manual) and some batch file shipped with the adk, I'm pretty sure that you should read the documentation again. I guess that you've missed a single step or changed installation paths so the batch file looks at wrong locations.

给妤﹃绝世温柔 2024-12-12 10:27:11

简短回答:检查 java.library.path (System.out.println(System.getProperty("java.library.path")。
确保有 jp_co_
路径中的 epson_upos_firm_FirmNativeAccess.dll。

长答案:如果您要安装 EPSON Java POS,请打开 (Program Files)\EPSON\JavaPOS\SetupPOS\CheckHealth\checkhealth.bat。检查使用哪个 jre 来启动 CheckHealthTest.jar。复制 jp_co_
epson_upos_firm_FirmNativeAccess.dll 从 jre\bin 到 Windows\System32\ 或 java.library.path 中的任何路径

要测试的示例程序

public class Test {

    public static void main(String[] args) {      
        System.out.println(System.getProperty("java.library.path"));
        System.loadLibrary("jp_co_epson_upos_firm_FirmNativeAccess");
    }
}

Short Answer: Check you java.library.path (System.out.println(System.getProperty("java.library.path").
Make sure there is jp_co_
epson_upos_firm_FirmNativeAccess.dll in the path.

Long Answer: If you are installing EPSON Java POS, open (Program Files)\EPSON\JavaPOS\SetupPOS\CheckHealth\checkhealth.bat. Check which jre is using to start CheckHealthTest.jar. Copy the jp_co_
epson_upos_firm_FirmNativeAccess.dll from jre\bin into Windows\System32\ or any path in java.library.path

Sample Program To Test

public class Test {

    public static void main(String[] args) {      
        System.out.println(System.getProperty("java.library.path"));
        System.loadLibrary("jp_co_epson_upos_firm_FirmNativeAccess");
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文