tOracleInput: ArrayIndexOutOfBoundsException

One Star

tOracleInput: ArrayIndexOutOfBoundsException

My job (DMI) is OK in Talend, but when I call it in Linux or Windows (java -jar ...), I have this error:
java.lang.ArrayIndexOutOfBoundsException: -1
       at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:1019)
       at oracle.jdbc.driver.T4CTTIoauthenticate.<init>(T4CTTIoauthenticate.java:186)
       at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:354)
       at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:454)
       at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
       at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
       at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:802)
       at java.sql.DriverManager.getConnection(Unknown Source)
       at java.sql.DriverManager.getConnection(Unknown Source)
       at dmi.dmi_1_2.DMI.tOracleInput_1Process(DMI.java:1996)
       at dmi.dmi_1_2.DMI.tOracleInput_2Process(DMI.java:5682)

DMI.java: 1996 :
conn_tOracleInput_1 = java.sql.DriverManager.getConnection(
url_tOracleInput_1, dbUser_tOracleInput_1,
dbPwd_tOracleInput_1);

Previous lines:
int nb_line_tOracleInput_1 = 0;
java.sql.Connection conn_tOracleInput_1 = null;
String driverClass_tOracleInput_1 = "oracle.jdbc.driver.OracleDriver";
java.lang.Class.forName(driverClass_tOracleInput_1);
String url_tOracleInput_1 = null;
url_tOracleInput_1 = "jdbc:oracle:thin:@" + "myserver" + ":"
+ "7777" + ":" + "mySID";
String dbUser_tOracleInput_1 = "mylogin";
final String decryptedPassword_tOracleInput_1 = routines.system.PasswordEncryptUtil
.decryptPassword("501385eghf5dd32bb02570r0ee181318");
String dbPwd_tOracleInput_1 = decryptedPassword_tOracleInput_1;

I think it's correct. The line 5682 is like the 1996.
Is it normal the "Unknown Source" in getConnection?
Edit: I use ojdbc14.jar and TOS 5.6.0.
Seventeen Stars

Re: tOracleInput: ArrayIndexOutOfBoundsException

Strange thing. Could you please check if you can use a more recent JDBC driver like ojdbc6.jar. The ojdbc14.jar is very out dated!
The only possible difference between running in Studio and running as standalone job could be a different Java runtime.
One Star

Re: tOracleInput: ArrayIndexOutOfBoundsException

It's the same error with ojdbc6.jar:
Exception in component tOracleInput_1
java.lang.ArrayIndexOutOfBoundsException: -1
       at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:1015)
       at oracle.jdbc.driver.T4CTTIoauthenticate.<init>(T4CTTIoauthenticate.java:238)
       at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:401)
       at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
       at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
       at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
       at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
       at java.sql.DriverManager.getConnection(Unknown Source)
       at java.sql.DriverManager.getConnection(Unknown Source)
       at dmi.dmi_1_2.DMI.tOracleInput_1Process(DMI.java:1996)
       at dmi.dmi_1_2.DMI.tOracleInput_2Process(DMI.java:5682)

The Java version is the same : 1.7.0_51.
Seventeen Stars

Re: tOracleInput: ArrayIndexOutOfBoundsException

Could you please check which Java version do you use for the standalone job?
I guess the default release installed on machines is Java 8 but there are some issues. I would suggest Java 7 for now.
One Star

Re: tOracleInput: ArrayIndexOutOfBoundsException

The Java version is the same : 1.7.0_51.
One Star

Re: tOracleInput: ArrayIndexOutOfBoundsException

The export generate warnings. Where can I see the warnings ?
Seventeen Stars

Re: tOracleInput: ArrayIndexOutOfBoundsException

The Unknown Source message comes from the missing source code (or better not linked source code) in the studio.
You can change it be setting up the JRE in the Preferences of the studio:
Preferences->Java-Installed JRE (do net be confused be "JRE" you need a JDK!)
Choose here the JDK 7 and after this setting you should see the source code.
But this will not help because you will only see in this case the code from an interface.
I suggest you add to your job a tJava and here we check some things:
1. The real Java version you use:
System.out.println(System.getProperty("java.version"));
2. I suggest you set the attributes from the database connection in context variables. 
I suggest you print them out here (only an example, it depends on you names):
System.out.println("Server:" + context.DB_Host); 
One Star

Re: tOracleInput: ArrayIndexOutOfBoundsException

My TOS use a JRE. When it use a JDK, the job can't run : impossible to find or load the main class DMI.
The tjava in TOS, Linux and Windows write 1.7.0_51
The DB host is OK in the Java code. The job use 2 Oracle databases.
Seventeen Stars

Re: tOracleInput: ArrayIndexOutOfBoundsException

This looks like a problem in your Java installation. You can run the exported job also with the same JRE as the studio.
To do this take care the JRE java binary is the one available over the PATH variable.
I use Linux as normal job server and OSX as development workstation. No such problems so far.
One Star

Re: tOracleInput: ArrayIndexOutOfBoundsException

Thank you Jlolling. I don't have the control on my Java installation, I will try to change this.
Seventeen Stars

Re: tOracleInput: ArrayIndexOutOfBoundsException

The start scripts in the standalone jobs usually only use java without path. You can change this by set the full path to the JRE java in the scripts.