Basics
The device drivers does not directly connect to the printer. It connects itself to a local windows service.
Error COM_0040
The logs are saying : Caused by: java.net.ConnectException: Connection refused: connect
Ensure that the service is Running:
Or run the command telnet 127.0.0.1 18000, which should not display any error