Five Stars

Unable to load context from database

Hi,

 

I have a job as belowpic1.png

 I am trying to load the context of tmssqlinput from database. So the context details sit in loadcontext table in mysql. The table has the rows as shown below

pic2.png

 

Now, my when I get to the extra tab of the job the implicit job details are as follows..

pic3.png

And now when I go the contexts tab of the tmssqlcomponent, the details are as follows

 

 

pic4.png

Now when I run the job I get the error,

 

 

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
***cannot be resolved to a variable
****cannot be resolved to a variable
***cannot be resolved to a variable
*** cannot be resolved to a variable 

 

The *** is the username, password, databasename, and port, that I have hidden due to privacy guidelines


Any help on why I'm unable to get the context from database would be of great help

Thanks
Rathi

6 REPLIES
Six Stars

Re: Unable to load context from database

Have you defined the context variables in contexts tab?
Five Stars

Re: Unable to load context from database

Yes chirgal, I have defined them as context.host, context.port, context.database, context.username, context.password

Six Stars

Re: Unable to load context from database

The *** is the username, password, databasename, and port, that I have hidden due to privacy guidelines.

Referring to your above statements, I want to ask is, have you used double quotes while entering above value?

I suspect, you r missing double qoutes
Five Stars

Re: Unable to load context from database

Hi chirgal,

 

Yes, I had missed the double quotes. Thanks for that :-)

 

But, I still get the same error when I run the job

 

Thanks
Rathi

Six Stars

Re: Unable to load context from database

It means you still missing somewhere.
How many errors are you getting now?

Which variables are unresolved now?
Moderator

Re: Unable to load context from database

Hello,

Have you already checked this online document about:TalendHelpCenterSmiley Frustratedcenario: Reading data from different MySQL databases using dynamically loaded connec...?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.