K Vidhyakar
,
Ranch Hand
Nov 20, 2006 23:45:00
im getting the java.lang.ArrayIndexOutOfBoundsException: 7 while running the command. the output is hi Exception occured ! java.lang.ArrayIndexOutOfBoundsException: 7 and the code is.. the second Hi in the code is not pronted . so i concluded that the exception is from getConnection(). can you suggest me, what may be the mistake?
Ankit Doshi
,
Ranch Hand
Nov 21, 2006 00:44:00
Hi Vidhyakar, I tried with exact same code and I didn't get any ArrayIndexOutOfBoundsException. Also, try defining your URL this way and see what happens. String conStr="jdbc:oracle:thin:@172.21.202.41:1521:epsnsdev";
K Vidhyakar
,
Ranch Hand
Nov 26, 2006 22:52:00
Hi Ankit, Thankyou for your reply. I am getting the same exception after trying with String connStr="jdbc:oracle:thin:@172.21.202.41:1521:epsnsdev"; but when i try using ojdbc14.zip driver , its working perfectly.. but this happens while using classes12.zip can you identify the problem? waiting fo your reply.
Ankit Doshi
,
Ranch Hand
Nov 27, 2006 00:21:00
Hi, There doesn't seem to be any apparent reason why it should not work with classes12.jar. One of the things you could verify is that your classes12.jar is not corrupted. If you want to debug this further, copy and paste the entire exception stack trace. Also paste your code again with the line numbers, so that the lines in the exception stack trace can be related to code.
Carol Enderlin
,
drifter
Nov 27, 2006 12:35:00
What jdk version are you using? classes12.zip or classes12.jar -- classes for use with jdk 1.2 and 1.3 ojdbc14.jar -- classes for use with JDK 1.4 and 1.5
K Vidhyakar
,
Ranch Hand
Nov 28, 2006 02:07:00
Thank you Ankit and Carol, i was using classes12.zip for oracle 8i. but the oracle im using is 9i. after replacing with 9i version of classes12 , its working properly. Once again, i would like to thank you for your replies.
We don't have time for this. We've gotta save the moon! Or check this out:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com