ActiveMQ的一个异常问题 [问题点数:50分,结帖人clever101]

结帖率 99.13%
Bbs2
本版专家分:369
Bbs2
本版专家分:369
一个异常问题~~~
#include rn#include rnusing namespace std;rnrnclass Up;rnclass Fit;rnvoid g();rnrnvoid f(int i)throw(Up,Fit)rn switch(i)rn case 1:rn throw Up();break;rn case 2:rn throw Fit();break;rn rn g();rnrnrnvoid g()throw 47;rnrnvoid my_unexpected()rn cout<<
一个异常问题
我在多层更新过程中出现<em>一个</em>异常,你们能解释一下吗:rn异常为:PROJECT XJNDFDXT.EXE RAISED EXCEPTION CLASS EACCESSVIOLATION WITH MESSAGE'ACCESS VIOLATION AT ADDRESS 4DBODECE IN MODULE 'MIDAS.DLL',READ OF ADDRESS00313032',PROCESS STOPPED,USE STEP OR RUN TO CONTINUE.
一个异常问题
我用servlet发<em>一个</em>字符串过来!客户端接收时会报java.io.EOFException异常!rn这个.EOFException是什么异常呀?会在什么情况下引起?
一个异常问题,在线等待。
如何在IDE环境中,扑捉异常。不要告诉我脱离IDE环境。我的意思是说在编译器弹出异常来之前,被我的异常处理扑捉(在IDE中),如何解决。比如如下代码;rn adoqry->Append();rn tryrn rn// adoqry->FieldByName("cj2")->AsVariant.Clear();rn adoqry->FieldByName("cj1")->AsString = Edit1->Text; //cj1字段不能为空;故要发生EConvertError异常,可是为什么我的EConvertError抓不到呢?会先被编译器的异常先抓到?rn adoqry->FieldByName("cj2")->AsInteger = StrToInt( Edit2->Text );rn rn catch(EConvertError& e)rn rn ShowMessage("kkk");rn rn catch(Exception & e)rn rn ShowMessage("jjj");rn // ShowMessage( e.Message.c_str() );rn
关于IOCP的一个异常问题
4个工作者线程,每<em>一个</em>连接5个并发收,两个IOCP对象。rn <em>一个</em>对象用于连接管理TCP Server,其中有两个辅助线程,<em>一个</em>用于重连(每十秒查询一次,如果没连接则进行连接,两个连续的连接之间有100ms延时),另<em>一个</em>用于实时对每个TCP Server进行通信,大约每一秒向<em>一个</em>TCP Server发送一次。rn 另<em>一个</em>对象用于管理TCP Client,只是相应TCP Client的命令,如果接收到命令则进行返回。rnrn 现在遇到的问题是:启动程序后,连接(十多个连接)的时候CPU会上升到50%,有时CPU在连接成功后会降下来,有时将不下来,紧接着会出现各个TCP Server连续的连接和断开现象,收发也出现异常。大概是什么原因,请各位看官指教,谢谢!rnrn 会不会是第<em>一个</em>对象中有两个辅助线程,<em>一个</em>对连接后的Socket进行CreateIoCompletionPort,而另<em>一个</em>对其他连接上的Socket进行收发,导致IOCP部分产生冲突?
求救!JDBC的一个异常问题
哪位高手能告诉我rnjava.sql.SQLException: No ResultSet was producedrn这个异常是什么意思?
跪求一个异常问题
我用的是Tomcat和MSSQL,连接数据库是用的普通接连(驱动)rn当我的主页加载时出现了N多的这个异常 rnjava.net.SocketExceptionrnat java.net.SocketOutputStream.socketWrite0(Native Method)rnat java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) rnat java.net.SocketOutputStream.write(SocketOutputStream.java:136) rnat org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java:674) rnat org.apache.catalina.connector.HttpResponseBase.flushBuffer(HttpResponseBase.java:764) rnat org.apache.catalina.connector.ResponseBase.write(ResponseBase.java:647) rnat org.apache.catalina.connector.ResponseStream.write(ResponseStream.java:312) rnat org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java:189) rnat org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:1921) rnat org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1670) rnat org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1215) rnat org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:525) rnat javax.servlet.http.HttpServlet.service(HttpServlet.java:740) rnat javax.servlet.http.HttpServlet.service(HttpServlet.java:853) rnat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) rnat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) rnat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) rnat org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) rnat org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) rnat org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) rnat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190) rnat org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) rnat org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) rnat org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) rnat org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) rnat org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) rnat org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) rnat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) rnat org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) rnat org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) rnat org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) rnat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) rnat org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) rnat org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) rnat org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) rnat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) rnat org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) rnat org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) rnat org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) rnat org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027) rnat org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125) rnat java.lang.Thread.run(Thread.java:534)rnrn这个是什么异常,怎么会出现socket?rn怎么解决这个问题?
一个JAVA异常问题
rnrnrnrnrnrnrnrnclass SelfException extends Exception rn SelfException()super();rn SelfException()super(st);rnrnclass jex7_11rn static int throwDemo(String st)throws SelfExceptionrn if(st.equals("DEF"))throw new SelfException("a DEF");rn if(st.equals("ABC"))rn System.out.println("throwDemo("+st+")没有抛出异常");rn return st.length();rnrn public static void main(String args[])rn for(int i=0;i
关于webservice的一个异常问题
AxisFaultrn faultCode: http://schemas.xmlsoap.org/soap/envelope/Server.userExceptionrn faultSubcode: rn faultString: org.xml.sax.SAXException: Bad envelope tag: definitionsrn faultActor: rn faultNode: rn faultDetail: rn http://xml.apache.org/axis/stackTrace:org.xml.sax.SAXException: Bad envelope tag: definitionsrn有谁知道这个错吗?如何解决?谢谢1!rn
关于一个简单的异常问题?
void func()rnrn tryrn rn throw "Hello";rn rn catch(const char *s) rn rn cout << "catch exception, message = " << s << endl;rn rnrn为什么在catch里一定要加const, 不加就捕获不到
一个关于Remoting的异常问题
最近开发Remoting,遇到<em>一个</em>问题,提示如下:rnrn安全性异常 rn说明: 应用程序试图执行安全策略不允许的操作。要授予此应用程序所需的权限,请与系统管理员联系,或在配置文件中更改该应用程序的信任级别。 rnrn异常详细信息: System.Security.SecurityException: 请求失败。rnrn源错误: rnrn执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 rnrn堆栈跟踪: rnrn[SecurityException: 请求失败。]rnrn#########################################rn死活找不到问题了rn我用的服务器端激活,Singleton模式rn服务器端的配置文件如下:rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnrn客户端的配置文件如下:rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrn所有传送的类都已经序列化了,各位高手大虾们有什么建议不,不胜感激呀rnrn rn
一个奇怪的异常问题
[img=http://www.imagecrazy.net/uploads/5c2ff45d43.jpg][/img]rnrn[code=Java]public String Jpstr(String str)rn Pattern p = Pattern.compile("&#(.*?);");rn Matcher m = p.matcher(str);rn while (m.find()) rn String s = m.group(1);rn Pattern p1 = Pattern.compile("\\d");rn Matcher m1 = p1.matcher(s);rn String num = "";rn while(m1.find())rn num += m1.group();rn rn int b = Integer.valueOf(num.trim()).intValue(); // 179行rn char d = (char) b;rn str = str.replace(m.group(), String.valueOf(d));rn rn return str;rn [/code]
InterDev的一个异常问题,安装..
安装InterDev后,不论打开asp页,还是html页,没有了编辑选项、源代码选项和预览选项,显示的只有源码,而且源码中没有颜色,没有的自动提示功能。完全象是<em>一个</em>记事本,但上工程管理还好使。rn我重装了N遍(卸->装,删->装),没有效果。但其它visual studio 匀正常。rn不知道你是否遇到过这种清况,如果有过,且您已经解决了这个毛病,请您教教 我,谢谢。rn系统:window 2000 server.pack2
请教一个adoquery下的异常问题
以下语句:tryrn query1.Edit;rn query1.fields[0].AsString:=editdhhm.Text;rn query1.fields[1].AsString:=editdw.Text;rn query1.fields[2].AsString:=editdz.Text;rn query1.Post;rn exceptrn showmessage('error');rn end;rn其中字段一是主索引,当提交的值有重复时将产生错误,但程序中并未执行到showmessage(),而是出现了另<em>一个</em>系统对话框:raised an exception......,rn请问如何不让系统对话框出现而是执行showmessage('error')?
请教一个jsp的异常问题:
org.apache.jasper.JasperExceptionrn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:856)rn org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1002)rn org.apache.jsp.hzltest_jsp._jspService(hzltest_jsp.java:67)rn其中,hzltest_jsp.java:67为该句,应该是include编译出来的语句:rnorg.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "include/top_t.jsp", out, false);rn请问,这可能是什么问题rn
一个删除记录的异常问题
我是用ADO连接Sybase数据库rn有个操作是查询数据库某表中的记录,然后删除查询到的记录rn部分代码如下:rn[code=SQL]RstSnd.CreateInstance( __uuidof(Recordset) ); ////_RecordsetPtr RstSnd rnRstSnd->putref_ActiveConnection(m_ConnSvr); rn rnTRACE1("%s\n", strSql);//strSql为<em>一个</em>查询语句rnRstSnd->Open(vValue, vNull, adOpenDynamic, adLockOptimistic, adCmdText);rn。。。。。。。。。。。。。rnrnRstSnd->Delete(adAffectCurrent); [/code]rnrn调试运行到Delete的时候,发生异常,捕获显示:当前记录集不支持更新。这可能是提供程序的限制,也可能是选定锁定类型的限制。 rnrn想问下,为什么会出现这种错误呢?rn望高人指点,谢谢了rnrnrn
请问一个关于数据库的异常问题
先看下面的程序代码:rnDataModule_DATA1.ADOCommand_SJ.CommandText:='UPDATE 或者 INSERT等SQL语句';rntryrn DataModule_DATA1.ADOCommand_SJ.Execute;rnexceptrn MessageBox(Self.Handle,'处理失败,请检查!','错误',MB_OK or MB_ICONWARNING);rn Exit;rnend;rnMessageBox(Self.Handle,'处理成功!','提示',MB_OK or MB_ICONINFORMATION);rnrn请问上面是不是会出现这种情况,SQL语句已经执行,但是提示处理失败,或者是提示成功,但是SQL语句没有执行成功。是不是还有其他一些异常会影响上面的判断!
一个数据库的异常问题
急!急!急!急!请高手指点一下吧rnjava.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error rnrnreadingrndata from static cursor cache.rn提示的是什么意思呀?
CAS单点登录一个异常问题
异常:rn[ERROR,Cas20ServiceTicketValidator,http-8080-1] javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names presentrnjavax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names presentrn at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1591)rn at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:187)rn at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:181)rn at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:975)rn at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:123)rn at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516)rn at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)rn at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1107)rn at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:405)rn at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)rn at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)rn at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)rn at org.jasig.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator.retrieveResponseFromServer(AbstractCasProtocolUrlBasedTicketValidator.java:35)rn at org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:178)rn at org.springframework.security.providers.cas.CasAuthenticationProvider.authenticateNow(CasAuthenticationProvider.java:145)rn at org.springframework.security.providers.cas.CasAuthenticationProvider.authenticate(CasAuthenticationProvider.java:131)rn at org.springframework.security.providers.ProviderManager.doAuthentication(ProviderManager.java:188)rn at org.springframework.security.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:46)rn at org.springframework.security.ui.cas.CasProcessingFilter.attemptAuthentication(CasProcessingFilter.java:94)rn at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:258)rn at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)rn at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)rn at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)rn at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)rn at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)rn at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)rn at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)rn at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)rnrn在服务器器上执行rnkeytool -genkey -alias tomcat-server -keyalg RSA -keypass changeit -storepass changeit -validity 3600 rnrn用户名输入为:202.104.186.67,其他都为空rn在root根目录下生成.keystore的文件rn在服务器的tomcat下配置8443端口:rnrn rnrn部署cas到服务器的tomcat下,测试https:202.104.186.67:8443/cas正常显示登录页面rnrn在服务器上执行keytool -export -file server.crt -alias tomcat这个命令,生成server.crt文件rnrnrnrn把server.crt 文件放在客服端的%JAVA_HOME% /jre/lib/sercurity下rn在这个目录下运行keytool -import -keystore cacerts -file server.crt -alias tomcat,输入密码changeit,导入到cacerts文件。rnrnrn以上是配置全过程。rnrn客服端security系统配置如下:rnrnrnrn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rnrn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rnrn rn rn rn rn rn rn rnrn rn rn rn rn rn rnrnrn在本地访问localhost:8080/s-ori/时,直接到https://202.104.186.67:8443/cas/login,输入用户名和密码,本地抛javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present这个异常rnrn大体情况就是这样的,我在网上看到有<em>一个</em>地方说是因为服务器输入用户名和使用的不一致造成的,我感觉是使用返回那个地址的问题,但是还是找不到原因rnrn rn rn rn rnrn返回地址http://localhost:8080/s-ori/j_spring_cas_security_checkrn
求解。一个空指针异常问题
package maze;rnrn//利用栈 解决迷宫问题rnrnpublic class MyMaze rn public static int mg[][]=1,1,1,1,1,1,//地图迷宫,其四周是为1的外框rn 1,0,0,0,1,1,rn 1,0,1,0,0,1,rn 1,0,1,0,1,1,rn 1,1,0,0,0,1,rn 1,1,1,1,1,1;rn public static Point[] stack=new Point[1000];//栈rn public static int top=-1;//栈顶指针rn// public static int path[];//保存最短路径的数组rn// public static int minLen;//最短路径长度。rn rn public static int mgPath(int xi,int yi,int xe,int ye)//探索路径为:(xi,yi)->(xe,ye)rn int i=0,j=0,di=-1,find=0;rn top++;rn stack[top].i=xi;//??????????????????????rn stack[top].j=yi;rn stack[top].di=-1;//初始结点进栈rn mg[1][1]=-1;rn while(top>-1)//栈不为空时循环rn i=stack[top].i;j=stack[top].j;di=stack[top].di;//取栈顶方块rn if(i==xe&&j==ye)//找到了出口,输出路径rn System.out.println("迷宫路径如下:");rn for(int k=0;k<4&&find==0)//找(i,j)方块下<em>一个</em>可走方块rn di++;rn switch(di)//方向规定按顺时针方向来探索rn case 0: i=stack[top].i-1;j=stack[top].j;break;rn case 1: i=stack[top].i;j=stack[top].j+1;break;rn case 2: i=stack[top].i+1;j=stack[top].j;break;rn case 3: i=stack[top].i;j=stack[top].j-1;break;rn rn if(mg[i][j]==0)rn find=1;//找到下<em>一个</em>可走相邻方块rn rn if(find==1)//找到了<em>一个</em>可走的相邻方块rn stack[top].di=di;//修改原栈顶元素的di值rn top++;rn stack[top].i=i;stack[top].j=j;stack[top].di=-1;rn mg[i][j]=-1;//避免重复走到该方块,将其置为-1rn else//没有相邻方块可走,则退栈。rn mg[stack[top].i][stack[top].j]=0;//让该位置变为其他路径可走方块。rn top--;//将该方块退栈rn rn rn rn return 0;rn rn private class Point//点的位置及方位rn int i;rn int j;//i,j为方块的行号,列号。rn int di;//下一步可走相邻方位的方位号。rn rn rn public static void main(String[] args) rn MyMaze.mgPath(1, 1, 4, 4);rn rnrnrn注:在标注???的地方出现空指针异常。这个空指针异常应该与我的算法没关系,可能是我的某个基础知识没能理解造成的,请明白人指点一下。麻烦您了
求解:一个简单的异常问题!!!
[color=#FF0000]如果发生异常,想执行catch中的代码,但是不灵,请问我应该如何做,或是结构本身就有问题?那应该怎样去构思?谢谢!rn程序代码如下(变红的代码就是程序没有执行的代码):[/color]rnrnpublic partial class ShowResult : System.Web.UI.Pagernrn protected void Page_Load(object sender, EventArgs e)rn rn if (!Page.IsPostBack)rn rn ViewState["order"] = "ASC";rn ViewState["SortItem"] = "contactName";rn this.bind();rn Label1.Visible = false;rn rnrn btnClose.Attributes.Add("onclick", "window.close()");rn if (GridView1.Rows.Count ;rn this.bind();rn rn rn
一个二维数组,空指针异常问题
![图片说明](https://img-ask.csdn.net/upload/201606/18/1466239385_520858.jpg)
一个很简单的异常问题
问题是,如果何在程序当中获取异常号或异常信息。rn比如,我在联接数据库时,数据库联接失败,有可以是网络不通,也有可能是用户密码不正确,还有可能是用户设置有问题。rn(在线等待)
请教一个C++异常问题
以下程序,如何让它产生异常后继续运行,现在只能输出 -5 -4 -3 -2 -1,后面的1 2 3 4如何让其接着输出?rn[code=C/C++]int main()rn int i = -5;rn tryrn while(i < 5)rn if(i++ == 0)rn throw 1010;rn elsern printf("%d ",i);rn rn catch(int y)rn printf("\nCatch exception code: %d\n",y);rn rnrn return 0;rn[/code]
解决了一个异常问题
出现<em>一个</em>异常: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.abc.beans.AppBean 原因:AppBean类没有实现序列化   解决方法: 1。AppBean类实现implements Serializable接口; 2。在AppBean类中加入import j...
一个异常问题(登陆cookie)
客户那边是虚拟机,web登录是用cookie做的,现在出现了<em>一个</em><em>异常问题</em>,客户端有时候出现无法登陆,检测到cookie是不存在的,重新登陆无反应。但是在服务器内登陆却是正常。这个异常要重启服务器才能恢复正常。rn搞不懂什么异常?????????rnrn登陆代码rn[code=csharp]rnstring username = Request["username"].ToString();rnstring password = Request["password"].ToString();rnrn//验证数据库用户表rnUserModel user = DllFactory.getTrainDll.getUser(username, password);rnrnif (user != null)//通过rnrn HttpCookie aspCookies = new HttpCookie("aspusername");rn HttpCookie aspCookiesPwd = new HttpCookie("password");rn HttpCookie aspCookiesuid = new HttpCookie("uid");rn HttpCookie aspCookiesPower = new HttpCookie("spower");//T代表教师,U代表学生,S代表管理员rn HttpCookie aspCookiesUserID = new HttpCookie("aspuserId");rnrn aspCookies.Value = Server.UrlEncode(user.UserName.ToString());rn aspCookiesPwd.Value = user.PassWord;rn aspCookiesuid.Value = user.Uid.ToString();rn aspCookiesPower.Value = user.Spower.ToString();rn aspCookiesUserID.Value = user.Uid2;rnrn aspCookies.Expires = DateTime.Now.AddDays(3);rn aspCookiesPwd.Expires = DateTime.Now.AddDays(3);rn aspCookiesuid.Expires = DateTime.Now.AddDays(3);rn aspCookiesPower.Expires = DateTime.Now.AddDays(3);rn aspCookiesUserID.Expires = DateTime.Now.AddDays(3);rnrn HttpContext.Current.Response.Cookies.Add(aspCookies);rn HttpContext.Current.Response.Cookies.Add(aspCookiesuid);rn HttpContext.Current.Response.Cookies.Add(aspCookiesPwd);rn HttpContext.Current.Response.Cookies.Add(aspCookiesPower);rn HttpContext.Current.Response.Cookies.Add(aspCookiesUserID);rnrn Response.Redirect("index.aspx");rnrn[/code]rnrnrn退出登录代码rn[code=csharp]rnHttpCookie cookies = Request.Cookies["aspusername"];rnif (cookies != null)rnrn cookies.Expires = System.DateTime.Now.AddDays(-30);rn Response.Cookies.Add(cookies);rnrnrnHttpCookie cookies1 = Request.Cookies["password"];rnif (cookies1 != null)rnrn cookies1.Expires = System.DateTime.Now.AddDays(-30);rn Response.Cookies.Add(cookies1);rnrnrnHttpCookie cookies2 = Request.Cookies["uid"];rnif (cookies2 != null)rnrn cookies2.Expires = System.DateTime.Now.AddDays(-30);rn Response.Cookies.Add(cookies2);rnrnrnHttpCookie cookies3 = Request.Cookies["spower"];rnif (cookies3 != null)rnrn cookies3.Expires = System.DateTime.Now.AddDays(-30);rn Response.Cookies.Add(cookies3);rnrnrnHttpCookie cookies4 = Request.Cookies["aspuserId"];rnif (cookies4 != null)rnrn cookies4.Expires = System.DateTime.Now.AddDays(-30);rn Response.Cookies.Add(cookies4);rnrnResponse.Redirect("index.aspx"); rn[/code]rnrnrn
请为一个异常问题
对话框类:CDialogb* m_pDialog;rnrn在试图类中:rnrnvoid CmainView::OnSize(UINT nType, int cx, int cy)rnrn CView::OnSize(nType, cx, cy);rn if (m_pDialog!=NULL)rn rn m_pDialog->SendMessage(WM_SIZE,nType,(cy<<16)+cx);发生异常是什么原因呀!rn_AFXWIN_INLINE LRESULT CWnd::_AFX_FUNCNAME(SendMessage)(UINT message, WPARAM wParam, LPARAM lParam) constrn ASSERT(::IsWindow(m_hWnd)); return ::SendMessage(m_hWnd, message, wParam, lParam);
求教一个联合查询的异常问题!!!!!
我有三个表,情况如下:rn[code=SQL]rnselect A.*,B.列名,C.* from rn A,rn B,rn C rnwhere A.列名 in (select distinct(条件) from 表名 where 条件='XXXXXXXXXX')rn[/code]rn结果查询出来的列都没有值,然后去掉C表:rn[code=SQL]rnselect A.*,B.列名from rn A,rn Brnwhere A.列名 in (select distinct(条件) from 表名 where 条件='XXXXXXXXXX')rn[/code]rn结果查询出来就有值了!rn==============rnwhere A.列名 in (select distinct(条件) from 表名 where 条件='XXXXXXXXXX')rn这个条件肯定是满足的!rn======rn请教为什么会出现这种情况??????????????????
一个小的异常问题 急急
我计算打开文件的长度时候出现异常,代码如下,请各位多多指教:rniSendFilenum = FreeFilern Open strSendFileName For Input As iSendFilenumrn intFileLen = LOF(iSendFilenum) '当不是TXT文件时就出现异常,异常Number是非6rn不知道是什么原因
请教一个异常问题
代码比较山寨,如下:rn[code=C#]rnusing System;rnusing System.Collections.Generic;rnusing System.ComponentModel;rnusing System.Data;rnusing System.Drawing;rnusing System.Text;rnusing System.Windows.Forms;rnusing System.Net;rnusing System.IO;rnusing System.Threading;rnusing System.Collections;rnrnnamespace picturernrn public partial class ftpUpload : Formrn rn //服务器iprn string ftpIp = "192.168.4.88";rn //端口rn string port = "21";rn //用户名rn string userName = "wj";rn //密码rn string userPassword = "123456";rn //线程数量rn static int threadNum = 10;rn //定义目标路径rn const string picTargetPath = "/tempUpload/phototest";rn const string fileTargetPath = "/tempUpload/photoinfotest";rn //进度条中需要减去标牌的数量rn int minuend = 0;rn int success = 0;rn int fail = 0;rn //0表示未用过,1表示已用过rn int tag = 0;rn //存放图片的集合rn ArrayList picList = new ArrayList();rn //文件的存放目录rn string fileName = "";rn private static int MAX_TIMES = 3;rnrn //文件上传失败保存信息的路径rn static string path = Info.Deal + "\\" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".txt";rn //保存图片信息的文件路径rn static string filePath = Info.Path + "\\" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".txt";rnrn StreamWriter s = File.CreateText(path);rn StreamWriter sw = File.CreateText(filePath);rnrn public ftpUpload(ArrayList list,string fileName)rn rn InitializeComponent();rn this.picList = list;rn this.fileName = fileName;rn rnrn //当前进度条的值rn public int currentValue = 0;rn //显示进度条的委托声明rn delegate void ShowProgressDelegate(int totalStep, int currentStep);rn //显示进度条rn void ShowProgress(int totalStep, int currentStep)rn rn if (progressBar1.InvokeRequired)rn rn ShowProgressDelegate showProgress = new ShowProgressDelegate(ShowProgress);rnrn //为了避免工作线程被阻塞,采用异步调用委托rn this.BeginInvoke(showProgress, new object[] totalStep, currentStep );rn rn elsern rn progressBar1.Maximum = totalStep;rn progressBar1.Value = currentStep;rn rnrn rn /// rn /// 上传单个文件rn /// rn /// rn /// 如:/phototestrn /// rn private FtpStatusCode UploadFun(string fileName,string targetPath)rn rn Stream requestStream = null;rn FileStream fileStream = null;rn FtpWebResponse uploadResponse = null;rnrn //显示原文件路径rn //this.Invoke((EventHandler)delegate label2.Text = fileName; );rn rn rn //构造目标路径rn FileInfo fileInf = new FileInfo(fileName);rn string uploadUrl = "ftp://" + ftpIp + ":" + port + targetPath + "/" + fileInf.Name;rnrn tryrn rn //连接ftp服务器rn FtpWebRequest uploadRequest = (FtpWebRequest)WebRequest.Create(uploadUrl);rn uploadRequest.Method = WebRequestMethods.Ftp.UploadFile;rn uploadRequest.Proxy = null;rn NetworkCredential nc = new NetworkCredential();rn nc.UserName = userName;rn nc.Password = userPassword;rn uploadRequest.Credentials = nc;rnrn //上传rn requestStream = uploadRequest.GetRequestStream();rn fileStream = File.Open(fileName, FileMode.Open);rnrn byte[] buffer = new byte[1024];rn int bytesRead;rn while (true)rn rnrn bytesRead = fileStream.Read(buffer, 0, buffer.Length);rn if (bytesRead == 0)rn rn break;rn rn elsern rn requestStream.Write(buffer, 0, bytesRead);rn rn rn requestStream.Close();rn uploadResponse = (FtpWebResponse)uploadRequest.GetResponse();rnrn //如果是TXT格式就不用显示rn if (System.IO.Path.GetExtension(fileName).ToLower() == ".jpg")rn rn //显示图片rn pictureBox1.Image = Image.FromStream(fileStream);rn rn rn return uploadResponse.StatusCode;rnrn rn catch (UriFormatException ex)rn rn MessageBox.Show(ex.Message);rn rn catch (IOException ex)rn rn MessageBox.Show(ex.Message);rn rn catch (WebException ex)rn rn MessageBox.Show(ex.Message);rn rn finallyrn rn if (uploadResponse != null)rn uploadResponse.Close();rn if (fileStream != null)rn fileStream.Close();rn if (requestStream != null)rn requestStream.Close();rnrn rn return FtpStatusCode.Undefined;rn rnrn private void upLoadButton_Click(object sender, EventArgs e)rn rn //分配每个线程传递照片数量rn int temp = picList.Count / threadNum;rn upLoadButton.Visible = false;rn //创建10个线程上传照片rn for (int i = 1; i < threadNum + 1; i++)rn rn Thread t = new Thread(new ThreadStart(LoadUploadMain));rn t.Name = (i * temp).ToString();rn t.Start();rn rn //开辟新的线程传递info文件和零散的照片rn Thread th = new Thread(new ThreadStart(LoadUploadOthers));rn th.Start();rn rnrn[/code]rnrn我在前<em>一个</em>页面用[code=C#]ftpUpload ftp = new ftpUpload(picList, Info.Path);rn ftp.ShowDialog();[/code]调用,rnrn当网络异常,无法上传图片的时候,这个地方报异常“未处理的“System.Reflection.TargetInvocationException”类型的异常出现在 mscorlib.dll 中。rnrn其他信息: 调用的目标发生了异常。”rnrn代码只发了一部分。请高手帮忙啊,十分感谢。
一个百思不得其解的异常问题
the error is:[Microsoft][ODBC 驱动程序 管理器] 函数序列错误rnrn相应的代码为:rntemp="select * from USER_INFO where USER_ID='"+user_id+"'“rntryrn rn ResultSet RS = sql.executeQuery(temp);rn rn while(RS.next())//如果存在该记录将进行相应的操作rn rn RS.close();rn resp.sendRedirect(ADDRESS+"/main.htm");rnrn rn RS.close();rn resp.sendRedirect(ADDRESS+"/error.htm");rn catch(SQLException e)rn//数据库产生错误的时候rnSystem.out.println("the error is:"+e.getMessage()); rn//出错处理rnrn为什么会产生这个错误,错误的原因可能在哪儿呢?rn多谢!
异常问题!!
终端异常怎样彻底的消灭掉呀!只用log记录日志是不行的,也不能打印出来 ,又不能再向上抛出。该咋办??
异常问题
为什么提示 Test6.java:17: 需要 '('rn catchrn ^rnTest6.java:18: 需要 ')'rn System.out.println("抓到你了哦");rnrn[code=Java]public class Test6 rn public static void main(String[] args) rn TT.t(33,99);rn rnrnrnclass TT rn public static void t(int n,int m) rn int resd;rn int num1 = n;rn int num2 = m;rn rn for(;;) rn rn tryrn resd = num1 % num2;rn catchrn System.out.println("抓到你了哦"); rn rn rn if(resd==0) rn System.out.println(n+"和"+m+"的最大公约数是: "+num2); rn rn rn num1 = num2;rn num2 = resd;rn rn rn[/code]
异常问题???
我用c#调用c++的<em>一个</em>com组件,有时com会出现<em>一个</em>c++异常,请问怎么样不让这个异常的窗口出现,或者是把这个异常捕获到????
异常问题
我做了<em>一个</em>合并两表数据的控制台应用程序。少量数据测试是可以通过。但是用500多万和300多万的数据去合并并插入另一新表。rn就出现了异常,在输出的面板里显示为:rn 在System.OutOfMemoryException中第一次偶然出现的“mscorlib.dll”类型的异常rn在System.OutOfMemoryException中第一次偶然出现的“System.Data.dll”类型的异常rn......rn......rn就有很多这样的。rn但在那个异常详细信息里显示的是:由于以前的函数求值超时,函数求值被禁用,必须继续运行才能重新启动函数求值。rn但是我点击了继续按钮之后,过一会就跳出了。rn这个如何解决呢?求助!麻烦各位大侠帮忙解决。
异常问题!!!
请问各位大侠。rnjava.security.spec.InvalidkeySpecException和java.security.cert.CertificateParsingExceptionrn分别是什么错误呢?需要怎么解决?rnrnrn谢谢
异常问题~~~
public class Rethrowingrnrn public static void f() throws Exceptionrn rn System.out.println("Throwing a Exception from f()");rn throw new Exception("from f()");rn rn public static void g() throws Throwablern rn tryrn rn f();rn rn catch(Exception e)rn rn System.err.println("Inside g(),e.printStackTrace()");rn e.printStackTrace(System.err);rn //throw e;rn throw e.fillInStackTrace();rn rn rn public static void main(String [] args) throws Throwablern rn tryrn rn g();rn rn catch(Exception e)rn rn System.err.println("Caught in main,e.printStack()"); rn e.printStackTrace(System.err);rn rn rn rnrn问题是主函数为什么要加上throws Throwable? 如果g()中返回的是Throwable 那么主函数中的catch()将不会捕捉的啊 敬请高手指点~~~
异常问题
请高手指教:rn 我要插入从MaskEdit中的日期到数据库中,其中用到了转换函数StrToDate,可是如果你输入的日期格式不对的话会抛出两个异常:EDBEditError和EConvertError!这样的话会跳出两个警告诓,我该怎么解决这个问题??
异常问题!!!!
一段在tomcat夏运行的servlet程序:rnrntryrn Class.forName(myDriver);//load driverrn dbConn = DriverManager.getConnection(dbURL);//connectrn rn catch(ClassNotFoundException e)rn System.out.println("Can't load driver "+e);rn rn catch(SQLException e)rn System.out.println("Database access failed "+e);rn rn //这段代码没有抛出异常 rn.......rn.......rn try //这里出现了异常:rnrn Statement stmt = dbConn.createStatement();rn …………………… rn rn rn rn rn rn stmt.executeUpdate(sql);rn stmt.close();//语句结束rn dbConn.close();//关闭连接rnrn catch(SQLException e)rn out.println("");rn out.println("");rn out.println("");rn out.println("");rn out.println(""); rn out.println(" Database currently unavailable."); rnrn out.println(" error: "); rn out.println(" "+ e.toString() +"");rn out.println("");rn out.println("");rn rn out.close();rn //出现结果结果是这样:rnDatabase currently unavailable.rnerror: rnjava.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] ?????????????rn?rnrnrn如果直接在本地的jdbc程序,对异常的报错非常好,有中文,指示的错误也非常准确rn但这里似乎,异常的中文信息不能打印出来,都是问号'?' 但是网页中是可以输出中文的rn;另外,这个错误号好像在ODBC的msdn中找不到,这是jdbc自己的错误类型吗》rn为何jdk的文档都没有这方面的信息呢》?rnrn看不出错误类型,实在不好调试;哪位高手能否指点一二?rnrn那位能帮忙看看这是怎么回事》?rn多谢了!rn
异常问题?
<em>一个</em>结构:rnrnstruct TToknInfornrn TToknInfo *next_p; rn TToknInfo *bfor_p; rn int tkn_lct; rn int tkn_len; rn int tkn_ent; rn int tkn_line; rn TTokn_attr tkn_attr; rn TToknInfo *Idx; rn;
activeMQ的一个简单的demo
<em>一个</em>activeMQ的demo,直接导入项目就可以运行,jar以及具体实现方法,配置文件等都是齐全的!
快速上手一个ActiveMQ
JMS 什么是JMS JMS即Java消息服务(Java Message Service)应用程序接口,是<em>一个</em>Java平台中关于面向消息中间件(MOM)的API,用于在两个应用程序之间,或分布式系统中发送消息,进行异步通信。Java消息服务是<em>一个</em>与具体平台无关的API,绝大多数MOM提供商都对JMS提供支持 。 JMS的接口在import javax.jms中。而我们常用的ActiveMQ、Rab...
activemq一个问题
第一次发送的时候偶尔收到的是 ActiveMQObjectMessage {commandId = 5, responseRequired = true, messageId = ID:ezreal_computer-50749-1541044252329-1:16:1:1:1, originalDestination = null, originalTransactionId = null, p...
请问一个activemq的问题!
小弟是刚刚学习<em>activemq</em>,从官网下载了5.7.0,启动了amq后运行了demo里面chat,然后自己建了个工程,引入了<em>activemq</em>-all-5.7.0.jar,<em>activemq</em>-core-5.7.0.jar等包,按照demo里面的写法写了如下:rn rn rn rn
UNIX Hints Hacks下载
unix黑客秘笈,henduounixhekedchengmshu 相关下载链接:[url=//download.csdn.net/download/shantian/1964419?utm_source=bbsseo]//download.csdn.net/download/shantian/1964419?utm_source=bbsseo[/url]
串口通信程序应用剖析下载
计算机通信是指计算机与外部设备、计算机与计算机之间进行的数据传输和交换。从通 信方式上可以把计算机通信分为并行通信和串行通信,其中串行通信指的是数据一位一位传 输的方式。与数据多位同时传输的并行通信相比,串行通信具有占用硬件资源少的优点,特 别适用于远程通信;但是由于数据在计算机内部是并行传送和处理的,串行通信必需进行串/ 并转换和并/串转换,所以增加了设备的复杂性和通信的时间开销,也即在相等条件下串行通 信比并行通信慢。 相关下载链接:[url=//download.csdn.net/download/just_4_you/2336797?utm_source=bbsseo]//download.csdn.net/download/just_4_you/2336797?utm_source=bbsseo[/url]
Advanced HostMonitor keygen-8.54有效下载
HostMonitor 8.54 版本有效 8系列的都可以试试。 外加 IP-tools 、log Aaanalyzer、rma manager 注册 好东西! 10分不算什么。 相关下载链接:[url=//download.csdn.net/download/lbbbx/2394901?utm_source=bbsseo]//download.csdn.net/download/lbbbx/2394901?utm_source=bbsseo[/url]
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法
我们是很有底线的