[再开一帖,分不够可以再加]在glassfish v3中建了一个JDBC连接“jdbc/test”,对应一个数据库连接池“test_pool”,test_pool的数据源类名称为“oracle.jdbc.pool.OracleDataSource”,资源类型为“javax.sql.DataSource”。通过以下方式,可以正常读取数据库中的数据:
Context ctx = new InitialContext();
DataSource ds=(DataSource)ctx.lookup("java:comp/env/jdbc/test");
Connection conn = ds.getConnection();
ResultSet rs=executeQuery("select * from tb_test");
//数据可以正常得到
...
但是当我调用存储过程的时候,就会出现致命错误:
Context ctx = new InitialContext();
DataSource ds=(DataSource)ctx.lookup("java:comp/env/jdbc/test");
Connection conn = ds.getConnection();
PreparedStatement proc=conn.prepareStatement("{ call PROC_TEST(?) }");
proc.setString(1,"abc");
//单步跟踪到这里是正常的,下面一句出错:
int n=proc.execute();
...Glassfish报如下错误:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x85309776, pid=6986, tid=2249964400
#
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) Client VM (16.3-b01 mixed mode linux-x86 )
# Problematic frame:
# C [libclntsh.so.10.1+0x327776]
#
# An error report file with more information is saved as:
# /usr/local/glassfish-3.0.1/glassfish/domains/domain1/hs_err_pid6986.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
服务器环境:
Ubuntu 10.04 LTS Linux version 2.6.32-22-generic-pae (buildd@palmer)
jdk-6u20-linux-i586
Glassfish V3.0.1
安装ORACLE客户端:oracle-xe-client_10.2.0.1-1.0_i386请问各位是否遇到过类似的问题?该如何解决?
Context ctx = new InitialContext();
DataSource ds=(DataSource)ctx.lookup("java:comp/env/jdbc/test");
Connection conn = ds.getConnection();
ResultSet rs=executeQuery("select * from tb_test");
//数据可以正常得到
...
但是当我调用存储过程的时候,就会出现致命错误:
Context ctx = new InitialContext();
DataSource ds=(DataSource)ctx.lookup("java:comp/env/jdbc/test");
Connection conn = ds.getConnection();
PreparedStatement proc=conn.prepareStatement("{ call PROC_TEST(?) }");
proc.setString(1,"abc");
//单步跟踪到这里是正常的,下面一句出错:
int n=proc.execute();
...Glassfish报如下错误:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x85309776, pid=6986, tid=2249964400
#
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) Client VM (16.3-b01 mixed mode linux-x86 )
# Problematic frame:
# C [libclntsh.so.10.1+0x327776]
#
# An error report file with more information is saved as:
# /usr/local/glassfish-3.0.1/glassfish/domains/domain1/hs_err_pid6986.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
服务器环境:
Ubuntu 10.04 LTS Linux version 2.6.32-22-generic-pae (buildd@palmer)
jdk-6u20-linux-i586
Glassfish V3.0.1
安装ORACLE客户端:oracle-xe-client_10.2.0.1-1.0_i386请问各位是否遇到过类似的问题?该如何解决?
解决方案 »
- 求大神帮忙,关于文件上传问题
- 请高手解释一个问题
- 刚刚工作的新手,请教一个struts简单问题.
- 我的处女作,花了一个月写的基于ssh和mysql的图书馆图书管理系统,功能都已实现。不知道水平如何,特拿出来请大侠指正批评
- ECLIPSE3.2+MYECLIPSE5的问题!
- logic:iterate可以使用动态的bean名称吗?
- 报表只打印出一截内容的问题(ireport)
- 请问当前有什么流行的用于WEB 界面的 JSP 标签库,请推荐几个
- 如何在Struts单个页面中多个按钮实现多个功能
- 网站图片为什么老丢?着急!!!jsp+tomcat4
- struts2 ActionSupport 及 项目起名问题,高手请进!
- word,txt,xls,jpg java 代码装换为tif 文件
驱动包ojdbc6_g.jar,ojdbc6.jar都试了,还是连接不上 错误信息
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at db.test.main(test.java:39)
好像是jre版本问题???怎么解决