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: 
Anonymous
Not applicable

globalMap crashes when passing to subjob if queries are present

I have a parent job, and a child job that needs to affect a variable in the parent's globalMap.  I have done this many, many times before in plenty of jobs.  I pass the globalMap of the parent as an Object-type context variable, and then cast the object to a map in the child job.  Pretty straight forward, and is described in plenty of places on the internet.  Where I run into a problem is when there are SQL queries that execute before the pass to the child job.  It seems as though the commas "," in the globalMap query variables are preventing the globalMap from maintaining its type, or rather forcing it to be passed as a string.  This is the error I get when the tsubjob attempts to run:
Exception in thread "main" java.lang.StackOverflowError
at java.lang.ClassLoader.getPackage(ClassLoader.java:1619)
at java.lang.Package.getPackage(Package.java:334)
at java.lang.Class.getPackage(Class.java:796)
at routines.system.JSONObject.wrap(JSONObject.java:1366)
at routines.system.JSONObject.populateMap(JSONObject.java:824)
at routines.system.JSONObject.<init>(JSONObject.java:250)
at routines.system.JSONObject.wrap(JSONObject.java:1372)
at routines.system.JSONObject.populateMap(JSONObject.java:824)
at routines.system.JSONObject.<init>(JSONObject.java:250)
at routines.system.JSONObject.wrap(JSONObject.java:1372)
at routines.system.JSONObject.populateMap(JSONObject.java:824)
at routines.system.JSONObject.<init>(JSONObject.java:250)

The error repeats itself ad nauseam until the job force quits.  I am honestly not sure if it is the queries, but it is the only coincidence I can find between jobs that throw that error and jobs that don't.  Why isn't storing the queries in the globalMap optional?  Why store them at all?  Why aren't they stored in the globalMap with at least maintaining there surrounding double quotes (which could be used for filtering)?  Why would the globalMap be forced into a string when passed as an object?  Mostly, why do you think I am getting this error, and what can I do to resolve it?
P.S.  There was a similar reference to this problem https://community.talend.com/t5/Design-and-Development/resolved-Large-object-context-variables-to-tR..., it is marked as resolved, but it never really was, the poster just went around the problem instead of finding the reason and solution.
Labels (4)
4 Replies
Anonymous
Not applicable
Author

Hi,
Have you already checked document about: TalendHelpCenter0683p000009MAB6.pngassing a value from a parent Job to a child Job?
Could you please post your job setting screenshots into forum which will helpful for us to diagnose  your issue quickly?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi, I'm having the same problem, did you find a solution? thanks

Anonymous
Not applicable
Author

@andreapaglia - Could you please provide job screen shots with some input data you are trying to process?

 

It will help the community members to provide a better solution.

 

Warm Regards,

 

Nikhil Thampi

Anonymous
Not applicable
Author

I actually solved my problem with a workaround: instead of passing the whole globalMap of the parent job to the child job, I passed to the child job only the parameters that the sub job actually needed to execute (that makes a lot of sense, now that I think about it).

It seems like the SQL queries contained in the parent globalMap, cause some problems to the child job when passed to it (even if not used)