title: Java Mainframe JCL call
body: <p>From JCL, i'm trying to call java program.The intention of java program is to hit oracle database and fetch records. This java program works fine in my windows without error. But when it is called from JCL, i'm getting this exception.
  windows java version : 1.6
  Ojdbc version : ojdbc6.jar</p>
  
  <p>Is there any compatible issue with version of ojdbc jar and the java version(z/OS) in mainframe?</p>
  
  <pre><code>java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
  at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:942)
  at oracle.jdbc.driver.T4CTTIoauthenticate.&lt;init&gt;(T4CTTIoauthenticate.java:221)
  at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:358)
  at oracle.jdbc.driver.PhysicalConnection.&lt;init&gt;(PhysicalConnection.java:508)
  at oracle.jdbc.driver.T4CConnection.&lt;init&gt;(T4CConnection.java:203)
  at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
  at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
  at java.sql.DriverManager.getConnection(DriverManager.java:426)
  at java.sql.DriverManager.getConnection(DriverManager.java:474)
  </code></pre>