Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 variables
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
my DB connection for Oracle with the context variables. If check the connection then I will connect
here is my context
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_Login
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 = "jdbcracle: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;
}
Shouldn't the values for your String variables be wrapped in quotes?
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?
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