Choose your language

Choose your login


Errors when running db-tools


DB-tools is a command-line utility for PaperCut to query or modify the database as needed. Instructions to use this tool are documented in our manual here: Database tool (db-tools). This article exists to discuss the various errors seen when running db-tools that customers have raised with us.

Error: Can’t connect to window server – not enough permissions.

On some Mac systems, PaperCut 13.3 and older may generate an error and fail when attempting to use db-tools as part of restoring a database, a required activity when migrating a Primary Server installation of PaperCut.

The applicable error message is:

Error running db-tools, command: init-db.

Can’t connect to window server – not enough permissions.

This can be addressed by opening the db-tools file with a text editor such as vi, and adding the following parameter line after ${JAVA_CMD} \:

"-Djava.awt.headless=true" \

Your file will then resemble:

  ${JAVA_CMD} \
  "${TMP_DIR}" \
  "-Dserver.home=${SERVER_HOME}" \
  "-Djava.awt.headless=true" \
  -Xmx256M \ \

Error: GC overhead limit exceeded

Error occurred running db-tools, command: 
 delete-old-logs. GC overhead limit exceeded

We have seen this error at a few busy sites when using db-tools to delete old logs. (Sites printing couple of thousands of pages every day) By default, db-tools application uses 256M of memory which can be increased by making the following changes.

  1. Open db-tools file using a text editor.
  2. Find the line Xmx256M
  3. Try adding more amount by doubling it. E.g. Xmx512M
  4. Save the file.
  5. Test it if that works and change the memory parameter accordingly to your needs.

Error: Malformed \uxxxx encoding

The PaperCut Support team recently came across this error when a customer was Up Sizing their PaperCut installation to use an external Microsoft SQL database.

PaperCut Supports both SQL Authentication (preferred) and Windows Authentication when connecting to the Microsoft SQL database.

In this particular instance, the Windows User was companydomain\universal. The universal is non-generic in this example. This meant that when running db-tools init-db, the Java environment that PaperCut is developed in returned the following error:

Error ocurred running db-tools, command: init-db.
Malformed \uxxxx encoding.

The file would require the \ to be escaped if this was the correct method of entering the Windows Authentication details. When using Windows Authentication, the username and password is not required.

More specifically, this error is because \u is reserved in Java for escaping Unicode strings.

Hopefully, this should resolve the issue. If you still see issue, please contact support. If you can include the Application server logs, that would be super helpful.

Categories: Troubleshooting Articles , Databases

Keywords: mac os x , x windows , x11 , error restoring database , not enough permissions os x 10.8 , error window manager , error window manager


Last updated June 13, 2024