- 24 Apr 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Blueprint: Print jobs are not importing due to a PHAROSDBERROR_FOREIGN_KEY_CONSTRAINT error with the Logical Printer GUID
- Updated on 24 Apr 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Environment
Pharos Blueprint v3.5
Pharos Blueprint v3.6
Pharos Blueprint v4.1
Pharos Blueprint v4.2
Pharos Blueprint v5.0
Symptoms
ERROR: "[PrintJobLogger.Log] SystemException thrown. - PHAROSDBERROR_FOREIGN_KEY_CONSTRAINT : "LogicalPrinters.LogicalPrinterGuid"" followed by a GUID
"Partial Success" status for Collector job imports
A user is not showing up with any data in reports
Cause
The job record is referencing the Logical Printer's GUID as the output destination, but that GUID does not exist in the database. This can be due to file corruption for the logical printer's record on the local workstation, or the workstation identifier (again, a GUID) does not exist in the database.
Resolution
NOTE: This resolution only applies to the "file corruption for the logical printer's record" cause above. For the missing workstation identifier, please see Knowledge Base article 1837 for that procedure.
Find the name of the computer for the user. The error record will give no mention of the computer (Machine) or its GUID, but it does expose the user's network logon ID. A tool like PsLoggedOn from Microsoft SysInternals group can help obtain this information.
Using Windows Explorer, connect to the computer's administrative share on the C drive (normally \\computername\c$) and browse to
(Windows XP) C:\Documents and Settings\All Users\Application Data\PharosSystems\Blueprint\Stores\LogicalPrinters
(Windows 7) C:\ProgramData\PharosSystems\Blueprint\Stores\LogicalPrinters
Find the XML file whose name corresponds with the one specified in the error.
Delete it.
Back up one level to the \Blueprint directory and open the OutboundJobs directory.
Delete any files in there.
Exit the session.
During the next print request, the Blueprint Tracker will create another XML file for the "new" logical printer and this will be referenced in all subsequent print job data. As the new XML file for the logical printer is not corrupted, all print job entries to the Blueprint Collector should import into the database normally.
NOTE: If this operation does not resolve the issue, the only recourse will be to uninstall the Tracker from the workstation and then install a fresh instance.