DB
升级到11g
,application server
是10133
,必须升级OJDBC driver
版本
- 备份$OC4J_HOME/j2ee/home/config下的system-application.xml和server.xml
- 在$OC4J_HOME/j2ee/home/shared-lib下新建目录oracle.jdbc/11.1.0.7.0,如果是application server版本还可以在instance的根目录创建shared-lib目录,这个shared-lib就只会对该Instance起作用。
- 接着将ojdbc5.jar, ojdbc5dms.jar 和 orai18n.jar复制到2中创建的目录下
- 修改server.xml,添加:
<shared-library name="oracle.jdbc" version="11.1.0.7.0">
<code-source path="ojdbc5.jar"/>
<code-source path="ojdbc5dms.jar"/>
<code-source path="orai18n.jar"/>
</shared-library>
|
5修改system-application.xml将
<import-shared-library name="oracle.jdbc" />
|
改成
<import-shared-library name="oracle.jdbc" min-version="11.1.0.7.0"/>
|
6确认修改
· 通过EM登录上去,打开administration页面,进入shared-lib项,发现oracle.jdbc11.1.0.7.0成功加入,而且该OC4J下的application也都使用了该shared-lib
· 通过drvtest程序检测ojdbc的版本,部署drvtest.ear到server上。打开
http://host:port/drvtest/dbdetails.jsp,输入jdbc diriver url,用户名,密码,提交后输出:
10.1.3 jdbc check jsp
JDBC Driver details
=============
JDBC Driver Name is ........ Oracle JDBC driver
JDBC Driver Version is ..... 11.1.0.7.0-Production
JDBC Driver Major Version is 11
JDBC Driver Minor Version is 1
=============
Database Details
=============
Database Product Name is ... Oracle
Database Product Version is Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
|
一切都很顺利。Goodbye.
7.原理:请参见OC4J developer guide。说到底就是修改了classpath。
8 drvtest下载:下载后请将后缀改为ear.
drvtest.ear