piter197
Posts: 830
Joined: Sun Jan 09, 2011 3:32 am

Error when Save As Template

Wed Oct 09, 2013 7:32 am

Hi Support,

My GGS Core 3.1.0.3840, Patch.3840 ver 3.1.0.5258 and Reporting ver 3.1.0.5261.

When I tried to save an application (Application ID=26) into a Template, I got this error message: "An error occurred: Could not copy application. Report ID = 73 does not exist
See the error log for more details."


No error in IIS error log file, but in NMEA error log file:

2013-10-09 10:18:57.4776 | Error | 11 | TemplateExporter.ExportObject | Report ID = 73 does not exist | Report ID = 73 does not exist (Franson.DAO.NotFoundException)
at GpsGate.Reporting.v3.DAO.ReportWriterDAO.LoadByID(Int32 iID)
at Franson.Templating.TemplateExporter.ExportObject(XmlWriter writer, TemplateBag template, List`1 lstPartialTemplateMerges)

2013-10-09 10:18:57.4776 | Error | 11 | MergeApplicationCmdExe.Commit | Could not copy application. Report ID = 73 does not exist | Report ID = 73 does not exist (Franson.DAO.NotFoundException)
at GpsGate.Reporting.v3.DAO.ReportWriterDAO.LoadByID(Int32 iID)
at Franson.Templating.TemplateExporter.ExportObject(XmlWriter writer, TemplateBag template, List`1 lstPartialTemplateMerges)
at Franson.Templating.TemplateExporter.Export(Stream stream)
at Franson.Templating.TemplateManager.Merge(BOItem templateItem, BOItem targetItem, Guid referenceGuid, Boolean bLogging)
at Franson.Templating.TemplateManager.Merge(BOItem templateItem, BOItem targetItem, Guid referenceGuid)
at GpsGate.Online.Directory.Command.MergeApplicationCmdExe.Commit()


Then I try to to save another application (Application ID=55) into a Template, I got this error message: "An error occurred: Could not copy application. Report ID = 342 does not exist
See the error log for more details."


No error in IIS error log file, but in NMEA error log file:

2013-10-09 10:28:47.9776 | Error | 6 | TemplateExporter.ExportObject | Report ID = 342 does not exist | Report ID = 342 does not exist (Franson.DAO.NotFoundException)
at GpsGate.Reporting.v3.DAO.ReportWriterDAO.LoadByID(Int32 iID)
at Franson.Templating.TemplateExporter.ExportObject(XmlWriter writer, TemplateBag template, List`1 lstPartialTemplateMerges)

2013-10-09 10:28:47.9776 | Error | 6 | MergeApplicationCmdExe.Commit | Could not copy application. Report ID = 342 does not exist | Report ID = 342 does not exist (Franson.DAO.NotFoundException)
at GpsGate.Reporting.v3.DAO.ReportWriterDAO.LoadByID(Int32 iID)
at Franson.Templating.TemplateExporter.ExportObject(XmlWriter writer, TemplateBag template, List`1 lstPartialTemplateMerges)
at Franson.Templating.TemplateExporter.Export(Stream stream)
at Franson.Templating.TemplateManager.Merge(BOItem templateItem, BOItem targetItem, Guid referenceGuid, Boolean bLogging)
at Franson.Templating.TemplateManager.Merge(BOItem templateItem, BOItem targetItem, Guid referenceGuid)
at GpsGate.Online.Directory.Command.MergeApplicationCmdExe.Commit()



Please help. Thank you.

Best Regards,
piter197

User avatar
Mattias
GpsGate
Posts: 135
Joined: Wed Dec 16, 2009 3:59 pm
Location: Sweden

RE: Error when Save As Template

Wed Oct 09, 2013 12:36 pm

Hi,

We are not sure why this is happening, but try running these queries in the database to fix it:

A)
UPDATE template
SET deleted = 1
WHERE object_type = 'GpsGate.Reporting.v3.ReportWriter'
AND object_id NOT IN (SELECT report_id FROM reportv3_report);

B)
UPDATE template SET object_id = 0 WHERE deleted = 1;

Let us know if you get this problem again. Preferably with steps to repeat it.
By the way, you are not removing anything manually from the database right?

Regards,
Mattias

piter197
Posts: 830
Joined: Sun Jan 09, 2011 3:32 am

RE: Error when Save As Template

Wed Oct 09, 2013 7:34 pm

Hi Mattias,

I have run those 2 commands and yes it can fixed the Save Template problem.

I never touch the database before.

Thank you.

Best Regards,
piter197

User avatar
Mattias
GpsGate
Posts: 135
Joined: Wed Dec 16, 2009 3:59 pm
Location: Sweden

RE: Error when Save As Template

Mon Oct 28, 2013 1:45 pm

Ok, good.
For future reference, this query might be needed as well: "UPDATE template SET deleted = 1 WHERE object_id = 0;"

Regards,
Mattias

Return to “GpsGate Server - How to setup and use”