Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load an application logfile to check for errors

Hi,

I'm using the User Manager tool to remove licenses that are not in use anymore.

On success, it creates a CSV file that looks like this:

     No CALs to remove on QVS@Test

     No Document CALs to remove from 'Dashboard - 150320.qvw' on QVS@Test

     Removed 6 Document CALs from 'Dashboard.qvw' on QVS@Test

     Removed 1 Document CALs from 'Dashboard_SH.qvw' on QVS@Test

     No Document CALs to remove from Dashboard_UAT.qvw' on QVS@Test

     No Document CALs to remove from 'QVSystemMonitor.qvw' on QVS@Test

     No Document CALs to remove from 'QVSystemMonitor_v5.1.23_sec.qvw' on QVS@Test

Unfortunately, errors don't get caught, instead the content of the CSV might look like this:

     System.NullReferenceException: Object reference not set to an instance of an object.

        at PIX.CalInfo.WriteXml(XmlWriter w)

        at Wrappers.QVSWrapper.CallFunction(String methodName, String iStartElement, String iStartAttribute, IXmlSerializable      arguments, IXmlSerializable outpar, String& message, Byte[][] attachments)

        at Wrappers.QVSWrapper.SetCalInfo(CalInfo i_CalInfo)

        at QMSBackendCore.Communication.QlikViewServer.SetCalInfo(QlikViewServerResource qvsResource, CalInfo calInfo)

        at QMSBackendCore.Service.ServiceImpl.SaveCALConfiguration(CALConfiguration calConfiguration)

I would like to load the csv into my dashboard and check if an error occured or not, How can I?

Thanks

Jens

1 Solution

Accepted Solutions
Ralf-Narfeldt
Employee
Employee

A workaround would be to load it as a fixed record file, which can contain several lines.

Then you can do a resident load to pick out the errors.

log:

LOAD

    "@1:n" As Log

FROM [C:\_QLIKVIEW\CENT.QV\Tickets\18\data\removecal.csv]

(fix, codepage is 1252, no labels, record is 6 lines);

errors:

Load Log As Error Resident log where wildmatch(Log, '*exception*', '*error*');

drop table log;

View solution in original post

3 Replies
Not applicable
Author

I've tried something, but it won't work:

ErrorPrep:

  LOAD

  if(wildmatch(@1, '*exception*', '*error*'), @1, 'N/A') as Log

  FROM

 

  (txt, codepage is 1252, no labels, delimiter is ';', msq)

Problem is that the application six rows (you can also see those in the table viewer), but you cannot access more than one row in the script or data itself.

Ralf-Narfeldt
Employee
Employee

A workaround would be to load it as a fixed record file, which can contain several lines.

Then you can do a resident load to pick out the errors.

log:

LOAD

    "@1:n" As Log

FROM [C:\_QLIKVIEW\CENT.QV\Tickets\18\data\removecal.csv]

(fix, codepage is 1252, no labels, record is 6 lines);

errors:

Load Log As Error Resident log where wildmatch(Log, '*exception*', '*error*');

drop table log;

Not applicable
Author

Thanks Ralf, this is working fine.

I'm wondering a bit, as I tried to load with a fixed record, too, and it didn't work. No clue what I did different than you .