在JSP中能用ORACLE的OCI8驱动吗?

cg4112 2001-06-04 07:00:00
请给个例子,如果不能运行是不是和WEB SERVER服务器配置有关?我的服务器是iplanet web server4.1
...全文
95 点赞 收藏 6
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
hawaii 2001-06-05
1、在Net assistant中配置服务xxxx,指定ip, port, sid。
2、url = "jdbc:oracle:oci8:@xxxx"即可。
回复
backlove 2001-06-05
设的口令和用户名是空
你的oracle服务器没设口令和用户名?不可能吧
回复
hem 2001-06-05
import java.net.*;
import java.io.*;
import java.sql.*;

public class oci{
public static void main(String argv[]){
try{
String driv="oracle.jdbc.driver.OracleDriver";
Class.forName(driv);
String Url_="jdbc:oracle:oci8:@gwdb01";
Connection con = DriverManager.getConnection(Url_);
}catch(Exception ex){
System.out.println(ex.toString());
}
}
}



[root@denet7 csdn]# javac oci.java
[root@denet7 csdn]# java oci
method unknown (eip = 4453ce6a)
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Success
si_code [0]: SI_USER [pid: 0, uid: 0]
stackpointer=0xbfffd334

Full thread dump Classic VM (1.2.2-I, green threads):
"Finalizer" (TID:0x40ea2320, sys_thread_t:0x8108b50, state:CW) prio=8
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:112)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:174)
"Reference Handler" (TID:0x40ea23b0, sys_thread_t:0x8103e00, state:CW) prio=
10
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:424)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:114)
"Signal dispatcher" (TID:0x40ea23e0, sys_thread_t:0x8101f48, state:CW) prio=
5
"main" (TID:0x40ea21e0, sys_thread_t:0x804cea8, state:R) prio=5
ode)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at java.sql.DriverManager.getConnection(DriverManager.java:457)
at java.sql.DriverManager.getConnection(DriverManager.java:159)
at oci.main(oci.java:11)
Monitor Cache Dump:
java.lang.Class@40E142A8/41257278: owner "main" (0x804cea8) 2 entries
java.lang.ref.Reference$Lock@40EA23C0/40ED78A8: <unowned>
Waiting to be notified:
"Reference Handler" (0x8103e00)
java.lang.ref.ReferenceQueue$Lock@40EA2338/40ED7D78: <unowned>
Waiting to be notified:
"Finalizer" (0x8108b50)
oracle.jdbc.oci8.OCIDBAccess@40E15590/4126A920: owner "main" (0x804cea8) 1 entry
Registered Monitor Dump:
Invoker change lock: <unowned>
utf8 hash table: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class linking lock: <unowned>
System class loader lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Monitor cache lock: owner "main" (0x804cea8) 1 entry
Dynamic loading lock: <unowned>
Monitor IO lock: <unowned>
User signal monitor: <unowned>
Waiting to be notified:
"Signal dispatcher" (0x8101f48)
Child death monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
<unknown thread> (0x8058310)
Thread queue lock: owner "main" (0x804cea8) 1 entry
Monitor registry: owner "main" (0x804cea8) 1 entry

[root@denet7 csdn]#


请指教。
回复
chenxk 2001-06-04
同意gdsean(摇滚java)的意见,JSP所在机器上装了Oracle客户,就可以用OCI8了,因为JSP是服务器端脚本,所以与Applet不同,Applet必须使用thin。
回复
cg4112 2001-06-04
装了,而且就在本地运行。
回复
gdsean 2001-06-04
你安装oracle的客户端了没有??
没有的话你是不能使用OCI8的
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2001-06-04 07:00
社区公告
暂无公告