简体   繁体   English

包括jpos.xml

[英]Include jpos.xml

I'm making POS system and now I'm trying set up pos printer epson tm-t20. 我正在制作POS系统,现在尝试设置pos打印机epson tm-t20。 When I try open port, wher is a printer, I got this error message: 当我尝试打开端口时,如果是打印机,则会收到以下错误消息:

jpos.JposException: Could not connect to service with logicalName = POSPrinter: Exception.message=Could not create service instance. at jpos.loader.simple.SimpleServiceConnection.connect(Unknown Source) at jpos.BaseJposControl.open(Unknown Source) at tisk.Step1Frame.processWindowEvent(Step1Frame.java:83) at java.awt.Window.processEvent(Window.java:2009) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703) at java.awt.EventQueue.access$000(EventQueue.java:102) at java.awt.EventQueue$3.run(EventQueue.java:662) at java.awt.EventQueue$3.run(EventQueue.java:660) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:676) at java.awt.EventQueue$4.run(EventQueue.java:674) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:673) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)

I have jpos.xml generated, but I have no idea where to put it into the project.. 我生成了jpos.xml,但不知道将其放入项目中的位置。

the file can be place any where but the root is the best place to start. 该文件可以放在任何位置,但根目录是最好的开始位置。 /* If you want to place the jpos.xml file elsewhere on your local file system then uncomment the following line and specify the full path to jpos.xml. / *如果要将jpos.xml文件放在本地文件系统上的其他位置,请取消注释以下行并指定jpos.xml的完整路径。

 If you want to place the jpos.xml file on a webserver for access over the internet then uncomment
 the second System.setProperty line below and specify the full URL to jpos.xml.
 */

System.setProperty( JposPropertiesConst.JPOS_POPULATOR_FILE_PROP_NAME, "jpos.xml");

System.setProperty(JposPropertiesConst.JPOS_POPULATOR_FILE_URL_PROP_NAME, "http://some-where-remote.com/jpos.xml");

error try adding this 错误尝试添加此

  System.setProperty("jpos.loader.serviceManagerClass", "jpos.loader.simple.SimpleServiceManager");
  System.setProperty("jpos.config.populatorFile", "jposxml.cfg");
  System.setProperty("jpos.util.tracing.TurnOnNamedTracers", "JposServiceLoader,SimpleEntryRegistry,SimpleRegPopulator,XercesRegPopulator");
  System.setProperty("jpos.util.tracing.TurnOnAllNamedTracers", "ON");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM