jdbc事务中提交几千条update,未等commit即报Connection timed out,是否会造成锁表 [问题点数:100分,结帖人dinghun8leech]

Bbs1
本版专家分:5
结帖率 100%
Bbs7
本版专家分:24366
版主
Blank
金牌 2017年12月 总版技术专家分月排行榜第一
2017年11月 总版技术专家分月排行榜第一
2017年10月 总版技术专家分月排行榜第一
Blank
红花 2017年12月 Oracle大版内专家分月排行榜第一
2017年12月 其他开发语言大版内专家分月排行榜第一
2017年11月 Oracle大版内专家分月排行榜第一
2017年11月 其他开发语言大版内专家分月排行榜第一
2017年10月 Oracle大版内专家分月排行榜第一
Blank
黄花 2017年11月 扩充话题大版内专家分月排行榜第二
2017年10月 扩充话题大版内专家分月排行榜第二
2017年9月 Oracle大版内专家分月排行榜第二
Blank
蓝花 2018年1月 Oracle大版内专家分月排行榜第三
Bbs7
本版专家分:10245
Blank
红花 2019年7月 Oracle大版内专家分月排行榜第一
2019年6月 Oracle大版内专家分月排行榜第一
Blank
黄花 2019年5月 Oracle大版内专家分月排行榜第二
2018年1月 Oracle大版内专家分月排行榜第二
2017年10月 Oracle大版内专家分月排行榜第二
Blank
蓝花 2017年12月 Oracle大版内专家分月排行榜第三
2017年11月 Oracle大版内专家分月排行榜第三
2017年9月 Oracle大版内专家分月排行榜第三
Bbs1
本版专家分:5
Bbs7
本版专家分:10245
Blank
红花 2019年7月 Oracle大版内专家分月排行榜第一
2019年6月 Oracle大版内专家分月排行榜第一
Blank
黄花 2019年5月 Oracle大版内专家分月排行榜第二
2018年1月 Oracle大版内专家分月排行榜第二
2017年10月 Oracle大版内专家分月排行榜第二
Blank
蓝花 2017年12月 Oracle大版内专家分月排行榜第三
2017年11月 Oracle大版内专家分月排行榜第三
2017年9月 Oracle大版内专家分月排行榜第三
大量并发调用存储过程 同时执行update 会不会死锁
测试用的 表跟存储过程很简单 表 test num(int) CREATE PROCEDURE . AS begin DECLARE @NEXT_VALUE INT; begin tran updat
connection timed out: connection
请教一个问题:rn我做了个探测局域网用户的程序,对方能收到我的udp广播数据报,但用tcp连接总是会超时是什么原因呢·?rnrnclass detector extends Thread //主动探测主机信息发送端rn rn String userIp;rn public detector(String userIp)rn rn this.userIp=userIp;rn rn public void run()rn rn tryrn rn System.<em>out</em>.println("start to connect "+userIp+" ......"); //可以运行到这里rn Socket s = new Socket(InetAddress.getByName(userIp),5001);rn InputStream is = s.getInputStream();rn OutputStream os = s.getOutputStream();rn os.write(InetAddress.getLocalHost().getHostName().getBytes());//写入用户名rn os.write(System.getProperty("user.name").getBytes()); //写入登录名rn os.write(InetAddress.getLocalHost().toString().getBytes()); //写入ip地址rnrn String userName,loginName,userIp;rn byte[] buf=new byte[100];rn int len=is.read(buf);rn if(len!=-1)rn rn userName=new String(buf,0,len);rn len=is.read(buf);rn if(len!=-1)rn rn loginName=new String(buf,0,len);rn len=is.read(buf);rn if(len!=-1)rn rn userIp=new String(buf,0,len);rn al.add(new user(userName,loginName,userIp));rn tableInit();rn rn rn rn is.close();rn os.close();rn s.close();rn rn catch (Exception ex)rn rn ex.printStackTrace();rn rn rn
抓取网站数据 报Connection timed out
做了一个抓取网站的功能,用的是httpclient。rn在自己的电脑上运行,可以抓取到。rn但是把工程发布到服务器上,就会报rnI/O exception (java.net.ConnectException) caught when processing request: Connection <em>timed</em> <em>out</em>rnrn请问,是什么原因啊?
求助!AXIS2报Connection timed out: connect
在浏览器直接访问没有报错rnhttp://192.168.1.100/axis2/services/callback/putPaynoteInfo?unit=1234&paynote=1234&serial=1234rn[code=html]rnrn-保存成功[/code]rnrn但是java代码里就报错了rn[code=java]import com.unitws.*;rnpublic class Test rn public static void main(String[] args)rn Callback service = null;rn CallbackPortType client = null;rn try rn service = new CallbackLocator();rn client = service.getcallbackHttpSoap12Endpoint();rn System.<em>out</em>.println(service.getcallbackHttpSoap11EndpointAddress());rn System.<em>out</em>.println(client.putPaynoteInfo("123", "123", "123", "1000"));rn catch (Exception e) rn e.printStackTrace();rn rn rn[/code]rnrn控制台:rnhttp://192.168.1.100:80/axis2/services/callback.callbackHttpSoap11Endpoint/rnAxisFaultrn faultCode: http://www.w3.org/2003/05/soap-envelopeServer.userExceptionrn faultSubcode: rn faultString: java.net.ConnectException: Connection <em>timed</em> <em>out</em>: connectrn faultActor: rn faultNode: rn faultDetail: rn http://xml.apache.org/axis/stackTrace:java.net.ConnectException: Connection <em>timed</em> <em>out</em>: connectrn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)rn at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)rn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)rn at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)rn at java.net.Socket.connect(Socket.java:519)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:597)rn at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)rn at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)rn at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)rn at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)rn at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)rn at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)rn at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)rn at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)rn at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)rn at org.apache.axis.client.Call.invokeEngine(Call.java:2784)rn at org.apache.axis.client.Call.invoke(Call.java:2767)rn at org.apache.axis.client.Call.invoke(Call.java:2443)rn at org.apache.axis.client.Call.invoke(Call.java:2366)rn at org.apache.axis.client.Call.invoke(Call.java:1812)rn at com.unitws.CallbackSoap12BindingStub.putPaynoteInfo(CallbackSoap12BindingStub.java:120)rn at com.unitws.Test.main(Test.java:12)rnrn http://xml.apache.org/axis/hostname:KingKongrnrnjava.net.ConnectException: Connection <em>timed</em> <em>out</em>: connectrn at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)rn at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)rn at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)rn at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)rn at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)rn at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)rn at org.apache.axis.client.Call.invokeEngine(Call.java:2784)rn at org.apache.axis.client.Call.invoke(Call.java:2767)rn at org.apache.axis.client.Call.invoke(Call.java:2443)rn at org.apache.axis.client.Call.invoke(Call.java:2366)rn at org.apache.axis.client.Call.invoke(Call.java:1812)rn at com.unitws.CallbackSoap12BindingStub.putPaynoteInfo(CallbackSoap12BindingStub.java:120)rn at com.unitws.Test.main(Test.java:12)rnCaused by: java.net.ConnectException: Connection <em>timed</em> <em>out</em>: connectrn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)rn at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)rn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)rn at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)rn at java.net.Socket.connect(Socket.java:519)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:597)rn at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)rn at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)rn at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)rn at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)rn at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)rn ... 11 morernrn服务器tomcat也没输出什么
mount.nfs: Connection timed out
mount.nfs: Connection <em>timed</em> <em>out</em>
commons-email-1.0 -> Connection timed out
用commons-email-1.0开源代码发送邮件的时候,rnSimpleEmail email = new SimpleEmail();rnemail.setHostName("smtp.163.com");rnemail.addTo("tonyformu@sina.com", "John Doe");rnemail.setFrom("tonyformu@163.com", "Me");rnemail.setSubject("Test message");rnemail.setMsg("This is a simple test of commons-email");rnemail.send();rn以上就是文档里面的示例代码,如果把发送邮箱换成公司的邮箱,邮箱服务器在局域网内,发送成功,如果换成外网的邮箱,比如163的,发送出错.rn具体情况是是:rn用代理上网时,报Connection reset.怀疑是代理的原因,换用了外网ip,错误变成了Connection <em>timed</em> <em>out</em>.rn请问,这是外网邮箱服务器添加了验证的原因,还是"smtp.163.com"搞错了,或者是别的原因?谢谢,重分相谢!rn
关于更新锁与行级锁
有三个问题 更新锁可以锁定表中的几行,使本<em>事务</em>可以进行修改而其它<em>事务</em>不能修改,那么其它<em>事务</em>可以读取吗? 行级锁可以锁定表中的几行,使本<em>事务</em>可以进行修改而其它<em>事务</em>不能修改,那么其它<em>事务</em>可以读取吗? 当更
关于mybatis 动态 sql 的一些陷阱:防止批量update,delete,select...
2019独角兽企业重金招聘Python工程师标准&gt;&gt;&gt; ...
sql server 2008 多个事务对同一条记录进行update操作,会发送死锁吗
session1 <em>update</em> t_table set score+=1 where userid=100 session2 <em>update</em> t_table set score+=1 where use
事务未完成提交,导致表被锁
背景 在xxxx项目中,需要将旧表数据导入新表中,因表结构与字段名都不同,遂采取设置一个定时任务去搞。 读取老数据 拆分新表所需数据信息 插入新表 在本地Debug启动调试,程序运行到插入新表时,直接「 强制 」关闭程序。 然后 … 除了「复制」,其他操作都直接卡死… 完了完了… 这下得收拾收拾工位准备去找财务结算了 额,不对!这好像是「Dev环境」,NICE !~~...
JDBC 并发事务中执行多条相同的Update语句,为什么会造成死锁?
-
java.net.SocketException: Connection timed out
java.net.SocketException: Connection <em>timed</em> <em>out</em>rnat java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)rn at java.net.SocketOutputStream.write(SocketOutputStream.java:136)rn at java.io.DataOutputStream.write(DataOutputStream.java:90)rn at java.io.FilterOutputStream.write(FilterOutputStream.java:80)rn at suncfs.etransserver.SocketTransService.bSendData(SocketTransService.java:321)rn at suncfs.etransserver.SocketTransService.bSendLargeData(SocketTransService.java:286)rn at suncfs.etransserver.SocketTransService.SendMessage(SocketTransService.java:500)rn at suncfs.etransserver.SocketTransService.SendString(SocketTransService.java:477)rn at suncfs.etransserver.SocketProcessService.SendReturnValue(SocketProcessService.java:776)rn at suncfs.etransserver.SocketProcessService.UpLoadFolderProcess(SocketProcessService.java:1252)rn at suncfs.etransserver.SocketProcessService.HandleConnection(SocketProcessService.java:585)rn at suncfs.etransserver.SocketProcessService.run(SocketProcessService.java:354)rnrn日志经常报以上错误,求高手解答。rn
Connection timed out
最近学习那个AT91ARM9200,遇到一个问题。就是在通过IIC总线读取IC数据的时候有问题!我们裁剪的系统里面有那个IIC总线的驱动,和一个DS1307的驱动。还有一个温度的芯片是LM75的,可以直接通过以设备文件的方式以read和write函数对其温度进行读写,DS1307的的操作也是这样的!rn 我开了两个线程。一个是得到实时的温度,一个是得到DS1307实时的时间.也不知道为什么当这两个线程运行了一个晚上之后就死啦!打印信息是这样的:1 read error!rn : Connection <em>timed</em> <em>out</em>rn 这是我程序的打印这信息的地方:rn ret = read(file, buf, 2); rn if (ret);rn exit(1);rn rn 这是我LM75里的读取温度的位置!rn 另外那个DS1307驱动的那个read函数也是一样的错误!rn 都是read那里打印的错误!rn 而且当我想再次运行程序的时候要重启板子上的系统!否则还是那样的打印错误信息!这到底是怎么回事啊????rn 在线等。。。。。。。。。。
iis:Connection Timed Out
Connection Timed Outrnrn--------------------------------------------------------------------------------rnDescription: Connection Timed Out rnrnrnrn一直都可以用,今天晚上一用就行这样了。我重装IIS都不行呀。同样显示。。rnrnrnHELP...SOMEBOBY HELP......
事务update锁表吗?
两种情况: 1.带索引  2.不带索引 前提介绍: 方式:采用命令行的方式来模拟 1.mysq由于默认是开启自动<em>提交</em><em>事务</em>,所以首先得查看自己当前的数据库<em>是否</em>开启了自动<em>提交</em><em>事务</em>。 命令:select @@auto<em>commit</em>; 结果如下: +--------------+ | @@auto<em>commit</em> | +--------------+ |            0 | +-----...
java.net.ConnectException: Connection timed out: connect
import java.io.IOException;rnimport java.io.OutputStream;rnimport java.net.Socket;rnimport java.net.UnknownHostException;rnimport java.sql.ResultSet;rnrnimport org.sql.IntoDB;rnrnpublic class BaiduReferer rn public static void main(String[] args) throws UnknownHostException,rn IOException, InterruptedException rn for(int i=0;i);rnrn OutputStream socketOut = socket.getOutputStream();rn socketOut.write(sb.toString().getBytes());rn socket.shutdownOutput(); //半闭输出流rnrnrn if(socket!=null)rn socket.close();rnrn rnrnrn在连接400-500次的时候,就报java.net.ConnectException: Connection <em>timed</em> <em>out</em>: connect异常
weblogic大量功能慢导致的问题
现场报节点不能使用。 #### > Http Request Information: weblogic.
JDBC 导致服务器挂起
JDBC 导致服务器挂起
java.lang.AbstractMethodError: oracle.jdbc.driver.T4CPreparedStatement.setBlob(ILjava/io/InputStream
在学习JDBC的时候,向数据库中插入blob数据时报这个错 网上查了下,oracle驱动版本的问题,原来的数据库驱动为classes12.jar,后改为o<em>jdbc</em>6.jar  成功运行 感谢网上的大神啊!!!! 下面贴出网友列出的各种oracle驱动版本及说明 http://blog.csdn.net/xuxurui007/article/details/17437209
【JVM命令系列(2)】堆栈跟踪之Jstack命令
jstack是java虚拟机自带的一种堆栈跟踪工具。 功能 jstack用于生成java虚拟机当前时刻的线程快照。线程快照是当前java虚拟机内每一条线程正在执行的方法堆栈的集合,生成线程快照的主要目的是定位线程出现长时间停顿的原因,如线程间死锁、死循环、请求外部资源导致的长时间等待等。 线程出现停顿的时候通过jstack来查看各个线程的调用堆栈,就可以知道没有响应的线程到底在
java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.isValid(I)Z
处理java.lang.AbstractMethodError: oracle.<em>jdbc</em>.driver.T4CConnection.isValid(I)Z 报错错误出现是使用spring boot构建web项目,在配置oracle数据库的时候,配置文件:application.ymlspring: datasource: driver-class-name: oracle.<em>jdbc</em>.d...
webservice java.net.ConnectException: Connection timed out
axis生成的客户端,调用webservice服务,在本地访问没有问题,上传到服务器上就报这个错java.net.ConnectException: Connection <em>timed</em> <em>out</em>,接口地址没有问题,我感觉是服务器网络环境的问题,不知道怎么解决。rn有谁遇到过这个问题
java.net.ConnectException:Connection timed out: connect
java.net.ConnectException:connect reset;rnjava.net.ConnectException:Connection <em>timed</em> <em>out</em>: connectrnrn对于这两个Exception 应该如何进行捕抓?rn应该现在项目里面要对于这两种情况进行不同的处理。。。
关于Connection timed out的问题
[align=left]我写了个小程序,就是模拟多次(大概有8000多次)访问不同的百度贴吧,从返回中的内容中提取出某些信息,用HttpURLConnection这个类实现, 但是每次访问了七八百次以后,就会出现rnjava.net.ConnectException: Connection <em>timed</em> <em>out</em>: connect这个异常。rn请问这是什么原因呢?有没有什么解决的办法?rn[/align]
update语句的执行步骤及commit语句的执行顺序
<em>update</em>语句的执行步骤和其他DML语句的执行步骤是一样的包含insert 、delete语句等
执行update语句后要commit才能生效
今天在学习oracle视频时,自己动手做了如下操作; 1.在SQL Window中执行语句<em>update</em> emp set sal='10000' where ename='SMITH',更新成功后,执行查询emp表语句,发现更新成功 2.在Command window中再次执行查询emp表语句,发现结果与步骤1中不一致 问题在于;步骤1中执行完<em>update</em>语句,没有点击<em>commit</em>图标进行<em>提交</em>
关于 JDBC 中数据中 commit 的问题
我最近在学JDBC,我知道Oracle中 的 增 删 改 是不会自动<em>提交</em>的,所以每次在sql控制台操作完之后都要手动<em>commit</em>,但是我发现在JDBC中用statement.excuteUpdate(
JDBC查询超时时间设置
    我们有时候需要控制SQL查询的最大耗时,比如一个“执行时长”的SQL在指定时间内如果没有执行完毕,我们需要“取消”此SQL,我们知道在JDBC中Statement类可以通过setQueryTime<em>out</em>()来实现此特性。     当设置query time<em>out</em>之后,JDBC客户端发送请求,并等待直到执行完成或者超时,当超时后,客户端尝试cancel当前SQL,要求mysql ser...
最新的新浪PHP面试题(MySQL数据库,一天一万条以上的增量,怎么优化?)
1、MySQL数据库,一天一万条以上的增量,怎么优化? 2、写个函数来解决多线程同时读写一个文件的问题。 3. 写5个不同的自己的函数,来截取一个全路径的文件的扩展名,允许封装php库中已有的函数。
java.net.ConnectException: Connection timed out怎么办?
总这样,为什么呀?我在本机用jbuilder测试没问题rn放到服务器上,就出现这样的错误rn
Socket Connection Timed Out 的问题
想写一个简单的聊天程序,于是写了一个服务器程序,和两个客户端程序,两个客户端程序代码差不多,就是相互的连接端口号不同,客户端程序打开时先向服务器端通报自己的IP地址,之后两个客户端聊天时,先向服务器取得对方的IP地址,之后再向对方发送数据,我的客户端程序中,都开了个线程,在这个线程中也写ServerSocket的代码,用来接收消息,但是测试时,在两台电脑上,分别运行两个客户端程序,只有一方能发送成功,另一方发送时总是失败,提示java.net.ConnectException: Connection <em>timed</em> <em>out</em>: connect,把Socket关闭了也没用啊,求解,以下是代码,Test作获取客户端的IP地址的服务器,Client和Client1分别是客户端。客户端程序运行到点击发送按钮的事件处理的代码时,提示异常的那个就无法运行新建Socket的代码rnrnimport java.net.*;rnimport java.io.*;rnrnpublic class Testrnrn public static void main(String argv[])rn rn int port=7;rn String userip[]=new String[2];rnrn tryrn rn ServerSocket srv=new ServerSocket(port);rn System.err.println("Echo server start at port:"+port);rnrn while(true)rn rn Socket clnt=srv.accept();rn DataInputStream dataIn=new DataInputStream(new BufferedInputStream(clnt.getInputStream()));rn DataOutputStream dataOut=new DataOutputStream(new BufferedOutputStream(clnt.getOutputStream()));rn rn String cc=String.valueOf(clnt.getInetAddress());rnrn String ip=cc.substring(1,cc.length()); rn rn String req=dataIn.readUTF();rn System.<em>out</em>.println(req);rnrn if(req.equals("Client"))rn rn userip[0]=ip;rn System.<em>out</em>.println("Client初始化成功!");rn rn else if(req.equals("Client1"))rn rn userip[1]=ip;rn System.<em>out</em>.println("Client1初始化成功!");rn rn else if(req.equals("needClient1"))rn rn dataOut.writeUTF(userip[1]);rn dataOut.flush();rn System.<em>out</em>.println(userip[1]);rn rn else if(req.equals("needClient"))rn rn dataOut.writeUTF(userip[0]);rn dataOut.flush();rn System.<em>out</em>.println(userip[0]);rn rnrn dataIn.close();rn dataOut.close();rn rn rn catch(IOException ioe)rn rn System.err.println(ioe);rn rn rnrnrnrnrnrnrnimport java.awt.*;rnimport java.awt.event.*;rnimport java.net.*;rnimport java.io.*;rnrnpublic class Client implements Runnablernrn private Socket sock;rn private DataInputStream dataIn;rn private DataOutputStream dataOut;rnrn Label la,la1;rn TextField tf,tf1;rn Button bu;rn String ip;rnrn public static void main(String argv[])rn rn new Client();rn rnrn public Client()rn rn Frame f=new Frame("Client");rn la=new Label("请输入要发送的字符串:");rn tf=new TextField();rn la1=new Label("接收到的信息");rn tf1=new TextField();rn tf1.setEditable(false);rn Panel pa=new Panel(new GridLay<em>out</em>(2,2));rn pa.add(la);rn pa.add(tf);rn pa.add(la1);rn pa.add(tf1);rnrn makeConnection();rn tryrn rn dataOut.writeUTF("Client");rn dataOut.flush();rn rn catch(IOException io)rn rn System.err.println("Error"+io);rn rn rn bu=new Button("发送");rn bu.addActionListener(new ActionListener()rn rn public void actionPerformed(ActionEvent ae)rn rn makeConnection();rnrn tryrn rn dataOut.writeUTF("needClient1");rn dataOut.flush();rn ip=dataIn.readUTF();rn System.<em>out</em>.println("1");rn InetAddress srvAddr=InetAddress.getByName(ip);rn System.<em>out</em>.println("2");rn Socket so=new Socket(srvAddr,1);rn System.<em>out</em>.println("3");rn dataOut=new DataOutputStream(new BufferedOutputStream(so.getOutputStream()));rn send();rn so.close();rn rn catch(IOException io)rn rn System.err.println("Error"+io);rn rn rn );rnrn f.add(pa,BorderLay<em>out</em>.NORTH);rn f.add(bu,BorderLay<em>out</em>.CENTER);rnrn f.pack();rn f.setVisible(true);rnrn Thread th=new Thread(this);rn th.start();rn rnrn private void makeConnection()rn rn tryrn rn InetAddress srvAddr=InetAddress.getByName("221.205.48.54");rn rn sock=new Socket(srvAddr,7);rn dataOut=new DataOutputStream(new BufferedOutputStream(sock.getOutputStream()));rn dataIn=new DataInputStream(new BufferedInputStream(sock.getInputStream()));rn System.<em>out</em>.println("Connection to server ok");rn rn catch(IOException io)rn rn System.err.println("Error:"+io);rn rn rnrn private void send()rn rn tryrn rn dataOut.writeUTF(tf.getText());rn dataOut.flush();rn rn catch(IOException IOE)rn rn System.<em>out</em>.println(IOE);rn rn rnrn public void run()rn rn int port=3800;rnrn tryrn rn ServerSocket srv=new ServerSocket(port);rn System.err.println("Echo server start at port:"+port);rnrn while(true)rn rn Socket clnt=srv.accept();rn DataInputStream dataIn=new DataInputStream(new BufferedInputStream(clnt.getInputStream()));rn rn System.<em>out</em>.println("Clinet connected from:"+clnt.getInetAddress());rn String req=dataIn.readUTF();rnrn tf1.setText(req);rn dataIn.close();rn clnt.close();rn rn rn catch(IOException ioe)rn rn System.err.println(ioe);rn rn rnrnrnrnrnrnrnrnimport java.awt.*;rnimport java.awt.event.*;rnimport java.net.*;rnimport java.io.*;rnrnpublic class Client1 implements Runnablernrn private Socket sock;rn private DataInputStream dataIn;rn private DataOutputStream dataOut;rnrn Label la,la1;rn TextField tf,tf1;rn Button bu;rn String ip;rnrn public static void main(String argv[])rn rn new Client1();rn rnrn public Client1()rn rn Frame f=new Frame("Client1");rn la=new Label("请输入要发送的字符串:");rn tf=new TextField();rn la1=new Label("接收到的信息");rn tf1=new TextField();rn tf1.setEditable(false);rn Panel pa=new Panel(new GridLay<em>out</em>(2,2));rn pa.add(la);rn pa.add(tf);rn pa.add(la1);rn pa.add(tf1);rnrn makeConnection();rn tryrn rn dataOut.writeUTF("Client1");rn dataOut.flush();rn rn catch(IOException io)rn rn System.err.println("Error"+io);rn rnrn bu=new Button("发送");rn bu.addActionListener(new ActionListener()rn rn public void actionPerformed(ActionEvent ae)rn rn makeConnection();rn tryrn rn dataOut.writeUTF("needClient");rn dataOut.flush();rn ip=dataIn.readUTF();rn System.<em>out</em>.println("4");rn InetAddress srvAddr=InetAddress.getByName(ip);rn System.<em>out</em>.println("5");rn Socket so=new Socket(srvAddr,3800);rn System.<em>out</em>.println("6");rn dataOut=new DataOutputStream(new BufferedOutputStream(so.getOutputStream()));rn send();rn so.close();rn rn catch(IOException io)rn rn System.err.println("Error"+io);rn rn rn );rnrn f.add(pa,BorderLay<em>out</em>.NORTH);rn f.add(bu,BorderLay<em>out</em>.CENTER);rnrn f.pack();rn f.setVisible(true);rnrn Thread th=new Thread(this);rn th.start();rn rnrn private void makeConnection()rn rn tryrn rn InetAddress srvAddr=InetAddress.getByName("221.205.48.54");rn rn sock=new Socket(srvAddr,7);rn dataOut=new DataOutputStream(new BufferedOutputStream(sock.getOutputStream()));rn dataIn=new DataInputStream(new BufferedInputStream(sock.getInputStream()));rn System.<em>out</em>.println("Connection to server ok");rn rn catch(IOException io)rn rn System.err.println("Error:"+io);rn rn rnrn private void send()rn rn tryrn rn dataOut.writeUTF(tf.getText());rn dataOut.flush();rn rn catch(IOException IOE)rn rn System.<em>out</em>.println(IOE);rn rn rnrn public void run()rn rn int port=1;rnrn tryrn rn ServerSocket srv=new ServerSocket(port);rn System.err.println("Echo server start at port:"+port);rnrn while(true)rn rn Socket clnt=srv.accept();rn DataInputStream dataIn=new DataInputStream(new BufferedInputStream(clnt.getInputStream()));rn rn System.<em>out</em>.println("Clinet connected from:"+clnt.getInetAddress());rn String req=dataIn.readUTF();rnrn tf1.setText(req);rn dataIn.close();rn clnt.close();rn rn rn catch(IOException ioe)rn rn System.err.println(ioe);rn rn rn
xfire调用webService报连接Connection timed out
说明下环境,在测试机上接用接口时无任务错误,但是放到正式机上后,一直无法调用rnStruts has detected an unhandled exception: rnrnMessages: Connection <em>timed</em> <em>out</em> rnCouldn't send message. rnCouldn't send message. rnCould not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Couldn't send message. rn rnFile: org/codehaus/xfire/transport/http/HttpChannel.java rnLine number: 145 rnrnrn--------------------------------------------------------------------------------rnrnStacktracesrnorg.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Couldn't send message. rn org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:92)rn org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)rn $Proxy47.appendSalesInfo(Unknown Source)rn com.ultrapower.eoms.ultrawork.web.SalersinfoAction.saveInfo(SalersinfoAction.java:967)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:585)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)rnrnrnrn怀疑是公司网络防火墙访问策略 未开通要访问的端口。。,但网络管理人员正在查,请教是不是除了网络策略原因,还有其它原因引起该问题的吗?
线上系统报ERR Connection timed out异常解决过程
1 发现线上redis问题:ERR Connection <em>timed</em> <em>out</em>近日,刚上线一个系统,上线第二天去ELK日志系统(公司的日志系统是对开源实时日志分析ELK平台进行了改造而来的)跟踪一下线上情况,一时发现抛出了很多redis异常:再仔细一看:发现连接redis有问题,于是立即联系运维,运维的回答是他们线上使用了twemproxy集群技术,redis服务并没有问题。于是我就方了,难道是程序使
求助spring报Connection timed out: connect,是什么原因,
搭建ssh框架时报了这个错,不知道哪里错了,把ssh分开搭建看,发现是spring报了这个错,结果发现以前写的好好的spring代码也在报这个错,大家看看是哪里出问题了,搞了一天了rnlog4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).rnlog4j:WARN Please initialize the log4j system properly.rnException in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.net.ConnectException: Connection <em>timed</em> <em>out</em>: connectrnCaused by: java.net.ConnectException: Connection <em>timed</em> <em>out</em>: connectrn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)rn at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)rn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)rn at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)rn at java.net.Socket.connect(Socket.java:519)rn at java.net.Socket.connect(Socket.java:469)rn at sun.net.NetworkClient.doConnect(NetworkClient.java:163)rn at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)rn at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)rn at sun.net.www.http.HttpClient.(HttpClient.java:233)rn at sun.net.www.http.HttpClient.New(HttpClient.java:306)rn at sun.net.www.http.HttpClient.New(HttpClient.java:323)rn at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:852)rn at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793)rn at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:718)rn at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1041)rn at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)rn at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1315)rn at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1282)rn at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:283)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1192)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1089)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1002)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)rn at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)rn at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)rn at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)rn at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:73)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:361)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:313)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:173)rn at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:112)rn at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)rn at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:394)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:122)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:66)rn at demo.spring.test.TestDataSource.main(TestDataSource.java:14)rnrn配置文件rnrnrnrnrn rn rn rn rn oracle.<em>jdbc</em>.driver.OracleDriverrn rn rn <em>jdbc</em>:oracle:thin:@localhost:1521:ORCLrn rn rn systemrn rn rn managerrn rn rn rn rn rn rn rn rn rn rn
JDBC之Transaction(事务),SetAutoCommit保证事务原子性
默认的话为自动<em>提交</em>, 每执行一个<em>update</em> ,delete或者insert的时候都会自动<em>提交</em>到数据库,无法回滚<em>事务</em>。 设置<em>connection</em>.setAutoCommit(false);只有程序调用<em>connection</em>.<em>commit</em>()的时候才会将先前执行的各语句一起<em>提交</em>到数据库;或者先前执行的各语句只执行了一部分,然后就失败了,这时可以程序调用<em>connection</em>.rollBack()。
jdbc事务处理(commit rollback)
package org.kodejava.example.sql; import java.sql.*; public class TransactionRollbackExample { public static void main(String[] args) throws Exception { String url = "<em>jdbc</em>:mysql://localhost/testdb"; String username = "root";
java-JDBC-about AutoCommit[关于Connection的setAutoCommit方法]
setAutoCommit void setAutoCommit(boolean autoCommit) throws SQLException 将此连接的自动<em>提交</em>模式设置为给定状态。如果连接处于自动<em>提交</em>模式下,则它的所有 SQL 语句将被执行并作为单个<em>事务</em><em>提交</em>。否则,它的 SQL 语句将聚集到<em>事务</em>中,直到调用 <em>commit</em> 方法或 rollback 方
使用Mybatis添加用户时报:Setting autocommit to false on JDBC Connection
2019-01-24 15:18:13,391 0 [ main] DEBUG ache.ibatis.logging.LogFactory - Logging initialized using 'class org.apache.ibatis.logging.log4j.Log4jImpl' adapter. 2019-01-24 15:18:13,632 2...
使用JDBC的con.setAutoCommit(false)时,可能出现的几个问题与解决方法
1.使用查询语句查出的数据与MySQL数据库里面的数据不一致 问题原因:在设置手动<em>提交</em>SQL语句后,使用查询语句,这个语句并没有发送给MySQL进行查询,而是查的缓存。所以你改了MySQL数据库里面的数据,并不会被Java程序查询到。 解决方法: ①在执行一个SQL语句后,就<em>提交</em>SQL语句。 如下 PreparedStatement statement = <em>connection</em>.prep...
VB6 执行UPDATE操作是否锁表
如题rnrn我代码调试的时候rn在执行UPDATE操作时 SELECT不了数据一直处于等待状态rn直到退出函数rn[code=VB]rnrnPublic Function ExecuteSynEx(ByVal strConn As String, _rn ByVal strTableName As String, _rn ByVal bIsIdentity As Long, _rn ByVal strAddSQL As Variant, _rn ByVal strUpdSQL As Variant, _rn ByVal strDelSQL As Variant, _rn ByRef ReturnMsg As String) As Booleanrn10 On Error GoTo HErrorrn Dim cn As ADODB.Connectionrn Dim lInterID As Long, lTransType As Longrn Dim i As Longrn Dim strSQL As Stringrn Dim obj As Objectrn Dim lSQLCount As Longrn rn'20 GetObjectContext.SetAbortrn30 ExecuteSynEx = Falsern rn40 Set cn = New ADODB.Connectionrn50 cn.Open strConnrn60 cn.CursorLocation = adUseClientrn70 cn.CommandTime<em>out</em> = 3600rnrn'80 cn.Execute "alter table " & strTableName & " nocheck constraint all"rn If bIsIdentity = 1 Thenrn cn.Execute "SET IDENTITY_INSERT " & strTableName & " on"rn End Ifrn90 Set obj = CreateObject("KFOX.StringBuilder")rn100 lSQLCount = 0rn110 For i = LBound(strDelSQL) To UBound(strDelSQL)rn120 strSQL = Trim(strDelSQL(i))rn130 If Len(strSQL) > 0 Thenrn140 lSQLCount = lSQLCount + 1rn150 obj.Append strSQLrn160 End Ifrn170 If lSQLCount = 100 Thenrn180 cn.Execute obj.StringValuern190 obj.Remove 1, obj.lengthrn200 lSQLCount = 0rn210 If cn.Errors.Count > 0 Thenrn220 Err.Raise -1, "ExecuteSynEx", cn.Errors.Item(0).Descriptionrn230 End Ifrn240 End Ifrn250 Next irn260 If lSQLCount > 0 Thenrn270 cn.Execute obj.StringValuern280 obj.Remove 1, obj.lengthrn290 lSQLCount = 0rn300 If cn.Errors.Count > 0 Thenrn310 Err.Raise -1, "ExecuteSynEx", cn.Errors.Item(0).Descriptionrn320 End Ifrn330 End Ifrn340 Set obj = Nothingrn rn350 Set obj = CreateObject("KFOX.StringBuilder")rn360 lSQLCount = 0rn370 For i = LBound(strAddSQL) To UBound(strAddSQL)rn380 strSQL = Trim(strAddSQL(i))rn390 If Len(strSQL) > 0 Thenrn400 lSQLCount = lSQLCount + 1rn410 obj.Append strSQLrn420 End Ifrn430 If lSQLCount = 100 Thenrn440 cn.Execute obj.StringValuern450 obj.Remove 1, obj.lengthrn460 lSQLCount = 0rn470 If cn.Errors.Count > 0 Thenrn480 Err.Raise -1, "ExecuteSynEx", cn.Errors.Item(0).Descriptionrn490 End Ifrn500 End Ifrn510 Next irn520 If lSQLCount > 0 Thenrn530 cn.Execute obj.StringValuern540 obj.Remove 1, obj.lengthrn550 lSQLCount = 0rn560 If cn.Errors.Count > 0 Thenrn570 Err.Raise -1, "ExecuteSynEx", cn.Errors.Item(0).Descriptionrn580 End Ifrn590 End Ifrn600 Set obj = Nothingrnrn610 Set obj = CreateObject("KFOX.StringBuilder")rn620 lSQLCount = 0rn630 For i = LBound(strUpdSQL) To UBound(strUpdSQL)rn640 strSQL = Trim(strUpdSQL(i))rn650 If Len(strSQL) > 0 Thenrn660 lSQLCount = lSQLCount + 1rn670 obj.Append strSQLrn680 End Ifrn690 If lSQLCount = 100 Thenrn700 cn.Execute obj.StringValuern710 obj.Remove 1, obj.lengthrn720 lSQLCount = 0rn730 If cn.Errors.Count > 0 Thenrn740 Err.Raise -1, "ExecuteSynEx", cn.Errors.Item(0).Descriptionrn750 End Ifrn760 End Ifrn770 Next irn780 If lSQLCount > 0 Thenrn790 cn.Execute obj.StringValuern800 obj.Remove 1, obj.lengthrn810 lSQLCount = 0rn820 If cn.Errors.Count > 0 Thenrn830 Err.Raise -1, "ExecuteSynEx", cn.Errors.Item(0).Descriptionrn840 End Ifrn850 End Ifrn860 Set obj = Nothingrnrn If bIsIdentity = 1 Thenrn cn.Execute "SET IDENTITY_INSERT " & strTableName & " off"rn End Ifrn'870 cn.Execute "alter table " & strTableName & " check constraint all"rnrn'880 GetObjectContext.SetCompletern890 ExecuteSynEx = Truern900 Exit FunctionrnHError:rnrn'910 cn.Execute "alter table " & strTableName & " check constraint all"rn If bIsIdentity = 1 Thenrn cn.Execute "SET IDENTITY_INSERT " & strTableName & " off"rn End Ifrn920 GetObjectContext.SetAbortrn930 ExecuteSynEx = Falsern940 Err.Raise -1, "ExecuteSynEx", Err.Description & "Erl:" & ErlrnEnd Functionrnrn[/code]
Delphi6+SqlServer退出时报"Connection Timed Out!"错误!
用Delpih6+SqlServer开发一C/S程序,客户端退出时报以下错误:“Connection Timed Out”rn点击‘确定’后不能退出!
关于HttpURLConnection:Connection timed out: connect 问题
[code=Java]rnprivate String getWebData(String strurl) rn try rn URL url = new URL(strurl);rn // 打开连接,此处只是创建一个实例,并没有真正的连接rn HttpURLConnection httpCon = (HttpURLConnection) url.openConnection();rn httpCon.setConnectTime<em>out</em>(30000);rn httpCon.setReadTime<em>out</em>(30000);rn httpCon.setDoOutput(true);//打开写入属性rn httpCon.setRequestMethod("POST");//设置<em>提交</em>方法 rn rn httpCon.connect();//建立连接rn InputStream inputStream = httpCon.getInputStream();rn InputStreamReader inputReader = new InputStreamReader(inputStream,"utf-8");rn BufferedReader bufferReader = new BufferedReader(inputReader);rn StringBuffer sb = new StringBuffer();rn String inputLine = null; rn while ((inputLine = bufferReader.readLine()) != null) rn sb.append(inputLine+"\n");rn rn bufferReader.close(); rn inputReader.close();rn inputStream.close();rn httpCon.disconnect();rn System.<em>out</em>.println(sb.toString().trim());rn return sb.toString();rn catch (Exception e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn System.<em>out</em>.println("=======================================================");rn return null;rn rn[/code]rnrn以上是源代码,异常信息如下:rn[color=#FF0000]java.net.ConnectException: Connection <em>timed</em> <em>out</em>: connect[/color]rn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)rn at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)rn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)rn at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)rn at java.net.Socket.connect(Socket.java:519)rn at sun.net.NetworkClient.doConnect(NetworkClient.java:158)rn at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)rn at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)rn at sun.net.www.http.HttpClient.(HttpClient.java:233)rn at sun.net.www.http.HttpClient.New(HttpClient.java:306)rn at sun.net.www.http.HttpClient.New(HttpClient.java:323)rn at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:837)rn at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:778)rn at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:703)rn at com.joye.util.UpdateAppData.getWebData(UpdateAppData.java:174)rn at com.joye.util.UpdateAppData.getAppDetails(UpdateAppData.java:137)rn at com.joye.util.TimerGetData.run(TimerGetData.java:11)rn at java.util.TimerThread.mainLoop(Timer.java:512)rn at java.util.TimerThread.run(Timer.java:462)rnrn求救:这个连接超时的异常,该如何解决呢?rn[color=#0000FF]httpCon.setConnectTime<em>out</em>(30000);[/color]rn我已经设置了超时重连的时间啊!
微信自定义菜单java.net.ConnectException: Connection timed out: connect
让我来描述一下,不可能微信的服务器那么差吧;我连接了5分钟之久,一直都是返回-1;最后它就出现这个问题了;万一它老是返回-1,那用户点到之后,等上个几分qkhh/ch ; 证书没有过期,有搞微信的大大帮忙 一下吗; rnqq wang123qisheng@163.com ; phone 13602402749
JDBC Connection.commit()的bug
逻辑:MQ发送->更新Process_code->更新process_code正常->MQ.<em>commit</em>()                                                   |->更新Process_code异常->MQ.rollback()程序大概:MQ.Send();Connection conn=ConnectionPool.open();if(conn!
JDBC事务控制管理
1、<em>事务</em> (1)<em>事务</em>的概念 <em>事务</em>指逻辑上的一组操作,组成这组操作的各个单元,要不全部成功,要不全部不成功。 例如:A——B转帐,对应于如下两条sql语句 <em>update</em> account set money=money-100 where name=‘a’;  <em>update</em> account set money=money+100 where name=‘b’; 数据
关于 JDBC 自动提交
设置 JDBC 连接对象关闭 自动<em>提交</em> conn.setAutoCommit(false);在执行完SQL后, 要<em>提交</em>一下, conn.<em>commit</em>();记得这个连接对象, 一定要是公共的一个连接对象, 关闭自动<em>提交</em>, 一定是要在初始化连接对象时设置的.conn.rollback() 是在SQL语句执行错误时,做数据回滚用的在执行完你的逻辑算法后, <em>提交</em>一下在一个处理逻辑中,打开一个数据库连接,处理
用JDBC访问ORACLE数据库 关于commit 增快效率 大数据 等的整理
用JDBC访问ORACLE数据库 关于<em>commit</em> 增快效率 大数据 等的整理
Caused by: org.hibernate.TransactionException: unable to commit against JDBC connection
1、错误描述Caused by: org.hibernate.TransactionException: unable to <em>commit</em> against JDBC <em>connection</em> at org.hibernate.engine.transaction.internal.<em>jdbc</em>.JdbcTransaction.doCommit(JdbcTransaction.java:116) at
Java Mail在web环境下Connection timed out的问题
做一个找回密码的功能,需要发邮件,直接使用的java mail API,经过测试,以java application方式直接运行,发邮件功能毫无问题,但是一旦在web环境下运行,就会出现:rn[code=java]rn com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.sina.sn, 25; time<em>out</em> -1;rn nested exception is:rn java.net.ConnectException: Connection <em>timed</em> <em>out</em>: connectrn at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2054)rn at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:697)rn at javax.mail.Service.connect(Service.java:386)rn at javax.mail.Service.connect(Service.java:245)rn at javax.mail.Service.connect(Service.java:194)rn at javax.mail.Transport.send0(Transport.java:253)rn at javax.mail.Transport.send(Transport.java:124)rn[/code]rnweb环境是Spring MVC + Spring + Tomcat,另外jar包就用了一个javax.mail.jar,版本1.5。这个问题很奇怪,求高手解答
Connection timed out: connect 在线等!!!!!!!
package com.zdvictory.wjj.common;rnrnimport java.io.BufferedReader;rnimport java.io.BufferedWriter;rnimport java.io.DataOutputStream;rnimport java.io.FileOutputStream;rnimport java.io.IOException;rnimport java.io.InputStream;rnimport java.io.InputStreamReader;rnimport java.io.OutputStreamWriter;rnimport java.net.HttpURLConnection;rnimport java.net.URL;rnimport java.net.URLConnection;rnimport java.net.URLEncoder;rn/**rn * rn * @author huoyuturn *rn */rnpublic class Tools rn private String sessionId;rn// private Tools() rn// private static final Tools tool=new Tools(); rn// public static Tools getInstance() rn// return tool; rn// rn rn public boolean makeHtml(String loginUrl, String username, String password, String url, String filePath, String chartset) rn HttpURLConnection huc = null;rn BufferedReader br = null;rn BufferedWriter bw = null;rn try rn if(this.getSessionId()==null || "".equals(this.getSessionId()))rn this.sendLoginRequest(loginUrl, username, password); rn rn huc = (HttpURLConnection) new URL(url).openConnection();rn huc.setRequestProperty("Cookie",this.getSessionId());rn huc.connect();rn rn InputStream stream = huc.getInputStream();rn bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filePath), chartset));rn br = new BufferedReader(new InputStreamReader(stream, chartset));rn String line;rn while ((line = br.readLine()) != null) rn if (line.trim().length() > 0) rn bw.write(line);rn bw.newLine();rn rn rn catch (Exception e) rn e.printStackTrace();rn return false;rn finally rn try rn br.close();rn bw.close();rn huc.disconnect();rn catch (Exception e) rn e.printStackTrace();rn return false;rn rn rn return true;rn rn rn public void sendLoginRequest(String url,String username,String password) throws IOException rn URL loginUrl = new URL(url);rn HttpURLConnection <em>connection</em> = (HttpURLConnection) loginUrl.openConnection(); rn // Output to the <em>connection</em>. Default isrn // false, set to true because postrn // method must write something to thern // <em>connection</em>rn // 设置<em>是否</em>向<em>connection</em>输出,因为这个是post请求,参数要放在http正文内,因此需要设为truern <em>connection</em>.setDoOutput(true);rn // Read from the <em>connection</em>. Default is true.rn <em>connection</em>.setDoInput(true);rn // Set the post method. Default is GETrn <em>connection</em>.setRequestMethod("POST");rn // Post cannot use cachesrn // Post 请求不能使用缓存rn <em>connection</em>.setUseCaches(false);rn rn // This method takes effects torn // every instances of this class.rn // URLConnection.setFollowRedirects是static函数,作用于所有的URLConnection对象。rn // <em>connection</em>.setFollowRedirects(true);rn rn // This methods onlyrn // takes effacts to thisrn // instance.rn // URLConnection.setInstanceFollowRedirects是成员函数,仅作用于当前函数rn <em>connection</em>.setInstanceFollowRedirects(false);rn rn // Set the content type to urlencoded,rn // because we will writern // some URL-encoded content to thern // <em>connection</em>. Settings above must be set before connect!rn // 配置本次连接的Content-type,配置为application/x-www-form-urlencoded的rn // 意思是正文是urlencoded编码过的form参数,下面我们可以看到我们对正文内容使用URLEncoder.encode进行编码rn //<em>connection</em>.setRequestProperty("Content-Type","application/x-www-form-urlencoded");rn // 连接,从postUrl.openConnection()至此的配置必须要在connect之前完成,rn // 要注意的是<em>connection</em>.getOutputStream会隐含的进行connect。rn <em>connection</em>.connect();rn rn DataOutputStream <em>out</em> = new DataOutputStream(<em>connection</em>.getOutputStream());rn rn // 要传的参数rn String content = URLEncoder.encode("loginId", "UTF-8") +"="+ URLEncoder.encode(username, "UTF-8");rn content += "&" + URLEncoder.encode("password", "UTF-8") +"="+ URLEncoder.encode(password, "UTF-8");rn rn // DataOutputStream.writeBytes将字符串中的16位的unicode字符以8位的字符形式写道流里面rn <em>out</em>.writeBytes(content);rn rn // flush and closern <em>out</em>.flush();rn <em>out</em>.close();rn rn //Get Session ID rn if (<em>connection</em> != null) rn String key = "";rn String session_str = "";rn for (int i = 1; (key = <em>connection</em>.getHeaderFieldKey(i)) != null; i++) rn if (key.equalsIgnoreCase("set-cookie")) rn session_str = <em>connection</em>.getHeaderField(key);rn session_str = session_str.substring(0, session_str.indexOf(";"));rn rn this.setSessionId(session_str);rn rn rn rn <em>connection</em>.disconnect();rn rnrn public String getSessionId() rn return sessionId;rn rn public void setSessionId(String sessionId) rn this.sessionId = sessionId;rn rnrnrn下面是错误信息rnjava.net.ConnectException: Connection <em>timed</em> <em>out</em>: connectrn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)rn at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)rn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)rn at java.net.Socket.connect(Socket.java:516)rn at java.net.Socket.connect(Socket.java:466)rn at sun.net.NetworkClient.doConnect(NetworkClient.java:157)rn at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)rn at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)rn at sun.net.www.http.HttpClient.(HttpClient.java:214)rn at sun.net.www.http.HttpClient.New(HttpClient.java:287)rn at sun.net.www.http.HttpClient.New(HttpClient.java:299)rn at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:795)rn at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:747)rn at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:672)rn at com.zdvictory.wjj.common.Tools.sendLoginRequest(Tools.java:147)rn at com.zdvictory.wjj.common.Tools.makeHtml(Tools.java:34)rn at com.zdvictory.wjj.pricesend.action.PcServerObjectAction.sendMail(PcServerObjectAction.java:277)rnjava.lang.NullPointerExceptionrn at com.zdvictory.wjj.common.Tools.makeHtml(Tools.java:55)
如何解决connect():connection timed out
客户端并发200个线程请求连接,后面50个左右会<em>connection</em> <em>timed</em> <em>out</em>,服务端用的是select。请教大侠!
webservice AXIS Connection timed out: connect
我把WSDL文件生成java类 然后调用invoke()方法发送报文。在本地测试:rnAxisFaultrn faultCode: http://schemas.xmlsoap.org/soap/envelope/Server.userExceptionrn faultSubcode: rn faultString: java.net.ConnectException: Connection <em>timed</em> <em>out</em>: connectrn faultActor: rnrn再服务器上测试的结果是:rn返回的error message是:"AxisFault eRuntimeError: Internal Server Error "rnrn一下是java代码:rnLogger log = Logger.getLogger(Test.class);rn try rn // 加载SSL证书文件rn System.setProperty("javax.net.ssl.trustStore",rn "D:/MyEclipse/workspace/OcbcBatch/src/cacerts");rn// "/home/tomcat/apache-tomcat-5.5.33/webapps/OcbcBatch/cacerts");rn log.info("load SSL File");rn // 调用发送方法rn MainRequestResponse__HTTPLocator locator = new MainRequestResponse__HTTPLocator();rn PortType portType = locator.getSOAPEventSource();rn @SuppressWarnings("unused")rn ServiceEnvelope rsEnvelop = new ServiceEnvelope();rn EmailServiceImpl emailServiceImpl = new EmailServiceImpl();rn ServiceEnvelope envelope = new ServiceEnvelope();rn envelope = emailServiceImpl.getServiceEnvelope();rn log.info("-----operation method-----");rn rsEnvelop = portType.operation(envelope);rn log.info("send ok");rn rn Reply_record[] status = new Reply_record[] ;rn status = rsEnvelop.getServiceBody().getRsDetail().getUpdate_reply();rn for (int i = 0; i < status.length; i++) rn // 取得返回状态rn log.info("status[" + i + "]:" + status[i].getStatus());rn // 取得错误信息rn log.info("errorMessage[" + i + "]:" + status[i].getError_message());rn rn catch (AxisFault e) rn e.printStackTrace();rn log.error("AxisFault e" + e.getMessage());rn catch (RemoteException e) rn e.printStackTrace();rn log.error("RemoteException e" + e.getMessage());rn catch (ServiceException e) rn e.printStackTrace();rn log.error("ServiceException e" + e.getMessage());rn rnrn有哪位大侠做过类似的东西啊?我以前没接触过。。。。。。
Could not send Message和Connection timed out
2013-07-02 02:57:31,176 INFO [Thread-21][org.apache.cxf.phase.PhaseInterceptorChain] - Interceptor has thrown exception, unwinding nowrnorg.apache.cxf.interceptor.Fault: Could not send Message.rn at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)rn at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)rn at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)rn at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)rn at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)rn at $Proxy39.merge(Unknown Source)rn at com.huawei.most.cmdb.probe.process.activities.AutoMergeActivity.process(AutoMergeActivity.java:87)rn at com.huawei.most.cmdb.probe.process.service.ProbeProcessor.process(ProbeProcessor.java:413)rn at com.huawei.most.cmdb.probe.process.service.ProbeProcessor.execute(ProbeProcessor.java:107)rn at com.huawei.most.cmdb.probe.schedule.job.ProbeJob.execute(ProbeJob.java:96)rn at com.huawei.most.cmdb.probe.schedule.biz.impl.ProbeScheduleManagerImpl$1.run(ProbeScheduleManagerImpl.java:340)rnCaused by: java.net.ConnectException: Connection <em>timed</em> <em>out</em>rn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)rn at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)rn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)rn at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)rn at java.net.Socket.connect(Socket.java:529)rn at sun.net.NetworkClient.doConnect(NetworkClient.java:158)rn at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)rn at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)rn at sun.net.www.http.HttpClient.(HttpClient.java:234)rn at sun.net.www.http.HttpClient.New(HttpClient.java:307)rn at sun.net.www.http.HttpClient.New(HttpClient.java:324)rn at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)rn at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)rn at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)rn at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1014)rn at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1909)rn at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1864)rn at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42)rn at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)rn at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1927)rn at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)rn at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)rn at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)rn ... 12 more
事务处理造成的数据库访问超时
关于预算系统存在小部分模块超时的问题,我一直都认为是通过VPN访问服务器速度太慢所致。但是,我在.16测试服务器和我自己本地的部署的服务器进行测试的时候,超时情况仍然存在。查阅网上相关资料修改Web.config之类,延长所谓的数据库服务器会话时间,没有什么效果。 下面我以“科目明细导入”超时为例,讲解预算系统出现数据访问超时的主要原因。   之所以把问题给拿出来,是因为我想
事务超时
<em>事务</em>超时       本文概览:介绍了超时有关的概念:@Transaction的time<em>out</em>、mybatis的time<em>out</em>、mysql的innodb_lock_wait_time<em>out</em>。 1 问题 1.1 背景 在一个<em>事务</em>中完成解析一个大文件,分批存入到数据库。遇到问题,执行时间比较长,就讨论了<em>事务</em>超时的问题,担心执行时间太长,<em>事务</em>超时自动回滚了。 为了考虑这个问题,需要考虑如下...
ActiveMQ的session.commit()有没有超时异常?
ActiveMQ 5.8 ,在.NET 4下面用c#写了个Producer,用一个for循环一口气发了10万条消息到服务器上,服务器采用默认配置。我用的是<em>事务</em>模式,发完之后调用一次<em>commit</em>() 结
数据库oracle--commit与不commit
http://www.linuxidc.com/Linux/2012-07/66711.htm
关于数据库的commit以及rollback(转载)
rollback   回滚的意思。  就是数据库里做修改后 ( <em>update</em>  ,insert  , delete)未<em>commit</em> 之前   使用rollback   可以恢复数据到修改之前。 从功能上划分,SQL 语言可以分为DDL,DML和DCL三大类。 1. DDL(Data Definition Language)  数据定义语言,用于定义和管理 SQL 数据库中的所有对象的语言 ;
一个关于Connection timed out的问题?
我用struts+spring+ibat做了个考评系统~当系统由10.73.4.17:9080 换成10.73.1.91:9080时rn怎么管理员登陆以后进内页点下拉菜单报这样一个错呢???应该怎么解决这个问题呢??rnHTTP Status 500 - rnrn--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjava.net.ConnectException: Connection <em>timed</em> <em>out</em>: connectrnjava.net.PlainSocketImpl.socketConnect(Native Method)rnjava.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)rnjava.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)rnjava.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)rnjava.net.Socket.connect(Socket.java:452)rnjava.net.Socket.connect(Socket.java:402)rnjava.net.Socket.(Socket.java:309)rnjava.net.Socket.(Socket.java:184)rnorg.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79)rnorg.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121)rnorg.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)rnorg.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)rnorg.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)rnorg.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)rnorg.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)rncom.whicss.business.platform.sso.util.SSOUtils.httpRequest(SSOUtils.java:164)rncom.whicss.business.platform.sso.util.SSOUtils.redirectToAuthenticate(SSOUtils.java:178)rncom.whicss.business.platform.sso.filter.SSOAgentFilter.doFilter(SSOAgentFilter.java:69)rncom.whcyit.framework.filter.EncodingFilter.doFilter(EncodingFilter.java:53)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.rnrnrn--------------------------------------------------------------------------------rn
急需解决:java.net.ConnectException: Connection timed out: connect
** BEGIN NESTED EXCEPTION ** rnrnjava.net.ConnectExceptionrnMESSAGE: Connection <em>timed</em> <em>out</em>: connectrnrnSTACKTRACE:rnrnjava.net.ConnectException: Connection <em>timed</em> <em>out</em>: connectrn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)rn at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)rn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)rn at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)rn at java.net.Socket.connect(Socket.java:529)rn at java.net.Socket.connect(Socket.java:478)rn at java.net.Socket.(Socket.java:375)rn at java.net.Socket.(Socket.java:218)rn at com.mysql.<em>jdbc</em>.StandardSocketFactory.connect(StandardSocketFactory.java:256)rn at com.mysql.<em>jdbc</em>.MysqlIO.(MysqlIO.java:271)rn at com.mysql.<em>jdbc</em>.Connection.createNewIO(Connection.java:2771)rn at com.mysql.<em>jdbc</em>.Connection.(Connection.java:1555)rn at com.mysql.<em>jdbc</em>.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)rn at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)rn at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)rn at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)rn at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)rn at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)rn at org.quartz.utils.PoolingConnectionProvider.getConnection(PoolingConnectionProvider.java:197)rn at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:112)rn at org.quartz.impl.<em>jdbc</em>jobstore.JobStoreSupport.getConnection(JobStoreSupport.java:633)rn at org.quartz.impl.<em>jdbc</em>jobstore.JobStoreTX.getNonManagedTXConnection(JobStoreTX.java:72)rn at org.quartz.impl.<em>jdbc</em>jobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3659)rn at org.quartz.impl.<em>jdbc</em>jobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3624)rn at org.quartz.impl.<em>jdbc</em>jobstore.JobStoreSupport.cleanVolatileTriggerAndJobs(JobStoreSupport.java:693)rn at org.quartz.impl.<em>jdbc</em>jobstore.JobStoreSupport.initialize(JobStoreSupport.java:555)rn at org.quartz.impl.<em>jdbc</em>jobstore.JobStoreTX.initialize(JobStoreTX.java:59)rn at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1204)rn at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1355)rn at cn.rmsd.rmbcs.util.SimpleTriggerRunner.run(SimpleTriggerRunner.java:74)rn at cn.rmsd.rmbcs.util.ConfigInit.init(ConfigInit.java:110)rn at javax.servlet.GenericServlet.init(GenericServlet.java:212)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:595)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:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rnrnrn** END NESTED EXCEPTION **rn………………………………rn以上错误循环了好几次 正常的访问没有问题,可是每次启动时就出现,整个项目原来是好的自己导入就出现了…… 请高手给点建议
Connection timed out:could be due to invalid address
报错:Connection <em>timed</em> <em>out</em>:could be due to invalid addressrn配置:tomcat5、informixrn现象:登录时IE一直在转,就是登陆不进去rn发生原因不详,但的确是在程序正常运行一天之后发生的,数据库连接配置一直都没有改rn然后再无其他的报错信息 在log日志就看到这么多rnrn请教各位高手谁能解开本人的困惑,感激不尽。rn
关于HttpURLConnection :Connection timed out: connect 问题~!!!
[code=Java]private String getWebData(String strurl) rn try rn URL url = new URL(strurl);rn // 打开连接,此处只是创建一个实例,并没有真正的连接rn HttpURLConnection httpCon = (HttpURLConnection) url.openConnection();rn httpCon.setConnectTime<em>out</em>(30000);rn httpCon.setReadTime<em>out</em>(30000);rn httpCon.setDoOutput(true);//打开写入属性rn httpCon.setRequestMethod("POST");//设置<em>提交</em>方法 rn rn httpCon.connect();//建立连接rn InputStream inputStream = httpCon.getInputStream();rn InputStreamReader inputReader = new InputStreamReader(inputStream,"utf-8");rn BufferedReader bufferReader = new BufferedReader(inputReader);rn StringBuffer sb = new StringBuffer();rn String inputLine = null; rn while ((inputLine = bufferReader.readLine()) != null) rn sb.append(inputLine+"\n");rn rn bufferReader.close(); rn inputReader.close();rn inputStream.close();rn httpCon.disconnect();rn System.<em>out</em>.println(sb.toString().trim());rn return sb.toString();rn catch (Exception e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn System.<em>out</em>.println("=======================================================");rn return null;rn [/code]rnrnrn以上是源代码,异常信息如下:rn[color=#FF0000]java.net.ConnectException: Connection <em>timed</em> <em>out</em>: connect[/color]rnat java.net.PlainSocketImpl.socketConnect(Native Method)rnat java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)rnat java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)rnat java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)rnat java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)rnat java.net.Socket.connect(Socket.java:519)rnat sun.net.NetworkClient.doConnect(NetworkClient.java:158)rnat sun.net.www.http.HttpClient.openServer(HttpClient.java:394)rnat sun.net.www.http.HttpClient.openServer(HttpClient.java:529)rnat sun.net.www.http.HttpClient.(HttpClient.java:233)rnat sun.net.www.http.HttpClient.New(HttpClient.java:306)rnat sun.net.www.http.HttpClient.New(HttpClient.java:323)rnat sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:837)rnat sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:778)rnat sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:703)rnat com.joye.util.UpdateAppData.getWebData(UpdateAppData.java:174)rnat com.joye.util.UpdateAppData.getAppDetails(UpdateAppData.java:137)rnat com.joye.util.TimerGetData.run(TimerGetData.java:11)rnat java.util.TimerThread.mainLoop(Timer.java:512)rnat java.util.TimerThread.run(Timer.java:462)rnrn求救:这个连接超时的异常,该如何解决呢?rn[color=#0000FF]httpCon.setConnectTime<em>out</em>(30000);[/color]rn我已经设置了超时重连的时间啊!
提交超时问题
当题目中没有明确给出让读到文件结束,就不要用while(~scanf()),否则会<em>造成</em>超时问题
连接oracle数据库超时
各位好: 我的系统搭建在linux操作系统上,web容器为tomcat,数据库为oracle,tomcat启动一个多小时后就会出现: java.sql.SQLException: Closed Con
mysql事务用begin……commit好还是用set autocommit……commit
-
数据库偶然出现死锁(等待锁超时)的情况处理:
前言:朋友咨询我说执行简单的<em>update</em>语句失效,症状如下: mysql&amp;gt; <em>update</em> order_info  set province_id=15  ,city_id= 1667  where order_from=10 and order_<em>out</em>_sn='1407261241xxxx'; ERROR 1205 (HY000): Lock wait time<em>out</em> exceeded; t...
【数据库】使用Collection.setAutoCommit(false)的注意事项
setAutoCommit总的来说就是保持数据的完整性,一个系统的更新操作可能要涉及多张表,需多个SQL语句进行操作    循环里连续的进行插入操作,如果你在开始时设置了:conn.setAutoCommit(false);  最后才进行conn.<em>commit</em>(),这样你即使插入的时候报错,修改的内容也不会<em>提交</em>到数据库,  而如果你没有手动的进行setAutoCommit(false);  出错时
httpclient.executeMethod(GetMethod)时报Connection timed out的错误?
[code=java]rnHttpClient client = new HttpClient();rnString url="http://243.342.45.16/Login.aspx?user=zhangsan&pwd=888";rnGetMethod oGet = new GetMethod(url); rnhttpclient.executeMethod(oGet) //执行到这报下面说的错rn[/code]rnrn上面这段代码是用HttpClient这个包实现登陆网站,然后搜索网页里的内容的功能。之前用没问题,现在报java.net.SocketException: Connection <em>timed</em> <em>out</em>:could be due to invalid address的错误。是不是那边的登陆网页改登陆方式了?需要怎么修改才能登陆上去呢?
Connection not available, Timed out waiting for 180000
[size=11px][b]亲们,我想请问这类问题是不是属于连接池设置有问题的?rn我的用户量有3000-4000,平均每天有2000-3000人同时在线,rn我的WEBSPHER的连接池设置的是rn连接超时:1800秒 rn最大连接数:180 rn最小连接数:80 rnWebContainer :最大是100,最小30。rn由于我对连接池设置数一直不清晰,所以请求亲们给矛帮助或者思路,让我知道是连接池上的问题还是需要从别的方向来解决 [/b][/size]
linux nfs mount:mount.nfs: Connection timed out
昨天说是要要调整IP,然后换了IP之后出现问题,再调为之前的IP之后重启服务器,就再也没法挂载成功了。。一直提示mount.nfs: Connection <em>timed</em> <em>out</em>,showmount能够看到对应服务器的共享文件。。求大神解救啊![图片说明](https://img-ask.csdn.net/upload/201612/15/1481780922_761981.jpg)
Connection timed out 问题 高分求助
我的系统是在redhat9 机器上运行的 rn系统结构是 apache2+jk+tomcat5.5 rn程序架构是 struts+spring+hibernaternrn今天系统突然报了N多 java.net.ConnectException: Connection <em>timed</em> <em>out</em> 错误,其中一个错误信息如下,请问是什么原因:rnjava.net.ConnectException: Connection <em>timed</em> <em>out</em>rn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)rn at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)rn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)rn at java.net.Socket.connect(Socket.java:519)rn at java.net.Socket.connect(Socket.java:469)rn at sun.net.NetworkClient.doConnect(NetworkClient.java:157)rn at sun.net.www.http.HttpClient.openServer(HttpClient.java:382)rn at sun.net.www.http.HttpClient.openServer(HttpClient.java:509)rn at sun.net.www.http.HttpClient.(HttpClient.java:231)rn at sun.net.www.http.HttpClient.New(HttpClient.java:304)rn at sun.net.www.http.HttpClient.New(HttpClient.java:316)rn at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:817)rn at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:769)rn at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:694)rn at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938)rn at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireReader(ImportSupport.java:331)rn at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:241)rn at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:158)rn at org.apache.jsp.WEB_002dINF.pages.p.advertPrev_jsp._jspx_meth_c_005fimport_005f0(advertPrev_jsp.java:156)rn at org.apache.jsp.WEB_002dINF.pages.p.advertPrev_jsp._jspx_meth_c_005fif_005f0(advertPrev_jsp.java:104)rn at org.apache.jsp.WEB_002dINF.pages.p.advertPrev_jsp._jspService(advertPrev_jsp.java:73)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)rn at org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:99)rn at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:82)rn at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:51)rn at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)rn at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)rn at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)rn at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)rn at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)rn at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)rn at com.mas.moobol.base.web.servlet.BaseActionServlet.doGet(BaseActionServlet.java:26)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn
数据库操作commit失败后,需要再rollback吗?
问题如题 我先查了一下<em>提交</em>和回滚的原理,都是要建立空间存放新数据、编写logo日志、记录操作内容、获取锁,<em>提交</em>时则更新日志,完成剩下的工作和释放锁,回滚则读取操作内容并进行大量io,最后也释放锁 那么
关于数据库commit失败后rollback的问题?
若数据库操作<em>commit</em>发生异常,没有执行回滚,这时数据会存入数据库吗?如果不会存入数据库,为什么还要在程序里写rollback?
connection.commit 方法执行成功,但数据库中事务提交
最近一段程序,程序中有一个<em>事务</em>中执行了一些插入和更新操作。但是偶尔会出现,程序执行了<em>提交</em>语句(“售票成功”已经打印出来了),执行完后发现<em>事务</em>并没有<em>提交</em>,但是也没有报错。大家帮帮忙看下,好急的。数据库连
OTL之oralce开发总结
关于OTL,网上介绍的也不少,但看来看去也只是官方的那些文档。OTL很好用,结合官方提供的一些例子,多多尝试才能领悟。经过一个月左右的项目开发,对OTL也有些了解,在这里总结一下,希望对刚接触OTL的新手有所帮助。其中有些地方,比如对网络异常的处理,可是费了我两天的时间才解决的,
深入理解JDBC的超时设置
  深入理解JDBC的超时设置    恰当的JDBC超时设置能够有效地减少服务失效的时间。本文将对数据库的各种超时设置及其设置方法做介绍。  真实案例:应用服务器在遭到DDos攻击后无法响应  在遭到DDos攻击后,整个服务都垮掉了。由于第四层交换机不堪重负,网络变得无法连接,从而导致业务系统也无法正常运转。安全组很快屏蔽了所有的DDos攻击,并恢复了网络,但业务系统却还是无法...
求助!java.net.ConnectException: Connection timed out: connect
最近在做性能测试,我想每隔100ms发送一个数据给服务器上的系统(web服务器是tomcat),共10000次。这样写可以吗?rn[code=java]//发送10000次告警至A系统rn public static void main(String[] args) rn for(int i = 1; i +i);rn at.start();rn try rn Thread.sleep(100);rn catch (InterruptedException e) rn e.printStackTrace();rn rn rn [/code]rn问题来了,我一开始没有设i=10000,i=200都还可以,但是往上改成300,500就出现了以下的问题。rn[code=java]java.net.ConnectException: Connection refused: connectrn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(Unknown Source)rn at java.net.PlainSocketImpl.connectToAddress(Unknown Source)rn at java.net.PlainSocketImpl.connect(Unknown Source)rn at java.net.SocksSocketImpl.connect(Unknown Source)rn at java.net.Socket.connect(Unknown Source)rn at java.net.Socket.connect(Unknown Source)rn at sun.net.NetworkClient.doConnect(Unknown Source)rn at sun.net.www.http.HttpClient.openServer(Unknown Source)rn at sun.net.www.http.HttpClient.openServer(Unknown Source)rn at sun.net.www.http.HttpClient.(Unknown Source)rn at sun.net.www.http.HttpClient.New(Unknown Source)rn at sun.net.www.http.HttpClient.New(Unknown Source)rn at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)rn at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)rn at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)rn at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)rn at com.SendModule.doSend(SendModule.java:28)rn at com.LockAlarm.doSend(LockAlarm.java:58)rn at com.AlarmThread.run(AlarmThread.java:21)[/code]rn是由于tomcat设置的最大线程为150吗,所以Connection refused?那我把最大线程数改成10000可以吗?如果不行,那我要发10000个,一次只能发200个,岂不是要发50次?还是要换tomcat,用别的服务器rn
Mysql 锁表 for update (引擎/事务
http://www.cnblogs.com/bigfish--/archive/2012/02/18/2356886.html   Mysql <em>锁表</em> for <em>update</em> (引擎/<em>事务</em>) 因为之前用过oracle,知道利用select * for <em>update</em> 可以<em>锁表</em>。所以很自然就想到在mysql中能不能适应for <em>update</em> 来<em>锁表</em>呢。 学习参考如下 由于InnoDB预设是Ro...
多用户事务提交锁表问题?
本人正在做一个系统,是一个多用户系统,很多用户会同时操作一张表,也许会有多用户访问同一条记录。多用户同时更新。DELPHI会怎么样处理呢。DELPHI会如何控制多用同时更新。是不是会不会有<em>锁表</em>,锁记录。如何去实现。rnDELPHI是如何设计多用户系统的呢.
axis2 客户端访问报Read timed out
通过services.xml 的方式暴露的webservice 服务端方法, 并模拟一个客户端代码的方式访问该方法(通过org.apache.axis2.rpc.client.RPCServiceClient 和 org.apache.axis2.addressing.EndpointReference),但是在服务端方法处理时间超过30s,客户端就会报:rnjava.net.SocketTime<em>out</em>Exception: Read <em>timed</em> <em>out</em>rn at java.net.SocketInputStream.socketRead0(Native Method)rn at java.net.SocketInputStream.read(Unknown Source)rn at java.io.BufferedInputStream.fill(Unknown Source)rn at java.io.BufferedInputStream.read(Unknown Source)rn at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)rn at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)rn at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)rn at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)rn at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)rn at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)rn at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)rn at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)rn at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)rn at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)rn at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:621)rn at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)rn at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)rn at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)rn at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)rn at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)rn at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)rn at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)rn at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)rn at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)rn at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531)rn at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:102)rn at test.cq.hmq.ws.WebService.main(WebService.java:34)rnException in thread "main" org.apache.axis2.AxisFault: Read <em>timed</em> <em>out</em>rnrn若在客户端加上 options.setTimeOutInMilliSeconds()方法控制超时是有一定效果, 但毕竟目的是为了写服务端,<em>是否</em>有其它好的方法??rnrn
weblogic数据源管理事务 Transaction timed out
查询的这个脚本执行不到0.01秒,为什么报这错呢,今天生产连续报了两次,到后面连登录系统都成问题啦,好奇怪rnrnselect distinct n.unitcode,n.unitname from mm_bizprivilege_cover_td b,mm_unitmapping_tc u,mm_unit_tc n where u.departmentcode=b.departmentcode and u.unitcode=n.unitcode and b.opcode=? order by unitnamernHibernate: select payablemon0_.payableno as payableno11_, payablemon0_.agentcode as agentcode11_, payablemon0_.amount as amount11_, payablemon0_.bankname as bankname11_, payablemon0_.baseamount as baseamount11_, payablemon0_.basecurrencycode as basecurr6_11_, payablemon0_.baseusedamount as baseused7_11_, payablemon0_.businessattr as business8_11_, payablemon0_.businesschannel as business9_11_, payablemon0_.canceldate as canceldate11_, payablemon0_.cancelflag as cancelflag11_, payablemon0_.claimno as claimno11_, payablemon0_.classescode as classes13_11_, payablemon0_.clientname as clientname11_, payablemon0_.confirmsequenceno as confirm15_11_, payablemon0_.currencycode as currenc16_11_, payablemon0_.custaccountno as custacc17_11_, payablemon0_.custbankno as custbankno11_, payablemon0_.customercode as custome19_11_, payablemon0_.customername as custome20_11_, payablemon0_.custseq as custseq11_, payablemon0_.datasource as datasource11_, payablemon0_.datatype as datatype11_, payablemon0_.departmentcode as departm24_11_, payablemon0_.description as descrip25_11_, payablemon0_.endorseno as endorseno11_, payablemon0_.fatherno as fatherno11_, payablemon0_.hibernateversion as hiberna28_11_, payablemon0_.ifeffect as ifeffect11_, payablemon0_.ifupload as ifupload11_, payablemon0_.inpaymentbatchno as inpayme31_11_, payablemon0_.insuredcode as insured32_11_, payablemon0_.insuredname as insured33_11_, payablemon0_.isException as isExcep34_11_, payablemon0_.lastopdate as lastopdate11_, payablemon0_.opcode as opcode11_, payablemon0_.opdate as opdate11_, payablemon0_.opstatus as opstatus11_, payablemon0_.payableseq as payableseq11_, payablemon0_.paytype as paytype11_, payablemon0_.policyno as policyno11_, payablemon0_.returnno as returnno11_, payablemon0_.risktype as risktype11_, payablemon0_.segment7 as segment44_11_, payablemon0_.segment8 as segment45_11_, payablemon0_.subcompany as subcompany11_, payablemon0_.summaryno as summaryno11_, payablemon0_.timestamp as timestamp11_, payablemon0_.transactorcode as transac49_11_, payablemon0_.unitbankno as unitbankno11_, payablemon0_.unitcode as unitcode11_, payablemon0_.usedamount as usedamount11_ from MM_PAYABLEMONEY_TD payablemon0_ where (payablemon0_.datatype in ('502' , '516' , '536' , '538')) and ifcard='0' and (payablemon0_.opstatus in ('0' , '1')) and payablemon0_.subcompany=? and payablemon0_.policyno=? and payablemon0_.endorseno=? and payablemon0_.custseq=? and payablemon0_.customercode=? and payablemon0_.currencycode=? and payablemon0_.classescode=?rn09:46:46,349 WARN AbstractBatcher[closeQueryStatement]:280 - exception clearing maxRows/queryTime<em>out</em>rnjava.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction <em>timed</em> <em>out</em> after 599 seconds rnBEA1-3D45953A058A51C38C01rn at weblogic.<em>jdbc</em>.jta.DataSource.enlist(DataSource.java:1419)rn at weblogic.<em>jdbc</em>.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1331)rn at weblogic.<em>jdbc</em>.wrapper.JTAConnection.getXAConn(JTAConnection.java:189)rn at weblogic.<em>jdbc</em>.wrapper.JTAConnection.checkConnection(JTAConnection.java:64)rn at weblogic.<em>jdbc</em>.wrapper.Statement.checkStatement(Statement.java:256)rn at weblogic.<em>jdbc</em>.wrapper.Statement.preInvocationHandler(Statement.java:104)rn at weblogic.<em>jdbc</em>.wrapper.PreparedStatement_oracle_<em>jdbc</em>_driver_T4CPreparedStatement.getMaxRows(Unknown Source)rn at org.hibernate.<em>jdbc</em>.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:276)rn at org.hibernate.<em>jdbc</em>.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:212)rn at org.hibernate.loader.Loader.doQuery(Loader.java:726)rn at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)rn at org.hibernate.loader.Loader.doList(Loader.java:2220)rn at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)rn at org.hibernate.loader.Loader.list(Loader.java:2099)rn at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)rn at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)rn at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)rn at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)rn at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)rn at org.springframework.orm.hibernate3.HibernateTemplate$29.doInHibernate(HibernateTemplate.java:849)rn at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)rn at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:840)rn at com.fenet.insurance.core.dao.HibernateGenericDao.find(Unknown Source)rn at com.fenet.insurance.mm.inpayment.dao.hibernate.PayableMoneyDaoHibernate.queryPayable(Unknown Source)rn at com.fenet.insurance.mm.payment.service.impl.PaymentServiceImpl.savePayAfterComputeBaseamount(Unknown Source)rn at com.fenet.insurance.mm.payment.service.impl.PaymentServiceImpl.savePay(Unknown Source)rn at com.fenet.insurance.mm.payment.service.impl.PaymentServiceImpl$$FastClassByCGLIB$$e05b9c5f.invoke()rn at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)rn at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:695)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)rn at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:76)rn at com.fenet.insurance.mm.aop.BusinessExceptionAspect.afterThrowing(Unknown Source)rn at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:618)rn
深入理解JDBC的timeout
转载自:http://blog.csdn.net/kobejayandy/article/details/46916063 恰当的JDBC超时设置能够有效地减少服务失效的时间。本文将对数据库的各种超时设置及其设置方法做介绍。 真实案例:        在遭到DDos攻击后,整个服务都垮掉了,当屏蔽了所有的DDos攻击,并恢复了网络后,业务系统却还是无法工作。通过分析系统的th
深入理解JDBC的超时(timeout)设置
真实案例:应用服务器在遭到DDos攻击后无法响应  在遭到DDos攻击后,整个服务都垮掉了。由于第四层交换机不堪重负,网络变得无法连接,从而导致业务系统也无法正常运转。安全组很快屏蔽了所有的DDos攻击,并恢复了网络,但业务系统却还是无法工作。 通过分析系统的thread dump发现,业务系统停在了JDBC API的调用上。20分钟后,系统仍处于WAITING状态,无法响应。30分钟后,系统...
jdbc 如何设定 connection timeout?
DriverManager.setLoginTime<em>out</em>(1); con = DriverManager.getConnection(url, prop); 试了这个也没有效果…还是等很长时间才显示
JDBC超时设置
恰当的JDBC超时设置能够有效地减少服务失效的时间。本文将对数据库的各种超时设置及其设置方法做介绍。   真实案例:应用服务器在遭到DDos攻击后无法响应   在遭到DDos攻击后,整个服务都垮掉了。由于第四层交换机不堪重负,网络变得无法连接,从而导致业务系统也无法正常运转。安全组很快屏蔽了所有的DDos攻击,并恢复了网络,但业务系统却还是无法工作。 通过分析系统的thread dum
Spring事务超时时间可能存在的错误认识
1、先看代码 1.1、spring-config.xml Java代码   "dataSource" class="org.springframework.<em>jdbc</em>.datasource.DriverManagerDataSource">      "driverClassName" value="com.mysql.<em>jdbc</em>.Driver"/>      "url" val
调用webservicce 报operation timed out 异常
请问这个异常应该怎么处理呢
java项目运行报Read timed out错误
如果使用Socket通信,但是运行后报了个Read <em>timed</em> <em>out</em>,但是数据缺返回了,这样会影响数据的返回结果吗?
在JSP中调用Webservice 报Read timed out
。。。。。。。。。。。。。。。 rnjava.lang.Object _resp=null; rn tryrnrn _resp = call.invoke(new java.lang.Object[] MessageHead, SendObject, new java.lang.Integer(dataItemCount), DataItemList.value);rn catch (java.lang.Exception _exception) <em>out</em>.println("无法连接Web services服务!"+_exception); return;rn。。。。。。。。。。。。。。。。rnrn由于调用需要1分到2分时间会有返回,所以有时会报错误:rn无法连接Web services服务!java.io.InterruptedIOException: Read <em>timed</em> <em>out</em> rnrn请各位大侠帮忙!!rn
jdbc connection自动提交的问题
当创建表或视图的时候,<em>jdbc</em>里的<em>connection</em>的autoCommit()即使是false的话,是不是也会把<em>事务</em>里的数据<em>提交</em>???
Java.net.SocketTimeoutException: connect timed out
在用NUTCH抓取网页时出现了这种问题,rn请大家救救我~~rn谢谢...rn错误提示如下: 070517 140633 fetch of http://www.21cn.com/ failed with: java.lang.Exception: java.net.SocketTime<em>out</em>Exception: connect <em>timed</em> <em>out</em>
IBM FileNet 讲义 CE API 系列之 Folders.ppt下载
IBM FileNet 讲义 CE API 系列之 Folders.ppt 相关下载链接:[url=//download.csdn.net/download/lihuaijun/2086783?utm_source=bbsseo]//download.csdn.net/download/lihuaijun/2086783?utm_source=bbsseo[/url]
电脑游戏抓屏保存图片下载
用于在游戏中截取漂亮的图片保存。是压缩文件要解压,解压后直接使用! 相关下载链接:[url=//download.csdn.net/download/dll_epdc/3037274?utm_source=bbsseo]//download.csdn.net/download/dll_epdc/3037274?utm_source=bbsseo[/url]
在线图书借阅管理系统下载
在线图书借阅管理系统,方便查询。分为客户端和后台。用ORCALE数据库 相关下载链接:[url=//download.csdn.net/download/machao5021/4366196?utm_source=bbsseo]//download.csdn.net/download/machao5021/4366196?utm_source=bbsseo[/url]
我们是很有底线的