Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I know that there are other topics with the same error, but I cannot find a solution to my specific case.
I got the following error, after I add tFileList to my Job:
Exception in component tHashInput_1 (mainElab_Gal_Alf)
java.lang.RuntimeException: The hash is not initialized : The hash must exist before you read from it
at alf.mainelab_gal_alf_0_1.mainElab_Gal_Alf.tHashInput_1Process(mainElab_Gal_Alf.java:17080)
at alf.mainelab_gal_alf_0_1.mainElab_Gal_Alf.runJobInTOS(mainElab_Gal_Alf.java:24539)
at alf.mainelab_gal_alf_0_1.mainElab_Gal_Alf.main(mainElab_Gal_Alf.java:24370)
Exception in component tHashInput_2 (mainElab_Gal_Alf)
java.lang.RuntimeException: The hash is not initialized : The hash must exist before you read from it
at alf.mainelab_gal_alf_0_1.mainElab_Gal_Alf.tHashInput_2Process(mainElab_Gal_Alf.java:23150)
at alf.mainelab_gal_alf_0_1.mainElab_Gal_Alf.tHashInput_3Process(mainElab_Gal_Alf.java:21136)
at alf.mainelab_gal_alf_0_1.mainElab_Gal_Alf.runJobInTOS(mainElab_Gal_Alf.java:24551)
at alf.mainelab_gal_alf_0_1.mainElab_Gal_Alf.main(mainElab_Gal_Alf.java:24370)
Exception in component tHashInput_6 (mainElab_Gal_Alf)
java.lang.RuntimeException: The hash is not initialized : The hash must exist before you read from it
at alf.mainelab_gal_alf_0_1.mainElab_Gal_Alf.tHashInput_6Process(mainElab_Gal_Alf.java:23988)
at alf.mainelab_gal_alf_0_1.mainElab_Gal_Alf.runJobInTOS(mainElab_Gal_Alf.java:24563)
at alf.mainelab_gal_alf_0_1.mainElab_Gal_Alf.main(mainElab_Gal_Alf.java:24370)
Does anyone could help me please?
Thank you in advance!!
Hi,
I believe you are trying to say that you added OnSubJob OK to tHashInput of next section.
This means that all of your tHashOutputs are not getting populated. Please add a tLogrow before each tHashOutput to verify whether data is coming. It is the most easy way to check whether data is getting loaded.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi,
This normally happens when you are trying to read a tHashInput which do not have any content even though you have mapped it to a tHashOutput.
In your usecase, you are loading data to 4 tHashOutputs. But it seems the tHashInput (tHashInput_1) which you are trying to read, do not have any data since the associated tHashOutput was not populated in previous stage.
Another reason normally happens is that you are reading same tHashOutput multiple times. But during first read, the clear Hash Option would have selected and when the same Hash is used for reading again by another tHashInput, it will get error.
So please refer your job again by adding tLogRow in between to verify whether tHashOutput is getting right data. The issue can happen based on one of the two cases which I had specified above.
Please also add OnSubJob OK as specified in @uganesh post.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi,
I'll often connect a tFixedFlowInput with the correct schema and zero rows to a Hash and then link all others to that to avoid this problem.
I connected:
tFileList -->onSubjobOK-- tHashOutput1
tHashOutput1 -->onSubjobOK-- tHashOutput3
tHashOutput3 -->onSubjobOK-- tHashOutput6
but I am still gettin the error on tHashInput_1
Hi,
I believe you are trying to say that you added OnSubJob OK to tHashInput of next section.
This means that all of your tHashOutputs are not getting populated. Please add a tLogrow before each tHashOutput to verify whether data is coming. It is the most easy way to check whether data is getting loaded.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
I am sorry!! It was tFileList problem!! I check the context variable and corrected it. Now it works!
Thank you for your help.