Closed GoogleCodeExporter closed 9 years ago
Joel,
No I have not, however most of these raw devices support sending some form of
"Reset" command to them if it's related to the printer receiving bad commands.
If you need to unregister the device in Windows each time, I can understand how
painful that would be.
Is this happening on multiple computers? There are a lot of different
companies using jZebra for industry printing, so it may be worth throwing the
question at the mailing list.
One quick refresh of the print spooler in Windows is: "cmd /k net stop spooler
& net start spooler & pause"
You can also script the addition and removal of the print queue using rundll32
from that same tutorial for now.
I'm interested in knowing your findings and if they are in fact caused by
jZebra or if there is an underlying problem with your OS/hardware.
-Tres
Original comment by tres.fin...@gmail.com
on 13 Apr 2012 at 1:52
Hi Tres,
So I’ve been doing some testing on it, and I have a little more light to shed
on the problem. And I think someone has approached you with it before as well.
It seems to happen with a number of different events... With some computers, if
the printer is unplugged, then it’ll throw the error, and using our system,
we’re actually sending ESC/P commands sometimes, and sometimes we print the
traditional method using the printers driver (for example, in our POS receipts
will print automatically (ESC/P) when a transaction is made, and if someone
wants to print off a historical receipt, they dig into the sales records, and
print manually (control P) to print that off). As soon as we do a manual print
to the receipt printer, it kills it for jZebra... Or more specifially to java.
The Java Console is spitting out this error:
SEVERE: Error
javax.print.PrintException: Printer is not accepting job.
at sun.print.Win32PrintJob.print(Unknown Source)
at jzebra.PrintRaw.print(PrintRaw.java:160)
at jzebra.PrintApplet.logAndPrint(PrintApplet.java:728)
at jzebra.PrintApplet.startJavaScriptListener(PrintApplet.java:193)
at jzebra.PrintApplet.access$000(PrintApplet.java:33)
at jzebra.PrintApplet$1.run(PrintApplet.java:81)
at java.security.AccessController.doPrivileged(Native Method)
at jzebra.PrintApplet.run(PrintApplet.java:76)
at java.lang.Thread.run(Unknown Source)
I saw on the jZebra issues where someone brought this up on a different
project, but there wasn’t much talk about a solution.
I found this, which helped explain what was going on so that I was
understanding the problem.
http://copy-con.blogspot.com/2009/12/printer-is-not-accepting-job.html
It also outlines a workaround fix to the problem, but I’m not Java saavy, and
am wondering if that is really the only way to fix this issue.
We have multiple computers running the POS, so I’m thinking this isn’t
necessarily a one time fix, but something that will need to happen on all of
the computers that want to run it (and keep the automatic printing working).
Again, I’m not sure what all scenarios there are that would somehow make the
printer return a status of “not accepting jobs,” but so far we’ve run
into 1. Power outage, 2. Computer falling asleep, 3. Switching usb ports, 4.
Restarting computers, and 5. Printing manually.
... If you had any help to get me on the right path, I’d be grateful.
Thanks again.
Joel
Original comment by tres.fin...@gmail.com
on 13 Apr 2012 at 1:54
[The link you provided] is a great write-up. I'm curious as to why there's no
bug filed with oracle on this though...
I have absolutely no idea what he's doing, but it seems to be an improved
behavior with the printer readiness. I actually don't see any code doing
anything, in his example except add a jar to the classpath, so I'm curious if
his jar packs a DLL if it's code I can bundle into jZebra. The smaller the
better. I'd be happy to try out his code and send you a custom build with this
feature enabled.
Original comment by tres.fin...@gmail.com
on 13 Apr 2012 at 1:54
Update:
Found the Oracle bug report:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6525150
And the Java Forums:
https://forums.oracle.com/forums/thread.jspa?threadID=1287312
Blogger's Solution:
http://copy-con.blogspot.com/2009/12/printer-is-not-accepting-job.html
Original comment by tres.fin...@gmail.com
on 13 Apr 2012 at 1:55
Since this is a Java bug, it's technically not a jZebra bug, but there's some
complains on the java forums about it being around for years, so a work-around
is in store.
I'll try some of the suggested work-arounds and have Joel test them.
-Tres
Original comment by tres.fin...@gmail.com
on 13 Apr 2012 at 2:02
Original comment by tres.fin...@gmail.com
on 19 Apr 2012 at 3:41
Tried manual work-arounds and they don't work. Closing as "wont-fix", although
technically this bug will stick around until the JRE has fixed it. Possible
suggestion is to re-open bug with Oracle.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6525150
If someone finds a different work-around, please reopen and post the solution.
-Tres
Original comment by tres.fin...@gmail.com
on 22 Aug 2012 at 5:42
Issue 36 has been merged into this issue.
Original comment by tres.fin...@gmail.com
on 22 Aug 2012 at 6:05
Issue 81 has been merged into this issue.
Original comment by tres.fin...@gmail.com
on 22 Aug 2012 at 6:05
Original issue reported on code.google.com by
tres.fin...@gmail.com
on 13 Apr 2012 at 1:51