orcle exception:java.sql.SQLException: Io exception: Socket closed
expriencing problem:
java从DB拿数据,大概6000+行,使用简单的PreparedStatement execute 得到
ResultSet,本机报了Socket closed exception。
export jar 到server上跑,正常,因此估计是jre版本或者jdbc驱动问题。
server runtime:
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
Oracle Version:
check the Oracle version from the command prompt.
select * from v$version where banner like 'Oracle%';
result: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
export local machine,正常:
Local env:
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
RAD env:
java version "1.6.0" ----can not find out the sub version
Java(TM) SE Runtime Environment (build pwi3260sr2-20080818_01(SR2))
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows Vista x86-32 jvmwi3260-20080816_22093 (JIT enabled, AOT enabled)
J9VM - 20080816_022093_lHdSMr
JIT - r9_20080721_1330ifx2
GC - 20080724_AA)
JCL - 20080808_02
换了RAD的jre,成功执行。
下面java直接拿到system env method:
getProperties
public static Properties getProperties()
- Determines the current system properties.
First, if there is a security manager, its
checkPropertiesAccessmethod is called with no arguments. This may result in a security exception.The current set of system properties for use by the
getProperty(String)method is returned as aPropertiesobject. If there is no current set of system properties, a set of system properties is first created and initialized. This set of system properties always includes values for the following keys:Key Description of Associated Value java.versionJava Runtime Environment version java.vendorJava Runtime Environment vendor java.vendor.urlJava vendor URL java.homeJava installation directory java.vm.specification.versionJava Virtual Machine specification version java.vm.specification.vendorJava Virtual Machine specification vendor java.vm.specification.nameJava Virtual Machine specification name java.vm.versionJava Virtual Machine implementation version java.vm.vendorJava Virtual Machine implementation vendor java.vm.nameJava Virtual Machine implementation name java.specification.versionJava Runtime Environment specification version java.specification.vendorJava Runtime Environment specification vendor java.specification.nameJava Runtime Environment specification name java.class.versionJava class format version number java.class.pathJava class path java.library.pathList of paths to search when loading libraries java.io.tmpdirDefault temp file path java.compilerName of JIT compiler to use java.ext.dirsPath of extension directory or directories os.nameOperating system name os.archOperating system architecture os.versionOperating system version file.separatorFile separator ("/" on UNIX) path.separatorPath separator (":" on UNIX) line.separatorLine separator ("\n" on UNIX) user.nameUser's account name user.homeUser's home directory user.dirUser's current working directory Multiple paths in a system property value are separated by the path separator character of the platform.
Note that even if the security manager does not permit the
getPropertiesoperation, it may choose to permit thegetProperty(String)operation.
浙公网安备 33010602011771号