2011-09-19 123 views
1

我爲通過以太網連接的epson打印機TMU230安裝了java pos adk(1.11.18)。我通過運行setupPos.exe文件來配置打印機。 當我運行healthCheck.bat文件時,它在控制檯中顯示此錯誤。java pos健康檢查問題

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

的庫文件丟失?

請幫幫我。 在此先感謝。

+0

圖書館可能是'jp_co_epson_upos_firm_FirmNativeAccess.dll'嗎?嗯... – Thomas

回答

0

從技術上的Java角度來看:一個DLL和一個java庫可能在一個不同的位置丟失或期望。

從應用程序的角度來看:由於您有一個安裝例程(手動)和adk附帶的一些批處理文件,我非常確定您應該再次閱讀文檔。我想你已經錯過了一個單獨的步驟或者更改了安裝路徑,以便批處理文件查看錯誤的位置。

+1

對不起,javapos在Windows Server 2003系統上不起作用。我忘了閱讀文檔。 –

0

簡短的回答:檢查你的java.library.path(的System.out.println(System.getProperty( 「的java.library.path」) 確保有jp_co_ epson_upos_firm_FirmNativeAccess.dll路徑

Long答:如果您正在安裝EPSON Java POS,請打開(Program Files)\ EPSON \ JavaPOS \ SetupPOS \ CheckHealth \ checkhealth.bat。檢查啓動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"); 
    } 
}