oracle连接数据库时显示Io 异常: The Network 80C

oracle连接数据库时显示Io 异常: The Network Adapter could not establish the connection
在网上搜索了下解决方案,在CMD中输入
C:\Users\myyit>lsnrctl
LSNRCTL for 64-bit Windows: Version 12.1.0.2.0 - Production on 12-6月 -2018 23:34:06
Copyright (c) 1991, 2014, Oracle. All rights reserved.
欢迎来到LSNRCTL, 请键入"help"以获得信息。
LSNRCTL> status
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
TNS-12541: TNS: 无监听程序
TNS-12560: TNS: 协议适配器错误
TNS-00511: 无监听程序
64-bit Windows Error: 61: Unknown error
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS: 无监听程序
TNS-12560: TNS: 协议适配器错误
TNS-00511: 无监听程序
64-bit Windows Error: 2: No such file or directory
LSNRCTL> start
启动tnslsnr: 请稍候...

Unable to OpenSCManager: err=5
TNS-12560: TNS: 协议适配器错误
TNS-00530: 协议适配器错误

以上错误代表我没有监听程序,但是我通过HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OracleOraDB12Home1TNSListener表里是有ImagePath关键值的,并且关键值的安装目录也确实是C:\Oracle-myz\ZCX\product\12.1.0\dbhome_1\BIN\TNSLSNR。但是我显示的还是错误,还是没有监听值。
请问我这个问题该如何解决才能连接到数据库

0

11个回答

0

tns 配置有误吧

0

启动监听程序的服务没有?

0

试着使用admin去运行cmd试一下,然后你是什么系统?oracle是什么版本的?win8是不支持12c,装11g

0

使用的是plsql吗?

0

你们公司的数据量库没有配置监听,你就算配置了tns 也连不上,你得问问运维,或者看看DBA,谁配置监听,你个人没权限配置的,只能配置TNS

0

把数据库比作一个小区,监听就相当于保安,TNS就相当于地址,用户名密码就相当于门禁卡,只不过这个不同的是,要想进一个小区,必须有保安

0

安装数据库的时候是否连接网络?如果安装时没有连接网络,使用第三方连接工具的时候也不要连接网络。不知是否有用。

0

一看是数据库的监听器没启动开,监听器配置文件目录,比如:D:\app\user\product\12.1.0\dbhome_1\NETWORK\ADMIN\listener.ora,打开listener.ora文件,将LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.29.119.1)(PORT = 1521))
)
)

ADR_BASE_LISTENER = D:\app\user\product\12.1.0\dbhome_1\log
中iP:172.29.119.1替换为本机ip,然后在我的电脑--管理--服务中找到OracleOraDB12Home1TNSListener这一项,右键手动启开,然后等一两分钟,数据库就通了。技巧,如果ip经常变动,后续要经常修改listenen配置文件,不如将这个文件快捷方式发到桌面,要改了,双击就行

0

先把防火墙给关闭掉。sqlplus 重启监听服务

0
共11条数据 1 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
oracle远程连接数据库时显示Io 异常
oracle连接数据库时显示Io 异常 1。IP错误。 在设置URL时错误,例如:jdbc:oracle:thin:@192.168.0.36:1521:sharp 数据库服务器不正确:ping 服务器IP是否正确。不正确,将URL更改为正确 端口号错误:一般不会错误。 进行一下操作:在DOS上键入sqlplus,检查oracle是否开启。 2。防火墙 如果机器上安装有放火墙,可能是服务器端口号屏...
JAVA在连接数据库时出错:Io异常
出错信息如下:rn--------rnIo 异常: The Network Adapter could not establish the connectionrnjava.lang.NullPointerExceptionrn at StiodtlAdd.addStiodtl(StiodtlAdd.java:77)rn------------rn第77行是:Statement stmtOracle = connOracle.createStatement(),但同个文件在另外一台电脑上却是可以正常运行的,出问题的电脑有两块网卡,不知道和这有没有关系?
连接数据库报错Io 异常: The Network Adapter could not establish the
一个纠结好久的问题,小女对JAVA实在是门外汉,只能求教诸位高人了。。。rnrn起因是负责运营的系统平时连接都很正常,但是到业务高峰期服务器经常发生瞬堵,检查后台日志,报错信息如下:rnrnrn###<2011-4-2 下午05时30分29秒 CST> <> (PhysicalConnection.java:414)rn at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165)rn at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)rn at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)rn at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:205)rn at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:138)rn at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1181)rn at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1111)rn at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:368)rn at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:294)rn at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:468)rn at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:387)rn at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:81)rn at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:88)rn at weblogic.jdbc.pool.Driver.connect(Driver.java:148)rn at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:540)rn at weblogic.jdbc.jts.Driver.connect(Driver.java:139)rn at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:329)rn at com.paic.pafa.app.lwc.service.persistence.dao.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:131)rn at com.paic.pafa.app.lwc.service.persistence.dao.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:120)rn at com.paic.pafa.app.lwc.service.persistence.dao.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:177)rn at com.paic.pafa.app.lwc.service.persistence.dao.ibatis.SqlMapClientTemplate.queryForObject(SqlMapClientTemplate.java:227)rn at com.paic.icss.gcc.outbound.dataextractbyesb.integration.dao.impl.EsalePolicyMaintenanceIbatisDAO.getSeqNoFromGCC(EsalePolicyMaintenanceIbatisDAO.java:108)rn at com.paic.icss.gcc.outbound.dataextractbyesb.biz.service.EsalePolicyMaintenanceService.execute(EsalePolicyMaintenanceService.java:84)rn at com.paic.amesb.delegate.imp.ejb.BusinessDelegateBean.runServiceNotSupported(BusinessDelegateBean.java:202)rnrnrn
Oracle IO 异常
求高手解答!rn异常如下:rnrnIo 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=185599488)(ERR=12519)(ERROR_STACK=(ERROR=(CODE=12519)(EMFI=4))))rnrnrn[oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134), oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179), oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334), oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3668), oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:353), oracle.jdbc.driver.OracleConnection.(OracleConnection.java:371), oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:551), oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:351), java.sql.DriverManager.getConnection(DriverManager.java:525), java.sql.DriverManager.getConnection(DriverManager.java:171), com.huawei.nvs.util.db.DBConnectionPool.createNewConnection(DBConnectionPool.java:207), com.huawei.nvs.util.db.DBConnectionPoolNonReuse.getConnection(DBConnectionPoolNonReuse.java:101), com.huawei.nvs.sys.conn.NVSConnFactory.getSmsDbConnection(NVSConnFactory.java:669), com.huawei.nvs.service.common.codebuilder.SmcCodeBuilder.getSmcDBConnection(SmcCodeBuilder.java:605), com.huawei.nvs.service.common.codebuilder.SmcCodeBuilder.getPartValue(SmcCodeBuilder.java:491), com.huawei.nvs.service.common.codebuilder.SmcCodeBuilder.buildCode(SmcCodeBuilder.java:312), com.huawei.nvs.service.common.codebuilder.SmcCodeBuilder.codeBuilder(SmcCodeBuilder.java:207), com.huawei.nvs.service.manager.lensdevice.AddLensService.decompose(AddLensService.java:1181), com.huawei.nvs.service.manager.lensdevice.AddLensService.smsDBOper(AddLensService.java:235), com.huawei.nvs.sys.serv.AbstractService.exec(AbstractService.java:80), com.huawei.nvs.sys.serv.AbstractService.internalProc(AbstractService.java:302), com.huawei.nvs.sys.serv.AbstractService.proc(AbstractService.java:219), com.huawei.nvs.ps.manager.action.lensdevice.AddLensAction.exec(AddLensAction.java:111), com.huawei.nvs.ps.common.SMCAction.execute(SMCAction.java:102), sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source), sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25), java.lang.reflect.Method.invoke(Method.java:585), com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404), com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229), com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221), com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150), org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48), com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167), com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224), com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223), com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455), com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221), com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121), com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept
连接数据库时产生异常
我在向数据库中增加数据时,产生异常:rnrnProject Hocm_sys.exe raised exception class EAccessViolation with rnmessage 'Access violation at address 004B40B8 in modulern'Hocm_sys.exe'. Read of address 00000060'. Process stopped. UsernStep or Run to continue.rnrn然后光标就停在: "with DataM.Loginadoq do" 这一行.rnrn请各位大虾帮忙解决下,小弟在此谢过了!
老难题:连接oracle 时出现的异常java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connectionrn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)rn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)rn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:273)rn at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:318)rn at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:343)rn at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:147)rn at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:31)rn at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:545)rn at java.sql.DriverManager.getConnection(DriverManager.java:582)rn at java.sql.DriverManager.getConnection(DriverManager.java:185)rn at DBC.(DBC.java:25)rn at DBC.main(DBC.java:15)rnrn这个问题很难解决呀,网上搜了一天也没解决掉,故来此地求助。rnrnconn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1512:orcl", "scott", "tiger");rnrn原因:突然连oracle 时,就出现这个异常了,以前也正常,rnrn并且现在 可以用 ODBC 桥接的方式连接成功。就是上面的方式连接有异常。rnrn最后我把Oracle 重装了一次,就可以连接了,但我把项目换到另一台机子连接时,又出现了此异常,真是很郁闷呀!rnrn希望高手帮帮忙呀!
oracle 9i出现java.sql.SQLException: Io 异常: The Network Adapter could not ...
JDBC连接ORACLE 9i本机上的数据库[color=#FF0000],传3000个数据进去,每次有1,2个会出现[/color]java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection这种异常 rnrn url="jdbc:oracle:thin:@localhost:1521:sjj";SJJ 是SID 能进行交互配置都没问题 网上说的大部分都是URL得问题,我试了基本没用,,rnrn 有过类似的朋友麻烦解决下 谢谢
连接Oracle Io 异常: The Network Adapter could not establish the connection
数据库 oracle 10grn驱动 class12.jarrn能进sqlplus 用户名 密码 url都对,就是跑这个异常 帮忙看下
Oracle 连接报错io异常 the network adapter could not establish
现在部署了一个项目在服务器上,每隔一段时间(不到一天)就会报错:io异常 the network adapter could not establish,重启服务就好了。rn网上说的三种可能原因我都试过了,url没问题;防火墙是关闭的;监听也是开启的。高手们给点提示。。。是在查不出来什么原因了。谢谢![img=https://img-bbs.csdn.net/upload/201502/11/1423643016_58055.png][/img]
oracle的java.sql.SQLException: Io 异常 The Network Adapter could not establish the connection
不知道怎么用java获得oracle的java.sql.SQLException: Io 异常 The Network Adapter could not establish the connectionrn我就是要catch这个异常,知道当前数据库的状态rn
Io 异常: The Network Adapter could not establish the connection
我循环往oracle数据库中插入数据,当插于一定量条数时(大概5多条记录)就报"Io 异常: The Network Adapter could not establish the connection",请问个是怎么回事?怎样解决啊?
用jdbc连接Oracle时,出现 Io 异常: The Network Adapter could not establish the connection;
在使用jdbc连接oracle 8.1.7的时候会出现: Io 异常: The Network Adapter could not establish the connection;的错误信息。rn有的机器访问就正常,有的机器访问就不正常。rnrn有谁知道啊?rn如果说是什么jdbc驱动安装不正确的就不用说了。rn我找了一些英文的资料,也没有解决方法,有个文章是说名字解析的问题,增加一个hosts,但是我在连接里是直接使用ip的,不存在ip解析的问题。rnrn请教了!
Oracle SQLDeveloper连接数据库时出现IO错误:UndefinedError的解决办法
SQLDeveloper连接失败截图安装环境版本:1、安装Oracle11g2、SQLDeveloper的版本下载显示是17.4.0,查看属性显示是17.2.0网上看了一些解决方案,也有一些汇总的,都说看环境改配置,感觉都是好麻烦的样子,有人给出说降版本可以还给出了版本,但实际是OracleDriver的jar包跟新了解决方案:大家可以找低版本的ojdbc.jar替换,重启SQLDeveloper...
IO流--IO异常
io异常捕获
异常与IO
1.异常机制 2.IO机制 Java语言中,输入输出都被抽象为流,流被看做是一组有序的字节集合,分为字节流(8位,InputStream,OutputStream)和字符流(16位,reader,writer)。 NIO:非阻塞IO,阻塞会产生大量线程上下文切换,降低程序执行效率。NIO的实现主要是基于反应器模式。 小疑问: 什么是服务端接收客户端连接事件呢?什么又是客户端连接服务端事件呢...
IO异常
当我从Socket中读数据时,readUTF()不能读取数据,一直处于阻塞状态,用int i = dis.read(b);时,如果Socket中无数据时,会返回“java.lang.NullPointerException”,这该怎么解决啊,rnrn还有没有从Socket中读取数据时直接返回String的方法啊,rnrn谢谢大家了,O(∩_∩)O~
连接数据库异常
/**rn * 插入新的新闻rn * @param idrn * @returnrn */rnpublic boolean insert(News news) rn boolean flag = false;rn Connection conn = null;rn sqlStr = "insert into news (title,author,from,content,postDate) values ('";rn sqlStr += news.getNTitle() + "','";rn sqlStr += news.getNAuthor() + "','";rn sqlStr += news.getNFrom() + "','";rn sqlStr += news.getNContent() + "','";rn sqlStr += new java.sql.Date(new java.util.Date().getTime()) + "')";rn try rn conn = this.getConnection();rn pstmt = conn.prepareStatement(sqlStr);rn int i = pstmt.executeUpdate(); //<--这里rn if(0 != i) rn flag = true;rn conn.commit();rn rn catch (SQLException e) rn e.printStackTrace();rn try rn conn.rollback();rn catch (SQLException sqle) rn sqle.printStackTrace();rn rn catch (Exception e) rn e.printStackTrace();rn finally rn try rn pstmt.close();rn conn.close();rn catch(SQLException e) rn e.printStackTrace();rn rn rn return flag;rnrn程序运行指定位置代码时发生异常。通过Eclipse的dubug发现提交的查询语句中文部分都乱码了。rn重点是在这条代码之前的sqlStr都是正常的,没有出现乱码。rn我该怎么解决?
IO,异常
2017年9月24日 一、3个函数获取异常的信息 1、getMessage()函数:输出错误的性质 2、toString()函数:给出异常的类型和性质。 3、printStackTrece()函数:指出异常的类型、性质、栈层次及出现在程序中的位置。 二、finally 1、在finally语句块中发生了异常。 2、子昂前面的代码中使用了system.exit()退出程序。 3、程序
Oracle application express 连接数据库时
连接Oracle application Express管理服务程序localhost:8080/apex/时提示rnFirefox 无法建立到 localhost:8080 服务器的连接。rn 此站点暂时不可用或者太忙。请稍后重试。rn 如果您无法载入任何页面,请检查您计算机的网络连接。rn 如果您的计算机受到防火墙或代理服务器的保护,请确认 Firefox 被授权访问网页。rnoracle 版本11grnapex 4.2.1rn怎么回事,求各位大神指点
oracle连接数据库时出错提示
“/WebApplication5”应用程序中的服务器错误。rn--------------------------------------------------------------------------------rnrnSystem.Data.OracleClient requires Oracle client software version 8.1.7 or greater. rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Exception: System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.rnrn源错误: rnrnrn行 23: string connstring="Data Source=dbcenter;user=cognos;password=mmmmmm;";rn行 24: OracleConnection conn=new OracleConnection(connstring); rn行 25: conn.Open(); rn行 26: OracleCommand cmd=conn.CreateCommand();rn行 27: cmd.CommandText="select * from info_cdma where rownum < 100";rn rnrn源文件: c:\inetpub\wwwroot\webapplication5\webform1.aspx.cs 行: 25 rnrn堆栈跟踪: rnrnrn[Exception: System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.]rn System.Data.OracleClient.DBObjectPool.GetObject(Object owningObject, Boolean& isInTransaction)rn System.Data.OracleClient.OracleConnectionPoolManager.GetPooledConnection(String encryptedConnectionString, OracleConnectionString options, OracleConnection owningObject, Boolean& isInTransaction)rn System.Data.OracleClient.OracleConnection.OpenInternal(OracleConnectionString parsedConnectionString, Object transact)rn System.Data.OracleClient.OracleConnection.Open()rn WebApplication5.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\webapplication5\webform1.aspx.cs:25rn System.Web.UI.Control.OnLoad(EventArgs e)rn System.Web.UI.Control.LoadRecursive()rn System.Web.UI.Page.ProcessRequestMain()rnrn rnrnrn--------------------------------------------------------------------------------rn版本信息: Microsoft .NET Framework 版本:1.1.4322.2032; ASP.NET 版本:1.1.4322.2032 rnrnrnrnrn我在别的机器测试通过,我的机器始终不能访问oracel ,请各位大哥帮帮忙呀
myeclipse连oracle Io 异常: Connection refused
java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))) rnat oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) rnat oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) rnat oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333) rnat oracle.jdbc.driver.OracleConnection.(OracleConnection.java:404) rnat oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468) rnat oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314) rnat java.sql.DriverManager.getConnection(Unknown Source) rnat java.sql.DriverManager.getConnection(Unknown Source) rnat com.fume.util.DbCon.(DbCon.java:16) rnat com.fume.util.DbCon.main(DbCon.java:37) rnrn我在plsql里使用一切正常。rn谢谢那朋友位帮解决一下
applet 连接 oracle出错,抛出 Io 异常。。。。
我在连接数据库是用如下方法:rnrn DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());rn conn=DriverManager.getConnection ("jdbc:oracle:thin:scott/tiger@135.53.2.56:1521:safe");rnrnrn在使用使用时抛出异常:rnrnIo 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=134238208)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=1255)(EMFI=4))))rnrn请问错误到底怎么回事?rnrn连接拒绝?为什么?rnrn我用sqlplus可以连到服务器上。服务器的ORACLE_SID=safe 我也查过了rnrn××××××××××××××××××××××××××××××××××××rn需要说明的是:这个class是在客户端编译上传到服务器的。这个应该不影响吧?rn是不是必须把classes12.zip和我得类打包在一起?rnrn这个我没做,因为那样文件太大,况且我这边有这个文件,也在CLASSPATH中。rnrn到底是那一部分引起的错误?谢谢!
Kettle连接ORACLE失败,报错IO异常:
之前用kettle从测试环境抽数据,连接的是oracle数据库,没有任何问题。今天,经理让我从生产环境抽数,于是我把之前连接的主机名称改成生产环境的地址,换一下用户名密码,其它不变(如:数据库名称)。连接时报错如下图: 感到很纳闷,用户名和密码都是正确的,测试环境可以连,怎么换个IP就失败了。 通过检查,觉得应该是错在连接ORACLE的SID上。我觉得kettle连接ORALCE应该是
oracle数据库连接问题:Io 异常: Connection refused
报错信息如下:rnjava.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153rn092352)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)rn rnxml配置文件如下:rn rn rn rn rn rn192.192.192.182是局域网服务器IPrn用OEM能够登陆它,但到本地服务器就报错,请高手指教
Oracle 报错 Io 异常: Connection refused
java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=135294976)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))) rnrn------------------------------------------rn try rn Class.forName("oracle.jdbc.driver.OracleDriver"); rn con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.0.33:1521:oracle8",rn "magoa","magoa");rn System.out.println("Connection Success!");rn return "Connection Success!";rn rn catch(Exception e)rn System.out.println(e);rn return e.toString();rn rnrn在PL/SQL和Net Manager中却十分正常。
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connec
tomcat容器 struts2框架 MVC模式 jdbc DAO 实现数据持久 rn在jdbc程序中测试数据库连接相当正常 浏览器访问tomcat正常 ,rn但是在浏览器访问数据库时候抛出异常:java.sql.SQLException: rnIo 异常: The Network Adapter could not establish the connectionrnrn让我这个新手相当困惑!急求大哥哥大姐姐们帮助啊!
求救!!Io 异常: The Network Adapter could not establish the connection
服务器环境是linux+oracle10grn连接数据库的URL:rn jdbc:oracle:thin:@192.168.0.130:1521:orclrn stringrn rn在登陆客户端的时候提示去字段描述出错,系统的日志显示如下的错误。rnIo 异常: The Network Adapter could not establish the connectionrnjava.sql.SQLException: Io 异常: The Network Adapter could not establish the connectionrn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)rn at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:404)rn at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)rn at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)rn at java.sql.DriverManager.getConnection(DriverManager.java:512)rn at java.sql.DriverManager.getConnection(DriverManager.java:171)rn at com.bitmechanic.sql.ConnectionPool.createDriverConnection(ConnectionPool.java:468)rn at com.bitmechanic.sql.ConnectionPool.getConnection(ConnectionPool.java:407)rn at com.lingtu.DBBroker.DBBroker.getConnection(DBBroker.java:220)rn at com.lingtu.DBBroker.DBBroker.authOperator(DBBroker.java:487)rn at com.lingtu.DBBroker.DBBroker.getZones(DBBroker.java:2045)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:372)rn at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:292)rn at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:276)rn at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)rn at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)rn at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)rn at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437)rn at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)rn at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:701)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)rn at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:335)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)rn at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)rn at java.lang.Thread.run(Thread.java:534)rnrn后面还有很长,就不贴出来了。rn谁给看看这到底是怎么回事?rn
DbExec:Io 异常: The Network Adapter could not establish the connection
oracle9i数据库报这错,导致jsp页面读取很慢,但是又不是每个页面都慢。上网看了几个解决的办法,都没有作用。希望了解这个异常的大侠帮帮忙。rn我用的是jrun ,换到tomcat后也是这个现象。
Cannot create PoolableConnectionFactory (Io 异常: The Network Adapter could not e
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io 异常: The Network Adapter could not establish the connection)rn at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)rn at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)rn at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)rn at org.apache.commons.dbutils.QueryRunner.prepareConnection(QueryRunner.java:337)rn at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:652)rn at com.v512.chapter5.OracleUtile.update1(OracleUtile.java:39)rn at org.apache.jsp.addMessageHandler_jsp._jspService(addMessageHandler_jsp.java:149)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)
新手急求救:Io 异常: The Network Adapter could not establish the connection.
import java.sql.*;rnpublic class TestJDBC rn public static void main(String[] args) throws Exception rn Class.forName("oracle.jdbc.driver.OracleDriver");rn //new oracle.jdbc.driver.OracleDriver();rn Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@169.254.215.24:1521:orcl","scott","tiger"); rn rnrn*****************rn以上是我写的第一个J2EE的测试小程序,运行提示错误 Io 异常: The Network Adapter could not establish the connection.rn把防火墙和卡巴关了照样就犯,telnet一下1521,结果:Microsoft Telnet> o 1521rn正在连接到1521...不能打开到主机的连接, 在端口 23: 连接失败rn烦啊,第一个小程序就这么打击我,有懂的高手来救救我吧
java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
我连接同事的数据库,前几天一直正常我也没有改代码.所以我机子的配置应该是没有问题的,我用TOAD连接他的数据库也没有问题,可是运行程序登录不了,除了连接的是他的数据库以外,其他的应用程序都是本机的rn报java.sql.SQLException: Io 异常: The Network Adapter could not establish the connectionrn请问高手这是什么原因.
数据库连接报错:Io 异常: The Network Adapter could not establish the connection
执行sql语句,插入数据时,插入几条记录后,报错rnjava.sql.SQLException: Io 异常: The Network Adapter could not establish the connectionrnrn请教是哪里出了问题 ,该如何优化?
大家来帮帮我:Io 异常: The Network Adapter could not establish the connection
一直用的好好的,今天上去一看,就报错了,然后就连不上远程数据库了!rn错误:javax.servlet.ServletException: Io 异常: The Network Adapter could not establish the connectionrnrn不知道为什么,前天我本机也是好好的出现这样的错误,然后不得已用本地数据库(可以连本地不可以连远程)。今天服务器上也出现这样的错误....急啊rn