Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

"General Script Error" woes

I've been trying to figure this out for hours now and can't get to the bottom of it.  I developed an application using v11 and everything works fine.  I put it on the v11 server, reload, and it fails every time.

Here are the final few lines of the task log,

7/24/2013 13:57:20.7287493 Information Reloading

7/24/2013 13:58:20.7309308 Information Reloading.

7/24/2013 13:58:46.8032143 Information The Source Document reload complete. DocumentPath=E:\QlikView\Documents\Knova\QV11_RGN_ConsonaKM_v4.qvw

7/24/2013 13:58:46.8032143 Information Memory Allocation Delta for this file=801.66 Mb. Available Physical Memory Before Reload=3219.25 Mb. Available Physical Memory After Reload=2402.55 Mb. Total Physical Memory=2402.55 Mb.

7/24/2013 13:58:47.2562378 Error The Source Document was NOT reloaded successfully. DocumentPath=E:\QlikView\Documents\Knova\QV11_RGN_ConsonaKM_v4.qvw.

7/24/2013 13:58:47.3187238 Information Closing the document.

7/24/2013 13:58:47.8810978 Information Closed the QlikView Engine successfully. ProcessID=1356

7/24/2013 13:58:50.1305938 Error The task "Knova/QV11_RGN_ConsonaKM_v4.qvw" failed. Exception:

QDSMain.Exceptions.DistributionFailedException: Distribute failed with errors to follow. ---> QDSMain.Exceptions.ReloadFailedException: Reload failed ---> QDSMain.Exceptions.LogBucketErrorException: The Source Document was NOT reloaded successfully. DocumentPath=E:\QlikView\Documents\Knova\QV11_RGN_ConsonaKM_v4.qvw.

   at QDSMain.ReloadTask.VerifyConditions(TaskResult taskResult)

   at QDSMain.ReloadTask.Reload(String fileName, TaskResult taskResult, String sectionAccessUserName, String sectionAccessPassword, eReloadOptions reloadOption, String variableName, String variableValue, Boolean moniterCpuUsage)

   --- End of inner exception stack trace ---

   at QDSMain.ReloadTask.Reload(String fileName, TaskResult taskResult, String sectionAccessUserName, String sectionAccessPassword, eReloadOptions reloadOption, String variableName, String variableValue, Boolean moniterCpuUsage)

   at QDSMain.DistributeTask.Execute(TaskResult currentTaskResult)

   --- End of inner exception stack trace ---

   at QDSMain.DistributeTask.Execute(TaskResult currentTaskResult)

   at QDSMain.Task.AbstractTask.TaskExecution(ILogBucket logBucket, TaskResult taskResult)

7/24/2013 13:58:50.2711873 Information Task Execute Duration=00:05:34.1985954

7/24/2013 13:58:50.2711873 Information TaskResult.status=Finished

7/24/2013 13:58:50.4117808 Information Notifying all triggers of new state:FinishedWithErrors

7/24/2013 13:58:50.4274023 Information Notifying all triggers of new state:FinishedWithErrors - completed

7/24/2013 13:58:50.4742668 Information Saving Task Result

And here are the final few lines of the document log,

7/24/2013 13:58:09.9364743 Information 2013-07-24 p1:58:09: 0112  IF -1 THEN

7/24/2013 13:58:09.9364743 Information 2013-07-24 p1:58:09: 0114    CONCATENATE (RGN_GenAct) LOAD * FROM GenAct.qvd (qvd)

7/24/2013 13:58:09.9364743 Information 2013-07-24 p1:58:09: 0115    

7/24/2013 13:58:09.9364743 Information 2013-07-24 p1:58:09:          17 fields found: LogDate, LogTime, SessionID, UserID, EventType, SessionMicrosite, SearchQuery, UserName, UserTitle, UserDepartment, UserRole, BankingGroup, BankingArea, BankingMarket, UserCCName, UserBranchID,

7/24/2013 13:58:46.2408403 Information UserCCID,

7/24/2013 13:58:46.7407283 Information General Script Error

7/24/2013 13:58:46.7407283 Information 2013-07-24 p1:58:46:         Execution Failed

7/24/2013 13:58:46.7407283 Information 2013-07-24 p1:58:46:      Execution finished.

Thanks in advance to any assistance you can provide.

8 Replies
Not applicable
Author

A little more information.  The words "General Script Error" above in the document log are always in the place of "X lines fetched" of a successful run.  Not sure what that means, but it seems interesting.

Miguel_Angel_Baeyens

Hi Mick,

Those errors sometimes happen when either the filesystem where the files are stored are running out of space or more likely, because a write operation attempt has failed, for example, in a STORE line trying to overwrite a QVD file when the Windows UAC is set, or because of a lack of permissions.

Is there any chance this is happening?

Hope that helps.

Miguel

Not applicable
Author

Thanks for the response.

It doesn't look like those are factors here.  The account running the services is a local admin on the server and there is plenty of space available.

Miguel_Angel_Baeyens

Mick,

If you see the script, what is the next line to the error, or the one that should be executed after the LOAD statement that make QlikView stop throwing "Execution Failed"?

Miguel

Not applicable
Author

Looks like it might be failing here,

 

IF $(vQvdExists) THEN

CONCATENATE ($(vTableName)) LOAD * FROM $(vQvdFile) (qvd) ;

END IF

Not applicable
Author

A couple of interesting items....

1 - When I reload the app from my machine it reloads fine, but the QVDs disappear.  NOTE - it never runs an incremental load which it is scripted to do, but at least it does load.

2 - When I reload the exact same app from the QV server it fails, but the QVDs are where I expect them to be.

Server = v11.00.11282 x86

Desktop = v11.20.11922 x64

Miguel_Angel_Baeyens

Hi Mick,

Indeed a weird behavior. So I guess vQvdExists stores a numeric value 0 or 1 for false or true, and vTableName and vQvdFile a string that is correctly populated.

It would make sense for if you are using Publisher tasks in the server to reload and as the script never gets to the STORE file, the QVD is not generated.

Am I guessing it right?

Miguel

Not applicable
Author

I found a setting on my desktop client which deletes the QVD after a reload, so that is straight.  Now on to my real problem.

You've got the jist of it.  Here is the part of the script creating the QVD or loading it incrementally.

 

SET vQvdFile='c:\mick\openfolder\qv\GenAct.qvd'; //The QVD filename on my machine
//SET vQvdFile='E:\QlikView\Documents\Knova\GenAct.qvd'; //The QVD filename on NOCDKMCOMBO1
SET vTableName='RGN_GenAct';  //The name of the QV table we are loading on the Data Load tab
//SET vPK='EventId';    //Data Primary Key


// Set a variable indicating if the QVD exists or not. -1 is True, 0 is False
LET vQvdExists = if(FileSize('$(vQvdFile)') > 0, -1, 0);


IF $(vQvdExists) THEN  // QVD exists, we will do an incremental reload
maxdateTab:
// Get the max date from this QVD for use in incremental SELECT
LOAD max(date(LogDate)) as maxdate //?? Set the name of the date or datetime field
FROM $(vQvdFile) (qvd);

LET vIncrementalExpression = 'WHERE LogDate >' & chr(39) & peek('maxdate') & chr(39);
DROP table maxdateTab;

ELSE      // QVD does not exist
LET vIncrementalExpression = '';  // No QVD. Force full reload
END IF

RGN_GenAct:
sql select
  LogDate
, LogTime
,  SessionID
,  UserID
,  EventType
,  Microsite as SessionMicrosite
,  upper(SearchQuery) as SearchQuery
,  UserName
,  UserTitle
, UserDepartment
,  UserRole
,  BankingGroup
,  BankingArea
,  BankingMarket
, UserCCName
,  UserBranchID
,  UserCCID
from "kanalyticsprod"."dbo"."RGN_GenAct"
$(vIncrementalExpression);

// If incremental reload was , load previous data and concatenate to data just read.
IF $(vQvdExists) THEN
// Use CONCATENATE in case we've added any new fields.
CONCATENATE ($(vTableName)) LOAD * FROM $(vQvdFile) (qvd);
END IF

/*
Overwrite the QVD with the QV datatable.
*/
STORE $(vTableName) INTO $(vQvdFile);