Oracle JDBC Driver Error on Eclipse

I am trying to execute a query using a stored procedure in Eclipse, but I keep getting this error and I am not sure what I am missing to be able to execute the query.

The query works in the actual server the code would be run on, but I am trying to mimic that environment in Eclipse (That being said I know the problem is not in the code, but I am clearly missing a dependency or something? I am not sure).

The error is:

Exception in thread "main" java.lang.UnsatisfiedLinkError:
oracle.jdbc.driver.T2CConnection.t2cSetSessionTimeZone(JLjava/lang/String;)

Here is what I have in my eclipse project:

Libraries:

  • Activation.jar
  • mail.jar
  • ojdbc5.jar
  • rt.jar
  • JRE System Library[J2SE-1.4]
  • Order and Export:

  • ojdbc5.jar
  • rt.jar
  • Activation.jar
  • mail.jar
  • src
  • JRE System Library[J2SE-1.4]
  • Also, Compiler info:

  • Java Compiler - J2SE-1.4
  • generated .class file compatibility - 1.2
  • Source compatibility - 1.3
  • Not sure what other information I should provide..

    Thanks!


    I remember getting the java.lang.UnsatisfiedLinkError when a dll that should have been on the system path is not present.

    In my case there was JAVA code which relied on some native C++ code residing in a dll. Whenever the dll was absent from the classpath the error would be observed.

    If this strikes a bell, try adding the required dll as this answer explains.

    Update

    Try this :

    Add C:appproduct11.2.0dbhome_2jdkbin to the PATH environment variable.

    Also, check this thread for further clues. The OP on this thread solved his problem by doing the above.

    Update 2

    It seems that a specific version of the driver jars maybe required. Do you have the Oracle Client installed ? Take a look at this (unfortunately, badly translated) thread. Scroll to the bottom to see how that OP fixed this same problem.


    Problem could also be bacuase of the 'thin' and 'oci' driver declaration. Change the driver name from 'oci' to 'thin' will fix the issue

    链接地址: http://www.djcxy.com/p/12822.html

    上一篇: 外部罐子需要手动添加

    下一篇: Eclipse上的Oracle JDBC驱动程序错误