Forums Register Login

Exception in getConnection()

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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";
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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


reply
reply
This thread has been viewed 2417 times.
Similar Threads
JdbcOdbc bridge direct access method
java database connectivity...
problem in connecting struts to ejb
ResultSet object returning null
Importing java files in another java program
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 04:13:35.