Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
BA621858188
Creator
Creator

Null pointer exception while passing variable from Main job to Joblet

Hi All,

 

I am facing an issue while passing the main job variable to Joblet.

Joblet design -

tprejob --> tdbconnection

Input (taking from the main job) ---> tjava (to store the input in context) ---> tdbrow (calling procedure) ---> (obsubjobok) ---> Triggeroutput

Main job design -

Fixedflowinput(which is having variable that will pass as Input to Joblet) ---> calling above joblet---> onsubjobok ---> tjava(to print msg)

Issue-

I am creating one variable name and "abc" as value, in tfixedflowinput of main job and that I need to pass in Store procedure in joblet but am facing an error as "Null pointer exception". It is not able to pass that variable to joblet.

Can anyone help me on this?

using variable in joblet as below:

context.name=input_row.name;

can anyone help me on this?

Labels (4)
1 Solution

Accepted Solutions
BA621858188
Creator
Creator
Author

@Shicong Hong​ ,

 

I have used different method and issue is solved now.

View solution in original post

4 Replies
Anonymous
Not applicable

using tJavaRow replace of tJava in joblet.

 

Regards

Shong

BA621858188
Creator
Creator
Author

@Shicong Hong​ 

 

I am using tjavarow only in my joblet. it was typo by mistake.

Anonymous
Not applicable

I am not able to reproduce the issue. You need to do more testing or debug the java code of Job to find out where the NPE was thrown, for example, print the value of context variable on tJavaRow, if you have the expected value, means the value was passed correctly from main job.

 

context.name=input_row.name;

System.out.println(context.name);

BA621858188
Creator
Creator
Author

@Shicong Hong​ ,

 

I have used different method and issue is solved now.