需要哪些Oracle jdbc jar [英] Which Oracle jdbc jars are required

查看:110
本文介绍了需要哪些Oracle jdbc jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Oracle jdbc下载页面中看到许多jar文件解决方案

您只需要一个: ojdbc6.jar .

  • ojdbc * .jar -所有支持Thin和OCI驱动程序基本功能的类

  • ojdbc * _g.jar -与ojdbc * .jar相同,只是使用-g选项进行编译以包括调试信息并包括java.util.logging调用.

  • ojdbc * dms.jar -与ojdbc * .jar相同,除了包含支持Oracle动态监控服务(DMS)的代码.还包括一些JDBC日志记录支持.仅当dms.jar也位于类路径中时,才可以使用此文件. dms.jar文件未作为RDBMS产品的一部分提供.它仅作为Oracle Application Server产品的一部分提供.

  • ojdbc * dms_g.jar -与ojdbc * dms.jar相同,只是使用-g选项进行编译以包含调试信息并具有完整的JDBC日志支持.

  • orai18n.jar -包含支持高级数据类型(对象)中所有Oracle字符集的配置信息.如果数据库字符集是UCS2,ASCII,ISO_LATIN_1,UTF8和AL32UTF8以外的字符集,并且应用程序使用ADT,则必须在类路径中包含此文件.

来自此处: Oracle JDBC FAQ

I am seeing many jars files in Oracle jdbc download page http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html

I have downloaded the following drivers:

  1. ojdbc6.jar
  2. ojdbc6_g.jar
  3. ojdbc6dms.jar
  4. ojdbc6dms_g.jar
  5. orai18n.jar

I am trying to use it in my Tomcat 7 version. I added all these jar files to $CATALINA_HOME/lib folder but after couple of days my Tomcat throws this error:

    HTTP Status 500 - Servlet execution threw an exception

type Exception report

message Servlet execution threw an exception

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
root cause

java.lang.NoSuchMethodError: oracle.i18n.text.converter.CharacterConverterOGS.getInstance(I)Loracle/i18n/text/converter/CharacterConverter;
    oracle.sql.converter.CharacterConverterFactoryOGS.make(CharacterConverterFactoryOGS.java:40)
    oracle.sql.CharacterSetWithConverter.getInstance(CharacterSetWithConverter.java:135)
    oracle.sql.CharacterSetFactoryThin.make(CharacterSetFactoryThin.java:195)
    oracle.sql.CharacterSet.make(CharacterSet.java:555)
    oracle.jdbc.driver.DBConversion.init(DBConversion.java:236)
    oracle.jdbc.driver.DBConversion.<init>(DBConversion.java:133)
    oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1704)
    oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:385)
    oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:564)
    oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:251)
    oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:29)
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:563)
    java.sql.DriverManager.getConnection(DriverManager.java:571)
    java.sql.DriverManager.getConnection(DriverManager.java:215)
    DB.getOracleConnection(DB.java:13)
    IndexDAO.displayNewsTicker(IndexDAO.java:54)
    SiteTemplate.newsTicker(SiteTemplate.java:256)
    SiteTemplate.headerButtons(SiteTemplate.java:226)
    Index.doGet(Index.java:55)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.47 logs.

Apache Tomcat/7.0.47

my oracle version is SQL*Plus: Release 11.2.0.2.0 Production I searched a lot but mostly experts are talking about duplicate or wrong version of jdbc drivers. I doubled check both suggestion but same problem.

Now question came in my mind that I may adding in my tomcat lib folder wrong jars. I mean may be I need 1-2 jar files but adding 5 aforementioned jdbc jars that may have duplicate classes.

Please advise

解决方案

You just need this one: ojdbc6.jar.

  • ojdbc*.jar - all the classes to support basic functionality for the Thin and OCI drivers

  • ojdbc*_g.jar - same as ojdbc*.jar except compiled with the -g option to include debugging information and with java.util.logging calls included.

  • ojdbc*dms.jar - same as ojdbc*.jar except includes code to support Oracle Dynamic Monitoring Service (DMS). Also includes some JDBC logging support. This file can only be used when dms.jar is also in the classpath. The dms.jar file is not shipped as part of the RDBMS product. It is only available as part of the Oracle Application Server product.

  • ojdbc*dms_g.jar - same as ojdbc*dms.jar except compiled with the -g option to include debugging information and with full JDBC logging support.

  • orai18n.jar - contains the configuration information to support all Oracle character sets in Advanced Data Types (objects). If the database character set is one other than UCS2,ASCII, ISO_LATIN_1, UTF8 and AL32UTF8 and the application uses ADTs, then you must include this file in your classpath.

Taken from here: Oracle JDBC FAQ

这篇关于需要哪些Oracle jdbc jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆