java jdbc查询卡住 在for循环到某一个的时候卡住了 5C

do {
YstAgentInfoPojo pojo = new YstAgentInfoPojo();
pojo.setAgtMerId(rsAll.getString(1));
pojo.setAgtName(rsAll.getString(2));
pojos.add(pojo);

                } while (rsAll.next());

                //关闭查询代理商连接,重新获得连接
                closeConn(conn, psAll, rsAll);
                //重新获得连接
                conn = YstManagerConnFactory.getConn();
                for (YstAgentInfoPojo agent : pojos) {
                    logger.info("----->代理商查询月报表start" + agent.getAgtMerId());
                    pstmtProfit = conn.prepareStatement(Configure
                            .getProperty("agent.profit.withdraw.month.sql1"));
                    pstmtProfit.setString(1, agent.getAgtMerId());
                    pstmtProfit.setString(2, agent.getAgtMerId());
                    pstmtProfit.setString(3, acdt.substring(0,6));
                    rsProfit = pstmtProfit.executeQuery();
                    logger.info("----->代理商查询月报表end");
                    while (rsProfit.next()) {
                        logger.info("---------->insert month report start:" + agent.getAgtMerId() + " ," + rsProfit.getString(1));
                        SpringContext.getBean(IYstManagerAgentProfitDao.class).saveAgentMonthProfit(agent.getAgtMerId(), agent.getAgtName(), rsProfit.getString(1),
                                rsProfit.getString(2), rsProfit.getString(3),rsProfit.getString(4),String.valueOf(rsProfit.getDouble(5)),
                                String.valueOf(rsProfit.getDouble(6)), String.valueOf(rsProfit.getDouble(7)), "0");
                        logger.info("---------->insert month report end:" + agent.getAgtMerId() + "," + rsProfit.getString(1));
                    }
                    logger.info("代理商月提现分润(不包含下级)遍历:" + agent.getAgtMerId());
                    closeConn(null, pstmtProfit, rsProfit);
                    logger.info("代理商月提现分润(不包含下级)遍历关闭陈述:" + agent.getAgtMerId());

                }
qq_16127313
爱码少年 代码好好封装吧。过程式思维编程写法不可取
12 个月之前 回复

9个回答

数据库得连接bu'yao放在循环里。

这段代码有数据库表查询 和 表插入或者更新 。数据库表跟新的时候表会处于加锁状态,此处代码是循环跟新或者插入一张表。有可能会导致并发更新。
表在未完成上一次更新操作的时候继续更新表。会因锁引发线程阻塞。导致循环阻塞。

感觉一楼说的对,你这个数据库的最大连接数是多少,能经得起你这样不断获取连接

改用把查询出来的数据先放到集合里,查询结束后,再开启一个连接进行更新操作

只需获取一次Connection 使用这个链接对象即可,做CRUD操作,操作结束后关闭该链接。

 Connection conn  =getConnection();//获取连接对象

 try{
 ...
 你的增删改查操作
 ...
 }finally{
 conn.close();
 }

  1. 检查循环逻辑,自己控制连接其实是很有难度的事情
  2. 试一试jdk1.7以后新增的资源异常管理语法try-with-resource来做自动关闭,题目代码里那样自己写一个close的手工调用十分不可靠

closeConn(null, pstmtProfit, rsProfit);这个关闭链接放在for循环中,运行第二遍时 链接已经关闭了。这个关闭放到finally比较好

其实可以参考线现在的数据库连接工具,例如德鲁伊等等.我们在连接数据库的时候,是有默认的或定义好的连接数.编不下去了.楼上说的都对

开发爽,运维死
这种模式很难调试,楼上说的好,做封装吧!

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
System.Net.Mail ,发送邮件的时候,卡住了
SmtpClient smtp = new SmtpClient(); //实例化一个SmtpClientrn MailMessage mm = new MailMessage();rn //邮件发送rnrn //其他设置省略rn smtp.Timeout = 60*1000;//超时rn smtp.Send(mm); rnrn mm.Dispose();rn smtp.Dispose();rn rn 邮件我能收到,而且邮件的内容都正确,但是程序卡住了,不继续运行了。这个问题不是每次都出现,程序运行几天后,会出现。有大虾遇到过这样的问题吗?rnrn
Android-x86 4.0下载时候卡住了?
在VirtualBox里,安装了android-x86 4.0 RC2 eeep版本,可以联网,但是下载的时候就卡住不动了,换了其它版本的Android-X86 4.0问题依旧rn
oracle 安装卡住了,两次都在在83%处卡住
[code=sql][/code]启动 'Oracle Net Configuration Assistant'rn正在对命令行参数进行语法分析:rn 参数"orahome" = F:\Oracle\user\product\12.2.0\dbhome_1rn 参数"instype" = typicalrn 参数"inscomp" = client,oraclenet,javavm,server,anorn 参数"insprtcl" = tcprn 参数"cfg" = localrn 参数"authadp" = NO_VALUErn 参数"responsefile" = F:\Oracle\user\product\12.2.0\dbhome_1\network\install\netca_typ.rsprn 参数"silent" = truern 参数"orahnam" = OraDB12Home1rn 参数"ouiinternal" = truern 参数"maskpasswords" = falsern完成对命令行参数进行语法分析。rnOracle Net Services 配置:rnWindowsServiceUserPasswordPromptrn完成概要文件配置。
oracle客户端安装的时候,到create inventory的时候卡住了。
Oracle客户端安装的时候,到create inventory的时候卡住了,不能点击下一步。rn![图片说明](https://img-ask.csdn.net/upload/201908/08/1565252146_224770.png)rn目录绝对是有权限建立,我在已经看到了在/home/oracle下面建立了目录,但是就是一直卡在这里。
帮帮忙,卡住了。
.banner1 background-image:url(images/soushu.JPG);background-repeat: no-repeat; width:66px; height:22px rnrnrnrn rnrn不运行在vs里面图片已经在button上面了。不知道运行的时候 图片就不见了,请高手帮忙给咱出个点子吧 ,rnrn谢谢啦 rn
Shellocode入门卡住了
rn[code=Assembly]rn#includernvoid main()rnrn _asmrn rn push ebprn mov ebp,esprn xor edi,edirn push edirn sub esp,04hrn mov [ebp-08h],63hrn mov [ebp-07h],6Dhrn mov [ebp-06h],64hrn mov [ebp-05h],2Ehrn mov [ebp-04h],65hrn mov [ebp-03h],78hrn mov [ebp-02h],65hrn push 1 //压入第一个参数rn lea eax,[ebp-08h] rn push eax //压入第二个参数rn mov edx,0x7C86250D //WinExec地址通过Depends获取rn call edx //调用WinExecrn leavern ;rnrnrn[/code]rnrn以上代码作用是获取WinExec的Shellcode,但是运行报错rnPS:我是拜读了下面这篇文章,自己实现,遇到了点问题,请大侠指教,谢谢![url=http://blog.csdn.net/yiyefangzhou24/article/details/6440239][/url]rn
卡住了 求助
只是想写一个存储过程来实现这样一句SQL查询:rnselect * from user_tt where t_age>35;rnrn看我写的(别笑我哈,刚接触ORACLE)rncreate or replace procedure test_pro rnisrnbeginrn select * from user_tt where t_age>35;rnend;rnrn通不过,不知错在哪里。。。帮帮忙吧~~~~
在recvfrom卡住了.
我写了一个DNS服务器.现在是能正常DNS解析几十秒,然后就在主线程的215行 recvfrom卡住了,收不到新请求.弄了半天也不知道为什么.rn代码有点长,讲究着看吧.多谢了!rn[code=c]rnrn#includern#includern#includern#includern#includern#includern#includern#includern#includern#pragma comment(lib, "wsock32.lib")rnrntypedef struct _dns_struct rn unsigned short id;//ID:长度为16位,是一个用户发送查询的时候定义的随机数rn unsigned short flag; //标志: QR(1),Opcode(4),AA(1),TC(1),RD(1),RA(1),Z(3),RCode(4)rn unsigned short ques; //QDCount:长度16位,报文请求段中的问题记录数。rn unsigned short answ; //ANCount:长度16位,报文回答段中的回答记录数。rn unsigned short auth; //NSCOUNT :长度16位,报文授权段中的授权记录数。rn unsigned short addrrs; //ARCOUNT :长度16位,报文附加段中的附加记录数。rn dns_struct;rnrntypedef struct _dns_query_type rn unsigned short type;rn unsigned short classtype;rn dns_query_type;rnrntypedef struct _dns_response_type rn unsigned short name;//C0 0C 域名指针rn unsigned short type;//查询类型rn unsigned short classtype;//分类rn dns_response_type;rnrntypedef struct DNSSERVERSTRUCTrn int cType; //连接类型. 0 UDP; 1 TCP; 2 socks4; 3 4socks5rn //SOCKET socket;rn SOCKADDR_IN addr;rn //rude::Socket *rudesocket;rn DNSSERVER;rnrntypedef struct InfoUDPStructrnrn SOCKET clientSocket; //客户的socketrn SOCKADDR_IN clientSockAddr; //客户地址信息rn char buff[1000]; //接收到的第一条消息rn int dataLength;rn PACKAGEINFO;rnrnstruct TRANSPACKAGE rn DNSSERVER *DNSServer;rn unsigned short ID;rn;rnrnstruct SavedDNS rn unsigned TTL; //过期时间rn IN_ADDR IP;rn;rnrnstruct IDRECORD rn int count;rn PACKAGEINFO *info;rn;rnrnstruct PRIORITYQUENODE rn std::string domain;rn SavedDNS *savedDNS;rn friend bool operator<(PRIORITYQUENODE &t1, PRIORITYQUENODE &t2) rn return t1.savedDNS->TTL < t2.savedDNS->TTL;rn rn;rnrnclass DNS rnpublic:rn int startListen();rn int listenPort = 53;rn char listenIP[20] = "";rn int maxRecvThread = 1;rn int maxTransThread = 1;rnprivate:rn void getDomainName(char *, std::string &);rn int parse_dns_response_packet(char *buff, int length, char *dstbuff, unsigned int&);rn void recvProcess();rn void transProcess();rn void listenUDP();rn void listenTCP();rn void addForbiddenIP(std::string);rn void addServer(std::string);rn void answerQuery(PACKAGEINFO*, std::string&, SavedDNS&);rn std::queue recvQueue;rn std::queue transQueue;rn std::vector threadVector;rn SOCKET listenSocketUDP,listenSocketTCP;rn std::vector DNSServer;rn std::vector forbiddenIP;rn sockaddr_in listenAddr;rn int sizeofAddr = sizeof(listenAddr);rn std::mutex recvLock;rn std::mutex transLock;rn std::mutex recvEmptyMutex;rn std::mutex transEmptyMutex;rn std::condition_variable recvEmpty;rn std::condition_variable transEmpty;rn std::map DNSCache;rn std::map IDRecord; //记录请求的信息rn std::priority_queue> TTLQueue;rn;rnrnint DNS::startListen() rn if (WSAStartup(MAKEWORD(2, 0), new WSADATA) != 0) rn return 0;rn rn //addServer("udp 127.0.0.1:54");rn //addServer("tcp 202.120.224.6");rn //addServer("tcp 114.114.114.114");rn //addServer("udp 114.114.115.115");rn addServer("udp 223.5.5.5");rn //addServer("udp 223.6.6.6");rn //addServer("tcp 8.8.8.8:53");rn //addServer("tcp 8.8.4.4:53");rn //addServer("SOCKS5 127.0.0.1:1080 8.8.8.8:53");rn addForbiddenIP("243.185.187.39");rn addForbiddenIP("46.82.174.68");rn addForbiddenIP("37.61.54.158");rn addForbiddenIP("93.46.8.89");rn addForbiddenIP("59.24.3.173");rn addForbiddenIP("203.98.7.65");rn addForbiddenIP("8.7.198.45");rn addForbiddenIP("78.16.49.15");rn addForbiddenIP("159.106.121.75");rn addForbiddenIP("10.6.0.126");rn addForbiddenIP("10.6.0.127");rn listenSocketUDP = socket(AF_INET, SOCK_DGRAM, 0);rn listenSocketTCP = socket(AF_INET, SOCK_STREAM, 0);rn listenAddr.sin_family = AF_INET;rn listenAddr.sin_port = htons(listenPort);rn if (strcmp(listenIP, "") == 0 || strcmp(listenIP, "0.0.0.0") == 0) rn listenAddr.sin_addr.S_un.S_addr = INADDR_ANY;rn rn else rn //InetPtonA(AF_INET, listenIP, &listenAddr);rn listenAddr.sin_addr.S_un.S_addr = inet_addr(listenIP);rn rn threadVector.reserve(200);rn //threadVector.push_back(std::thread(std::bind(&DNS::listenTCP, this)));rn for (int i = 0; i < maxRecvThread; i++) rn threadVector.push_back(std::thread(std::bind(&DNS::recvProcess, this)));rn rn for (int i = 0; i < maxTransThread; i++) rn threadVector.push_back(std::thread(std::bind(&DNS::transProcess, this)));rn rn listenUDP();rn return 1;rnrnrnvoid DNS::addForbiddenIP(std::string IP) rn IN_ADDR tmpaddr;rn //InetPtonA(AF_INET, IP.c_str(), &tmpaddr);rn tmpaddr.S_un.S_addr = inet_addr(listenIP);rn forbiddenIP.push_back(tmpaddr);rnrnrnvoid DNS::addServer(std::string server) rn DNSSERVER tmpserver;rn unsigned short port1=1080, port2 = 53;rn int m1, m2;rn tmpserver.addr.sin_family = AF_INET;rn for (auto &i : server) i = toupper(i);rn m1 = server.find_first_of(' ');rn m2 = server.find_last_of(' ');rn std::string s1 = server.substr(m1 + 1, m2 - m1 - 1); //代理服务器rn std::string s2 = server.substr(m2 + 1); //DNS服务器rn if ((int)s1.find(":") > 0) rn port1 = atoi(s1.substr(s1.find(":") + 1).c_str());rn s1 = s1.substr(0, s1.find(":"));rn rn if ((int)s2.find(":") > 0) rn port2 = atoi(s2.substr(s2.find(":") + 1).c_str());rn s2 = s2.substr(0, s2.find(":"));rn rn tmpserver.addr.sin_port = htons(port2);rn //InetPtonA(AF_INET, s2.c_str(), &tmpserver.addr.sin_addr);rn tmpserver.addr.sin_addr.S_un.S_addr = inet_addr(s2.c_str());rn if ((int)server.find("UDP") >= 0) rn tmpserver.cType = 0;rn //connect(tmpserver.socket, (sockaddr*)&tmpserver.addr, sizeofAddr);rn rn else if ((int)server.find("TCP") >= 0) rn tmpserver.cType = 1;rn rn else if ((int)server.find("SOCKS4") >= 0) rn tmpserver.cType = 2;rn //tmpserver.rudesocket = new rude::Socket();rn //tmpserver.rudesocket->insertSocks4(s2.c_str(), port2, "");rn //tmpserver.rudesocket->connect(s1.c_str(), port1);rn rn else if ((int)server.find("SOCKS5") >= 0) rn tmpserver.cType = 3;rn //tmpserver.rudesocket = new rude::Socket();rn //tmpserver.rudesocket->insertSocks5(s2.c_str(), port2, "", "");rn //tmpserver.rudesocket->connect(s1.c_str(), port1);rn rn timeval tv_out = 0, 300 ;rn setsockopt(listenSocketUDP, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv_out, sizeof(timeval));rn DNSServer.push_back(tmpserver);rnrnrnvoid DNS::listenUDP() rn char buff[3000] = ;rn int recvLen = -1;rn SOCKADDR_IN clientAddr; //接入用户址地rn bind(listenSocketUDP, (sockaddr*)&listenAddr, sizeofAddr);rn timeval tv_out = 0, 300 ;rn setsockopt(listenSocketUDP, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv_out, sizeof(timeval));rn while (true)rn rn //当成功接到新来的用户时,发出处理请求rn recvLen = recvfrom(listenSocketUDP, buff, sizeof(buff), 0, (sockaddr*)&clientAddr, &sizeofAddr);rn if (recvLen != -1)rn rn //队列已满就等待rn PACKAGEINFO *info = new PACKAGEINFO;rn info->clientSocket = NULL;rn info->clientSockAddr = clientAddr;rn memcpy(info->buff, buff, recvLen);rn info->dataLength = recvLen;rn recvLock.lock();rn recvQueue.push(info);rn recvLock.unlock();rn recvEmpty.notify_one();rn rn rnrnrnvoid DNS::listenTCP() rn char buff[3000] = ;rn int recvLen = -1;rn SOCKADDR_IN clientAddr; //接入用户址地rn SOCKET clientSocket;rn bind(listenSocketTCP, (sockaddr*)&listenAddr, sizeofAddr);rn listen(listenSocketTCP, 5);rn timeval tv_out = 0, 300 ;rn setsockopt(listenSocketUDP, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv_out, sizeof(timeval));rn while (true)rn rn //当成功接到新来的用户时,发出处理请求rn clientSocket = accept(listenSocketTCP, (sockaddr*)&clientAddr, &sizeofAddr);rn recvLen = recv(clientSocket, buff, sizeof(buff), 0);rn if (recvLen != -1)rn rn PACKAGEINFO *info = new PACKAGEINFO;rn info->clientSocket = clientSocket;rn info->clientSockAddr = clientAddr;rn memcpy(info->buff, buff, recvLen);rn info->dataLength = recvLen;rn recvLock.lock();rn recvQueue.push(info);rn recvLock.unlock();rn recvEmpty.notify_one();rn rn rnrnrnrn[/code]
又卡住了
用Ole Db 查询数据库 m_pSet->Close();以后 改写了m_strFilter 使hr = CCommand >::Open(session, "SELECT * FROM WSYYUSER.RED_T"+m_strFilter, &propset);再m_pSet->Open(); 可是打不开了的说rn求解?哪里出了毛病?
做系统卡住了
小弟 在做一个asp.net 的在线拍卖的系统 ,做到竞价功能的时候卡住了... 不知道该怎么做 谁能给我说一下 基本的处理思想 ??
send 卡住了
只有97分了~~rnrn---------------------------------------------------------rnrn我用的Windows Socket 2rn在自己机器上没任何问题。rnrn到别人的机器上的时候,问题来了.....:send的时候会卡住,卡不要紧~~要紧的是,一卡他就卡很久很久~~rn每次我都等40+秒,都没反应~~rnrn测试环境都是在XP下,发包的大小是平均每次300K,1S一次,而且,[color=#FF0000]都是发给127.0.0.1[/color]rnrn怀疑过是发送缓冲(默认8K)的问题,不过不管设置成0,还是10M,都于事无补~~rnrn代码很简单,就是rn[code=C/C++]rnwhile(KeepDoing)rnrndoit()rnif(send(s, buff, buffsize, 0) <= 0)rnrndoexit(...);rnrnrn[/code]rnrn用的是阻塞的Socket,就是什么都没调过的Socket。rnrn是什么情况呢?哪位大侠帮帮忙~~
被一句话卡住了!
将CMineWnd类换成CMainFrame类,并把CMineApp的创建实例与新增的CMineWnd关联起来,让程序启动的时候以此窗口为主窗口予以显示,该怎么做啊?
wordcount卡住了怎么办?
数据量相当小啊rnrn[img=https://img-bbs.csdn.net/upload/201310/16/1381910388_786499.png][/img]
又被指针卡住了
程序如下:rn#include rnmain()rnrnchar a,*pa;rna=10;rnpa=&a;rn*pa=20;rnprintf( “%d”, a);rnrn这里先给比我更新的手一点小技巧:pa=&a读作:这是返回a变量的地址编号.而*pa读作:pa内容所指的地址的内容.这样有助于理解指针的含义。rn我的问题是:rn1.这道题目输出应该是20,但是先前定义的a=10又有什么用呢?rn2.a=10;对结果会有什么影响?rn3.如何才能使a=10对结果产生影响。
ext入门卡住了
[size=large]做一个小例子,我就是这里出现了问题,但是不知道怎么解决Ext.grid.Grid is not a constructorrn(?)()()14.html (行 39)rnDomHelper()()ext-all.js (行 7)rnapply()()ext-base.js (行 7)rn[Break on this error] ds: dsrn给我点建议道理怎么改[/size]rnrnrnrn rn 4.htmlrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn
OracleApater.Fill为什么卡住了?
是部署在windows2003IIS的一个服务,问题代码很简单。rnstring sql = "select * from aaa where 1=2";rnreturn OracleDALHelper.ExecuteDataset(CommandType.Text, sql).Tables[0];rnrnExecuteDataSet是网上找的OracleHelper,大致是下面的,应该没有问题。rnOracleCommand cmd = new OracleCommand();rnPrepareCommand(cmd, connection, (OracleTransaction)null, commandType, commandText, commandParameters);rnOracleDataAdapter da = new OracleDataAdapter(cmd);rnDataSet ds = new DataSet();rnda.Fill(ds);rnreturn ds;rnrn连接字符串,我用了最简单的模式"Data Source=aaa;user=aaa;password=aa"。rn不是经常卡,但有的是时候会卡住,不返回,也报错,一直停着,反正晚上卡住到早上还是卡的,只有手工把IIS重启才行。rn1、我怀疑是不是连接池的问题,网络不是太稳定,数据库时断时序。rn2、是不是windows2003的应用程序池的问题?我只有部署在服务器上的时候才出现,平时调试碰不上。rnrn高手们谁碰到过类似问题,郁闷死了。
Ubuntu 卡住了怎么办
由于这样那样的原因,Ubuntu 这个桌面总是面临着卡住的风险。为了有限应对它卡着不动,我做了一些防范工作。卡死如果你发现 Ubuntu 卡住了,一个通过Alt+Ctrl+F/d( /d 的取值为1到6)来切换到命令界面,输入自己的用户名而后输入密码,登录。 键入如下命令sudo kill -9 `ps -ef | grep tty7 | awk 'NR==1 {print $2}'`这样,你的
g++ 编译 卡住了
一直用着的g++ 2.95 编译出了问题 用-v 选项. 发现它到这里就不再往下跑了.rn我查看了/tmp文件夹,发现生成了一个空的随机文件. 比较奇怪...rnEnd of search list.rnThe following default directories have been omitted from the search path:rn /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/../../../../i386-slackware-linux/includernEnd of omitted list.rnrn请问大家这个问题怎么解决呢?
logcat -c卡住了
logcat -c &amp;amp;可以看到是哪个进程内核调用栈 cat /proc/&amp;lt;pid&amp;gt;/stack用户态调用栈 native debuggerd -b &amp;lt;pid&amp;gt;
tomcat启动时卡住了
事情是这样的,我为BeanNameUrlHandlerMapping编写了一个拦截器,并且在配置文件了进行了配置。但是我提交svn的时候,只提交了配置文件,没有提交这个拦截器类。结果别的同事更新了工程后,程序无法启动。tomcat控制台输出停在了: log4j:WARN No appenders could be found for logger (org.springframewo...
编程时卡住了
#include rnusing namespace std;rnvoid main ()rnvoid lix(int a[1000])rnrn int i,j,flag;rn flag=0;rn int t=0;rn for(i=2;i<=2000;i++)rn rn for(j=2;j<=i;j++)rn if(i%j==0)rn flag=1;break;rn if(flag=0)rn a[t++]=i;rn rnrnvoid main()rnrn int k=0;rn void lix (a[2000]);rn for(int i=0;i<1000;i++)rn rn if(a[i]>1989)rn rn for(int j=0;j
oracle安装91%卡住了
安装oracle时,出现了两个问题:1、执行先决条件检查 Path出错[code=text]INFO: ERROR: [Result.addErrorDescription:703] PRVF-3919 : 无法检索环境变量 "PATH" 的值rnINFO: ERROR: [Result.addErrorDescription:714] PRVF-3919 : 无法检索环境变量 "PATH" 的值rnINFO: INFO: [Task.perform:819] rnTaskCheckEnvVariable:环境变量: "PATH"[TASKCHECKENVVARIABLE]:TASK_SUMMARY:FAILED:CRITICAL:OPERATION_FAILED:Total time taken [2 Seconds 93 Milliseconds]rn ERRORMSG(desktop-k7dbsj3): PRVF-3919 : 无法检索环境变量 "PATH" 的值[/code]rn2、[code=text]信息: rnERROR: Cannot add user to application access ACL.rn帐户名与安全标识间无任何映射完成。rnrn(534)[/code]rn出现了这两个错误,导致oracle正在进行数据库创建卡住了,求帮忙!!!!!
wordcount程序卡住了
问题,内置wordcount程序运行到INFO mapreduce.Job: Running job: job_1492509956955_0001卡住了,很长时间不动: 17/04/18 18:00:30 INFO client.RMProxy: Connecting to ResourceManager at heres04/192.168.2.113:8032 17/04/18 18:00
我被卡住了
<--login.asp部分--> rnstu_nam=Request.Form("sname")rn stu_password=Request.Form("psd")rn set datecon=server.CreateObject("adodb.connection") rn set rs=server.CreateObject("adodb.recordset") rn datecon.Open "dsn=stu","ebadmin","1" rn sqlquery="select * from stu where stu_name="&""""&stu_nam&""""rn rn set rs=datecon.Execute(sqlquery,nrow)rn Response.Write sqlqueryrn Response.End rnrn《htlm部分》rn rn rn 姓名rn 密码rn rn rnrn再sql sever query analyzer语句中rn select * from stu 得到rnid stu_name stu_content stu_date rn1 陈dd 我在南昌 2001-6-21 20:20:51 rn2 陈小朋 我在海南 2001-6-21 20:24:04 rn5 ccc 2001-6-22 16:15:51 rn3 蔡小波 在哪 2001-6-21 20:25:33 rn4 严小宾 在海口 2001-6-21 20:28:12 rnrnrn错误类型:rnMicrosoft OLE DB Provider for ODBC Drivers (0x80040E14)rn/login.asprn set rs=datecon.Execute(sqlquery,nrow)rn
开机自检卡住了
我的电脑昨天非法关机以后开机自检c盘出问题了:rn里面写着:rnCHKDSK is verifying files (stage 1 of 3)...rnfile verification completed rnCHKDSK is verifying indexes (stage 2 of 3)...rn0 percent completed.rn然后就卡住了 好长时间不动。 rn郁闷.只好每次按键重启,然后跳过自检直接进系统.rn如果要让他自检的话就出现像上面说的那样检不过去的情况.rn谁有解决办法啊!谢谢!rn
为什么SurfaceView卡住了
代码如下rn[code=java]rnpackage org.example.ch04_android_basics;rnrnimport java.util.Random;rnrnimport android.app.Activity;rnimport android.content.Context;rnimport android.graphics.Canvas;rnimport android.os.Bundle;rnimport android.view.SurfaceHolder;rnimport android.view.SurfaceView;rnimport android.view.Window;rnimport android.view.WindowManager;rnrnpublic class SurfaceViewTest extends Activity rn FastRenderView renderView;rnrn @Overridern protected void onCreate(Bundle savedInstanceState) rn // TODO Auto-generated method stubrn super.onCreate(savedInstanceState);rn requestWindowFeature(Window.FEATURE_NO_TITLE);rn getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,rn WindowManager.LayoutParams.FLAG_FULLSCREEN);rn renderView = new FastRenderView(this);rn setContentView(renderView);rn rnrn @Overridern protected void onPause() rn // TODO Auto-generated method stubrn super.onPause();rn renderView.pause();rn rnrn @Overridern protected void onResume() rn // TODO Auto-generated method stubrn super.onResume();rn renderView.resume();rn rn rn class FastRenderView extends SurfaceView implements Runnablern Thread renderThread = null;rn SurfaceHolder holder;rn Random rand = new Random();rn volatile boolean running = false;rn rn public FastRenderView(Context context) rn super(context);rn // TODO Auto-generated constructor stubrn holder = getHolder();rn rn rn public void resume()rn running = true;rn renderThread = new Thread(this);rn renderThread.start();rn rn rn public void run()rn while(running)rn if(!holder.getSurface().isValid())rn continue;rn rn Canvas canvas = holder.lockCanvas();rn canvas.drawRGB(rand.nextInt(255), rand.nextInt(255), rand.nextInt(255));rn holder.unlockCanvasAndPost(canvas);rn rn rn rn public void pause()rn running = false;rn while(true)rn tryrn renderThread.join();rn catch(InterruptedException e)rn // retryrn rn rn rn rnrn[/code]rn我照书上敲的代码,用一个SurfaceView在UI主线程外的另一个不同线程进行简单的渲染rn运行的时候屏幕一直在闪着不同颜色的光,当我按返回键时,这个Activity就卡住了rn屏幕马上变黑了,但又没有退出程序,最后显示程序未响应rn[code=java]rnpublic void pause()rn running = false;rn while(true)rn tryrn renderThread.join();rn catch(InterruptedException e)rn // retryrn rn rn [/code]rn我感觉就是这段代码有问题,可能是死循环了,书上说用renderThread.join();rn的目的是等待线程完全销毁
Mysql安装卡住了
我已经安装了10次了rn可是还是每次安装到最后一步的时候就卡住了rnrn安装到最后时有四个提示:rn但是,每次都只有前面两个可以通过,一到第三个就卡住了rnrn[color=#FF0000]Prepare configurationrnWrite configuration file(my.ini的路径)[/color]rnStart servicernApply security settingsrnrn这是为什么啊?rnrn小弟的电脑上面已经安装了SQL2000,SQL2005rnrn
serviceMix 启动时 卡住了
version servicemix 3.3.1rncmd <%servicemix_home%>\bin\servicemixrnINFO - LogTask -Logging system reconfigured using file:file:<%servicemix_home%>/conf/log4j.xmlrn然后就卡住了 用IE访问 http://localhost:8192 出现IOR:01000000260000004944 4c3a536f70686f734d657373 6167696e672f4d657373616765526 f757465723a312e300000000100000 000000000a0000000010102000d000 000332e33362e3232392e31323000 0001204100000014010f004e5550 000000210000000001000000526 f6f74504f4100526f757465725 0657273697374656e74000300 0000010000004d6573736167 65526f75746572000000030000 0000000000080000000152a800004 f415401000000140000000152a800010001000000000rnrn不知道什么原因 请达人指点
脑袋被卡住了
如下两个基本上相同的函数rn//first 能够实现添加功能 CPage1的成员函数rnvoid CPage1::Add(void)rnrn this->UpdateData();rn CString sql_;rn //m_pRs.CreateInstance(__uuidof(Recordset));rn sql_.Format(_T("INSERT INTO tb_mat_code(code,name)VALUES('%s','%s')"),m_code,m_name);rn _bstr_t sql=sql_;rn tryrn rn m_pCon->Execute(sql,NULL,adCmdText);rn RefData();rn rn catch(_com_error& e)rn rn AfxMessageBox(e.ErrorMessage());rn rn /*catch(const _com_error& that)rn rn if(that.ErrorMessage==(TCHAR *)(3092))rn MessageBox(_T("编号已经存在"),0,MB_OK);rn */rn m_log->AddLog("添加物料记录");rn m_code=_T("");rn m_name=_T("");rn this->UpdateData(false);rnrnrnrn//second 不能向表中添加功能 CPage2的成员函数rnvoid CPage2::Add(void)rnrn this->UpdateData();rn CString sql_,c_indate;rn //m_pRs.CreateInstance(__uuidof(Recordset));rn m_indate.GetWindowText(c_indate);rn sql_.Format(_T("INSERT INTO tb_mat_in(code,indate,provider,telephone,innum,price,buyer)VALUES('%s','%s','%s','%s',%f,%f,'%s')"),m_code,c_indate,m_provider,m_phone,m_innum,m_inprice,m_buyer);rn _bstr_t sql=sql_;rn tryrn rn m_pRs->Open(sql,m_pCon.GetInterfacePtr(),adOpenKeyset,adLockOptimistic,adCmdText);rn RefData();rn rn [color=#FF0000]catch(_com_error& e)[/color]rn rn AfxMessageBox(e.ErrorMessage());rn long errorCode=e.WCode(); rn if(3127==errorCode) AfxMessageBox(_T("表不存在")); rn [color=#FF0000]if(3092==errorCode) AfxMessageBox(_T("表已经存在"));[/color]rn rn m_log->AddLog("添加物料记录");rn this->UpdateData(false);rn rnrnrnrn麻烦大家帮我看下,是不是这个下面的sql语句出了问题.....因为调试时,进入了红色的代码....想不通,两个相似类的相同成员函数.真的是脑袋被卡住了.
玩线程,卡住了
Imports System.WebrnImports System.ThreadingrnPublic Class Form1rnrn Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Clickrn Dim v As New GetSourceClsrn v.Url = url.Textrn v.Source = sourcern v.getSource()rn Do While v.AddressList.Count = 0rn My.Application.DoEvents()rn '我等我等我就等rn Looprn For i As Integer = 0 To 10rn Dim t As New ThreadGo(v.AddressList.Item(i))rn Nextrn End Subrnrn Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loadrn url.Text = "http://www.zhulang.com"rn End SubrnEnd ClassrnrnPublic Class GetSourceClsrn Public Source As ListBoxrn Public AddressList As New ArrayListrn Public Url As Stringrn Public Sub getSource()rn Dim Broswer As New WebBrowser '当第二线程激活时提示说:不在单元线程内!rn AddHandler Broswer.DocumentCompleted, New WebBrowserDocumentCompletedEventHandler(AddressOf BroswerComplete)rn My.Application.DoEvents()rn Broswer.Navigate(Url)rn End Subrnrn Private Sub BroswerComplete(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)rn Dim htmlDocument1 As HtmlDocumentrn Dim tmp As WebBrowser = CType(sender, WebBrowser)rn htmlDocument1 = tmp.Documentrn For i As Integer = 0 To htmlDocument1.Links.Count - 1rn My.Application.DoEvents()rn AddressList.Add(htmlDocument1.Links.Item(i).GetAttribute("href"))rn If htmlDocument1.Links.Item(i).GetAttribute("href").IndexOf(".zip") Thenrn Source.Items.Add(htmlDocument1.Links.Item(i).GetAttribute("href"))rn End Ifrn Nextrn End SubrnEnd ClassrnrnPublic Class ThreadGorn Public Sub New(ByVal url As String)rn Dim DCLS As New GetSourceClsrn DCLS.Url = urlrn Dim t As New Thread(AddressOf DCLS.getSource)rn t.Start()rn End SubrnEnd Classrnrn问题出现在注释那里,各位帮看看rn
Starting kernel ...卡住了
Mingddie # bdinfornboot_params = 0x83F63F9Crnmemstart = 0x80000000rnmemsize = 0x04000000rnflashstart = 0xBF800000rnflashsize = 0x00800000rnflashoffset = 0x00000000rnethaddr = 00:50:C2:1E:AF:3Drnip_addr = 192.168.1.230rnbaudrate = 115200 bpsrnrnrnbootargs=mem=64m console=ttys0,115200n8 ip=192.168.1.222 root=/dev/ram rwrnbootcmd=bootm 0xbf800000rnrn## Booting image at bf800000 ...rn Image Name: Linux Kernel Imagern Image Type: MIPS Linux Kernel Image (gzip compressed)rn Data Size: 1774636 Bytes = 1.7 MBrn Load Address: 80010000rn Entry Point: 803fd000rn Verifying Checksum ... OKrn Uncompressing Kernel Image ... OKrnrnStarting kernel ...rnrnrnrn就在这不动了什么意思哦rnrn在网上搜了这个,发现很多答案,就是没找到我要的。。。急rn
安装sqlserver2008express卡住了
系统是win7,公司的域。rn安装sqlserver2008express时,卡在了Install_trin_aide_Cpu32_Action:MsiPublishAssemblies.rn看了一下log。rn2013-02-20 08:30:32 Slp: ----------------------------------------------------------------------rn2013-02-20 08:30:32 Slp: Running Action: Install_trin_aide_Cpu32_Actionrn2013-02-20 08:30:32 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine rn2013-02-20 08:30:32 Slp: Sco: Attempting to open registry subkey rn2013-02-20 08:30:32 Slp: Sco: Attempting to open registry subkey SOFTWARE\Microsoft\VisualStudio\9.0rn2013-02-20 08:30:32 Slp: Sco: Attempting to get registry value InstallDirrn2013-02-20 08:30:32 Slp: Target package: "c:\254892caab56b50fffbdc26c7807\x86\setup\trin_aide.msi"rn停在这里,但是我去这个文件夹能找到trin_aide.msi。rn再看trin_aide_Cpu32_1.logrnAction start 8:31:00: RegisterUser.rnMSI (s) (8C:FC) [08:31:00:584]: Doing action: RegisterProductrnMSI (s) (8C:FC) [08:31:00:584]: Note: 1: 2205 2: 3: ActionText rnAction ended 8:31:00: RegisterUser. Return value 1.rnMSI (s) (8C:FC) [08:31:00:600]: Note: 1: 2205 2: 3: MsiDigitalSignature rnAction start 8:31:00: RegisterProduct.rnMSI (s) (8C:FC) [08:31:00:600]: PROPERTY CHANGE: Adding ProductToBeRegistered property. Its value is '1'.rnMSI (s) (8C:FC) [08:31:00:600]: Doing action: PublishComponentsrnMSI (s) (8C:FC) [08:31:00:600]: Note: 1: 2205 2: 3: ActionText rnAction ended 8:31:00: RegisterProduct. Return value 1.rnMSI (s) (8C:FC) [08:31:00:615]: Note: 1: 2205 2: 3: PublishComponent rnMSI (s) (8C:FC) [08:31:00:615]: Note: 1: 2228 2: 3: PublishComponent 4: SELECT `PublishComponent`.`ComponentId`, `PublishComponent`.`Qualifier`, `PublishComponent`.`AppData`, `Feature`, `Component`.`ComponentId`, `Component`.`RuntimeFlags` FROM `PublishComponent`, `Component`, `Feature` WHERE `PublishComponent`.`Component_` = `Component`.`Component` AND `PublishComponent`.`Feature_` = `Feature`.`Feature` AND ((`Feature`.`Action` = 1 OR `Feature`.`Action` = 2) OR (`Feature`.`Action` = 4 AND `Feature`.`Installed` = 0) OR (`Feature`.`Action` = 3 AND (`Feature`.`Installed` = 1 OR `Feature`.`Installed` = 2 OR `Feature`.`Installed` = 4))) rnAction start 8:31:00: PublishComponents.rnMSI (s) (8C:FC) [08:31:00:615]: Doing action: MsiPublishAssembliesrnMSI (s) (8C:FC) [08:31:00:615]: Note: 1: 2205 2: 3: ActionText rnAction ended 8:31:00: PublishComponents. Return value 0.rnAction start 8:31:00: MsiPublishAssemblies.rn停在这里了。rn现在我该咋办呢?放在那等着还是放弃?rn谢谢大家。
Class.forName("org.postgresql.Driver")卡住了
在用jdbc的org.postgresql.Driver时卡住了, 代码如下:rnrndriveName = "org.postgresql.Driver";rnlogger_.log("drive Name: "+driveName);rntry rn Class.forName(driveName);rncatch(Exception e)rn logger_.log("catch exception while load postgresql driver: " + e.toString());rn e.printStackTrace();rnrnlogger_.log("connect succeed");rnrn在日志打出 "drive Name org.postgresql.Driver"后, 就停住了, 既不打出异常日志也没有链接成功的日志.rn控制台也是停住, 但是进程并没有终止, 这是为什么?rn这种情况不是每次都发生, 偶尔出现一次.
npm install的时候卡住
npm install下包卡住切换淘宝镜像 npm install -g cnpm –registry=https://registry.npm.taobao.org
xcode编译的时候卡住
今天编译了一个很久以前的模块,总是会卡住。 于是各种折腾。 难道是代码有问题?把我自己加的还没入库的代码去掉。。不行 难道是编译器的问题?升级,升级,升级到最新 。。  不行 难道是系统有异常了?升级,升级,升级到最新。。  还是不行 仔细看他卡的位置: 看上去是在执行shell 脚本的时候,卡住了。。 但是我并没有搞什么脚本啊。。。 然后看到设置项
jdbc无法执行存储过程,卡住
[code=SQL]rncreate procedure addemp asrnbeginrninsert into emp(empno) values(1111);rnend;rn/rn[/code]rn该存储过程在sqlplus里面执行成功rn[code=Java]rn public static void main(String[] args) throws Exception rn Connection conn = OracleConnection.getConnection();rn CallableStatement cs = conn.prepareCall("call scott.addemp()");rn cs.execute();rn conn.close();rn rn[/code]rn用jdbc来执行,就一直卡在execute这句上,没反应也不报错,为什么?
java学习之:JDBC(查询)
查询数据库时通过多个条件查询,为了不使查询的参数过多,可以使用List> public List query(List> params){ ........ ........ StringBuilder sql="select *from 表   where  1=1" ;  //1=1是一个小技巧,使得where的格式正确 if(params!=null&&params.size(
Java 封装jdbc查询
jdbc 查询 封装
Hibernate 错误,学习卡住了
hibernate.cfg.xml 文件如下:rn[code=html]rn rn com.mysql.jdbc.Driverrn jdbc:mysql://localhost:3306/testrn rootrn 123456rn rn org.hibernate.dialect.MySQLDialectrn rn rn rn[/code]rnrn.hbm.xml 文件如下:rn[code=html]rnrnrnrn rn rn rn rn rn rn rn rn rn rn rnrn[/code]rnrn项目结构如下:rn[img=https://img-bbs.csdn.net/upload/201703/19/1489925437_365290.png][/img]rnrn调试错误信息:rn[img=https://img-bbs.csdn.net/upload/201703/19/1489925226_28819.png][/img]
又卡住了。。求解惑
[code=c]int get(stu pa[], int n)rnrn int i;rn for (i = 0; i < n; i++)rn rn cout << "Enter the name :";rn cin.getline(pa[i].name, slen);rn if ()//这里,需要一个,“输入q提前结束for循环”的语句。”rn return i;rn[/code]rn具体见代码中间注释,试了很多种方法,都失败了,来求高手解惑,一道题耗了我一个多点小时了,简直无情!
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件