Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Not able to connect to a database using context variables talend open studio for Big Data 6.3.1

hello there

I'm using talend open studio for Big Data and trying to connect to a DB using context variables. It fails with an exception. If I connect to the DB using the values instead of context variables then everything is fine. 

 

here is a screenshot of the OracleOutput component setup with context variables0683p000009Lu9x.jpgDB access component setup

if I click on the ... button (which is near the table field) - I will get the following error. It says that Network adapter could not create a connection. If I put values to all the fields but user name - then try to connect it will complain about wrong user name. Apparently the values of the context variables are not placed correctly

 

0683p000009LuA7.png

my DB connection for Oracle with the context variables. If check the connection then I will connect

0683p000009Ltr7.pngDB connection in metadata

here is my context

0683p000009LuAC.pngcontext

 

I checked the generated sources and found the following

1. all my context variables were marked red (I underlined them)

2. the ContextProperties class didn't have those variables (such as  context.Ora_25_49_Login0683p000009MA9p.png

 

I tried the same set up in Open Studio for ESB and everything was fine there. 

 

Please help me to resove the issue 

----------------------------------

url_tOracleOutput_1 = "jdbc0683p000009MA5A.pngracle:thin:@(description=(address=(protocol=tcp)(host="
+ context.Ora_25_49_Server
+ ")(port="
+ context.Ora_25_49_Port
+ "))(connect_data=(service_name="
+ context.Ora_25_49_ServiceName + ")))";
String dbUser_tOracleOutput_1 = context.Ora_25_49_Login;

final String decryptedPassword_tOracleOutput_1 = context.Ora_25_49_Password;

String dbPwd_tOracleOutput_1 = decryptedPassword_tOracleOutput_1;
dbschema_tOracleOutput_1 = context.Ora_25_49_Schema;

--------------------------------

public class ContextProperties extends java.util.Properties {

private static final long serialVersionUID = 1L;

public ContextProperties(java.util.Properties properties) {
super(properties);
}

public ContextProperties() {
super();
}

public void synchronizeContext() {

}

}

private ContextProperties context = new ContextProperties();

public ContextProperties getContext() {
return this.context;
}

Labels (2)
3 Replies
cterenzi
Creator III
Creator III

Shouldn't the values for your String variables be wrapped in quotes?

Anonymous
Not applicable
Author

Are the context variables actually imported into your job? Check the "Contexts" tab and see if they exist within the job. It sounds like they may not. Can you give us a screenshot of your "Contexts" tab?

Anonymous
Not applicable
Author

I have the same error. With the talend open studio the following error is created.

Attached error

I try to connect to an oracle database using service name.

I need help


error talend.txt