Oracle JDBC Connection Using SCAN Fails With java.lang.ArrayIndexOutOfBoundsException: -1 (Doc ID 1586834.1)

Last updated on OCTOBER 03, 2016

Applies to:

JDBC - Version 11.2.0.3.0 and later
Oracle WebLogic Server - Version 10.3.6 to 10.3.6
Information in this document applies to any platform.

Symptoms


Testing an Oracle JDBC 11.2.0.3 connection with the next section of code:


fails with the next error:


Aug 26, 2013 11:59:10 AM oracle.jdbc.driver.OracleDriver registerMBeans
WARNING: Error while registering Oracle JDBC Diagnosability MBean.
java.security.AccessControlException: access denied (javax.management.MBeanServerPermission createMBeanServer)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
at java.security.AccessController.checkPermission(AccessController.java:549)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:500)
at oracle.jdbc.driver.OracleDriver.registerMBeans(OracleDriver.java:317)
at oracle.jdbc.driver.OracleDriver$1.run(OracleDriver.java:196)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.jdbc.driver.OracleDriver.(OracleDriver.java:192)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:310)
at sun.misc.Service$LazyIterator.next(Service.java:282)
at java.sql.DriverService.run(DriverManager.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.sql.DriverManager.loadInitialDrivers(DriverManager.java:506)
at java.sql.DriverManager.initialize(DriverManager.java:612)
at java.sql.DriverManager.getConnection(DriverManager.java:560)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
...

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:1068)
at oracle.jdbc.driver.T4CTTIoauthenticate.(T4CTTIoauthenticate.java:232)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:415)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:557)
at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:233)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:29)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:556)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
...
 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms