2

While getting JDBC connection I am getting above error. I tried with ojdbc14 and ojdbc6 jar but same error.

my java version is 1.6 and oracle 11.2 and glassfish3

Note: I have created one sample java program to connect to DB using same DB details.Its working fine but with appication its giving me this error.

below is the line of code giving error

con = DriverManager.getConnection(
        "jdbc:oracle:thin:@192.168.1.255:1521:orcl","system","rakesh");
2
  • 1
    Good work posting the password. Also, How can the given code throw that exception? Can you post the stacktrace and more code? Commented May 8, 2017 at 13:10
  • |java.lang.ArrayIndexOutOfBoundsException: 7 at oracle.security.o3logon.C0.r(C0) at oracle.security.o3logon.C0.l(C0) at oracle.security.o3logon.C1.c(C1) at oracle.security.o3logon.O3LoginClientHelper.getEPasswd(O3LoginClientHelper) at oracle.jdbc.ttc7.O3log.<init>(O3log.java:289) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:251) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:246) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260) Commented May 9, 2017 at 10:59

1 Answer 1

3

The fact that you see this "oracle.jdbc.ttc7.TTC7Protocol" indicates that a very old driver is being used. You must have a classes12.zip hanging around in your app and added to your classpath. If you remove it and replace it with the 11.2.0.3 or 11.2.0.4 ojdbc6.jar then this error should go away.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank You So much jean !!..Its work for me when I deleted classes jar file.
I did accept you valuable answer but I have less then 15 reputation in StackOverFlow. So when I accept any answer It will recorded but will not show publically.thank you once again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.