java.lang.ArrayIndexOutOfBoundsException: for jdbc connection

懵懂的女人 提交于 2019-12-11 08:47:44

问题


I have no idea why I am getting this error, In the program i am not accessing any array. But its still giving this error.

java.lang.ArrayIndexOutOfBoundsException: 0 at oracle.jdbc.driver.OracleSql.main(OracleSql.java:1666)

I have posted the code below.

public class ItT4 {
public static void main(String[] args) {
    try {
        // loading the class
        Class.forName("oracle.jdbc.driver.OracleDriver");

    } catch (Exception e) {

        e.printStackTrace();
    }
}//closing main
}//closing class 

I have set the class path required for drivers. and even gone through few links in stackoverflow.

Modified

I removed everything and tried printing out the s simple statement. Still i am getting the same error. The code is given below.

public class ItT4 {
public static void main(String[] args) {

    System.out.println("hello boss");
}

}


回答1:


you can follow the following process

  1. click project
  2. click on clean
  3. select your project


来源:https://stackoverflow.com/questions/22761210/java-lang-arrayindexoutofboundsexception-for-jdbc-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!