Reputation: 1447
I am configuring my connection pool as follows:
dataSource = new BasicDataSource();
dataSource.setUrl("jdbc:sap://********:30015");
dataSource.setDriverClassName("com.sap.db.jdbc.Driver");
dataSource.setMaxActive(20);
dataSource.setMaxIdle(0);
dataSource.setMaxIdle(0);
dataSource.setUsername("*******");
dataSource.setPassword("*******");
However, when the connection gets initialized, I get this exception:
java.lang.ArrayIndexOutOfBoundsException: 10
at com.sap.db.util.StructuredBytes.putBigUnicode(StructuredBytes.java:568)
at com.sap.db.util.MemIndirection.putBigUnicode(MemIndirection.java:186)
at com.sap.db.jdbc.packet.DataPartAuthentication.putBigUnicode(DataPartAuthentication.java:192)
at com.sap.db.util.security.AuthenticationManager.addClientProofPart(AuthenticationManager.java:139)
at com.sap.db.util.security.AbstractAuthenticationManager.connect(AbstractAuthenticationManager.java:39)
at com.sap.db.jdbc.ConnectionSapDB.openSession(ConnectionSapDB.java:586)
at com.sap.db.jdbc.ConnectionSapDB.doConnect(ConnectionSapDB.java:436)
at com.sap.db.jdbc.ConnectionSapDB.<init>(ConnectionSapDB.java:195)
at com.sap.db.jdbc.ConnectionSapDBFinalize.<init>(ConnectionSapDBFinalize.java:13)
at com.sap.db.jdbc.Driver.connect(Driver.java:255)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
As you can see the exception is deep in SAP HANA JDBC Driver code, not my code. But I also don't understand what I could possibly be doing wrong in this situation ?
Any help and suggestions on how to debug this are greatly appreciated.
Upvotes: 1
Views: 666
Reputation: 126
Judging by the stack trace references to the AuthenticationManager, are you positive your user name and password are correct? Also the method name putBigUnicode on the stacktrace makes me think there might be some invalid character like a “ in there
Upvotes: 1