quartz配置完不执行也不报错,帮忙看看哪的原因。 5C
<bean id="EventNotificationDao" class="cn.secure.dao.EventNotificationDao">
    <property name="jdbcTemplate" ref="jdbcTemplate" />
</bean>

<bean id="EventNotificationService" class="cn.secure.service.impl.EventNotificationServiceImpl">
    <property name="EventNotificationDao" ref="EventNotificationDao" />
</bean>

<bean id="myTask" class="cn.secure.web.front.EventNotificationController">
    <property name="EventNotificationService" ref="EventNotificationService" />
</bean>
    <!--定时任务 -->
<bean id="upgradeJobDetail1" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
    <property name="targetObject" ref ="myTask" />
    <property name="targetMethod" value="addHttpNowData" />

</bean>
    <bean id="upgradeTrigger1" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
    <property name="jobDetail" ref="upgradeJobDetail1" />
    <property name="cronExpression" value="0/2 * * ? * *"/>
</bean>             
    <!-- 线程执行器配置,用于任务注册 -->
<bean id="executor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
    <property name="corePoolSize" value="10" />
    <property name="maxPoolSize" value="100" />
    <property name="queueCapacity" value="500" />
</bean>

<!-- 设置调度 开启定时任务 -->
<bean  
  class=" org.springframework.scheduling.quartz.SchedulerFactoryBean">
      <property name="jobDetails">
        <list>

            <ref bean="upgradeJobDetail1"/>
        </list>
    </property>

    <property name="triggers">
        <list>

        <ref bean="upgradeTrigger1"  />
    <!--     -->

            <!-- drill删除后需要注释掉 :每小时插入一次临时攻击数据 <ref bean="upgradeTrigger" />-->
            <!-- drill删除后需要注释掉 :每小时为漏洞页面和安全事件页面加缓存 <ref bean="cacheTrigger" />-->
            <!-- drill删除后需要注释掉 :每月插入一次临时数据 <ref bean="upgradeTrigger1" />-->
            <!-- 给态势页面的orgId=23,51的研究所的网站风险等级列表和主机风险等级列表加上前四个季度的缓存 -->
            <!-- <ref bean="upgradeTrigger2" /> -->
            <!-- 资产页面的四个季度数据加缓存 -->
            <!-- <ref bean="cacheTrigger2" /> -->
            <!-- (以后扩展用,现在没用)每个月从exhibit_cnic_host_bugs_list表里取安全等级为高的前四个季度数据,写入到exhibit_sino_host_bugs_list表里:<ref bean="upgradeTrigger3" /> -->
        </list>
    </property>

    <property name="taskExecutor" ref="executor" />

</bean>

4个回答


    <ref bean="upgradeTrigger1"  />
<!--     -->

        <!-- drill删除后需要注释掉 :每小时插入一次临时攻击数据 <ref bean="upgradeTrigger" />-->
        <!-- drill删除后需要注释掉 :每小时为漏洞页面和安全事件页面加缓存 <ref bean="cacheTrigger" />-->
        <!-- drill删除后需要注释掉 :每月插入一次临时数据 <ref bean="upgradeTrigger1" />-->
        <!-- 给态势页面的orgId=23,51的研究所的网站风险等级列表和主机风险等级列表加上前四个季度的缓存 -->
        <!-- <ref bean="upgradeTrigger2" /> -->
        <!-- 资产页面的四个季度数据加缓存 -->
        <!-- <ref bean="cacheTrigger2" /> -->
        <!-- (以后扩展用,现在没用)每个月从exhibit_cnic_host_bugs_list表里取安全等级为高的前四个季度数据,写入到exhibit_sino_host_bugs_list表里:<ref bean="upgradeTrigger3" /> -->
    </list>
</property>

打开一个注释

qq_17025903
南归北隐 <ref bean="upgradeTrigger1" />
一年多之前 回复

图片说明

jning1115
老枪92 回复qq_17025903: <bean name="startQuertz" lazy-init="false" autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref bean="upgradeTrigger1" /> </list> </property> </bean>
一年多之前 回复
jning1115
老枪92 <bean name="startQuertz" lazy-init="false" autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref bean="upgradeTrigger1" /> </list> </property> </bean>
一年多之前 回复
qq_17025903
南归北隐 不管用。。
一年多之前 回复

听别的程序员说原先还能用的,感觉应该不是代码的问题,jar包也有啊。。我艹。。。

jning1115
老枪92 加上lazy-init="false"也不能用?你之前没有加这个会懒惰加载
一年多之前 回复

已经解决,因为log jar包冲突

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
quartz 不执行也不报错是怎么回事
rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn任务类rnpublic class EveryWeekTask extends QuartzJobBeanrnrn @Overridern protected void executeInternal(JobExecutionContext arg0)rn throws JobExecutionException rn System.out.println("111111"); rn rnrnrnrn不执行也不报错rn请高手指教rn
事件不执行,也不报错
在ftl里面的如下语句,双击事件既不执行,也不报错   &amp;lt;TR class=&quot;tdbg&quot; id=&quot;row${bean_index}&quot; onClick=&quot;onTrClick(this);&quot; ondblclick=&quot;onGetInfo('${key}');&quot;  /&amp;gt;   最后发现上次修改的时候tr后面多了一个/,去掉就好了。 &amp;lt;TR class=&quot;tdbg&quot; i
JSONObject.fromObject,JSONArray.fromObject不执行,也不报错
JSONObject.fromObject,JSONArray.fromObject能输出(进入了jsons),但是执行到JSONObject.fromObject就不执行了,也不报错,请指教,下面有项目的架包。
JSON问题 不执行也不报错
for(int i=0;i
Java代码不执行也不报错(Maven项目)
        背景:厂商反馈说中间件的客户端在被调用过程中不报错也不继续往下执行。         代码:分析得出的问题代码如下,在新建SDKClient实例时,将调用第二段代码构造器,但发现第二段代码中连第一个System.out.println都不打印。 SDKClient client = new SDKClient(); public SDKClient() { Syst...
链表的add不执行也不报错
**求大神解答,products是范型为Product的List,执行到products.add(product)的时候总是停下,也不报错,这是什么原因啊?**
ASP不报错, 不执行???
整个页面如下, 竟然不报错, 把SQL查询语句写对了, 也不执行, 重装过IIS, 最后系统都重新GHOTS了, 但还是不报错, 不执行,其它的页面有相同的程序,可以正常执行rnrnrn<%set rs=server.createobject("adodb.recordset")rn sql="select * from"rn rs.open sql,conn,1,1 %>rn rn <%=rs("content")%>rn <% call closetable(rs)rn call closeconn()%>
配置 quartz 报错
错误信息:nested exception is java.lang.NoSuchMethodError: org.quartz.JobDataMap.put(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;后来发现是quartz这个jar包的版本太低,改到2.2.1就解决了 &amp;lt;dependency&amp;gt;&amp;lt;groupId&amp;...
大家帮忙看看获取网页源码的问题.为什么不执行也不报错!
[code=C#]rnrnprivate void axWebBrowser1_NavigateComplete2(object sender, AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event e)rn rnAxSHDocVw.AxWebBrowser axWebBrowser1 = (AxSHDocVw.AxWebBrowser)sender;rnmshtml.HTMLDocument mydoc = (mshtml.HTMLDocument)axWebBrowser1.Document;rnstring mystr = mydoc.body.innerHTML;rnMessageBox.Show(mystr);rnrnrn[/code]rn但是得不到mystr ,不执行.也不报错.请问是哪的问题?
大家帮忙看看,这段代码怎么不执行啊,也不报错
[code=csharp]using System;rnusing System.Collections.Generic;rnusing System.Web;rnusing System.Web.UI;rnusing System.Web.UI.WebControls;rnusing System.Data.SqlClient;rnusing System.Configuration;rnusing System.Data;rnrnpublic partial class transformone : System.Web.UI.Pagernrn public string userid = "";rn public string ser = "";rn public string are = "";rn protected void Page_Load(object sender, EventArgs e)rn rn if (!Page.IsPostBack)rn rn userid = Request["username"].ToString();rn //ser = Request["server"];rn //are = Request["Area"];rn this.bind();rn rn rn protected void bind() rn rn if (Request["username"].ToString()!=null||Request["username"].ToString()!="")rn rn SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ddd"].ToString());rn con.Open();rn SqlCommand cmd1 = new SqlCommand("select * from Gifts where userid=@userid",con);rn cmd1.Parameters.Add("@userid",SqlDbType.VarChar).Value=Request["username"].ToString();rn cmd1.ExecuteNonQuery();rn DataTable dt = new DataTable();rn dt.Load(cmd1.ExecuteReader());rn if (dt.Rows.Count>0)rn rn SqlCommand cmd2 = new SqlCommand("update Gifts set Treasures=@Treasures,RegisterTime=@RegisterTime where userid=@userid",con);rn cmd2.Parameters.Add("@userid", SqlDbType.VarChar).Value = Request["username"].ToString();rn cmd2.Parameters.Add("@Treasures", SqlDbType.VarChar).Value = "光涛信物";rn cmd2.Parameters.Add("@RegisterTime", SqlDbType.DateTime).Value = DateTime.Now;rn cmd2.ExecuteNonQuery();rn con.Close();rn rn rn elsern rn con.Open();rn SqlCommand cmd = new SqlCommand("insert into Gifts(userid,Treasures,RegisterTime) values(@p1,@p2,@p3)", con);rn cmd.Parameters.Add("@p1", SqlDbType.VarChar).Value = Request["username"].ToString();rn cmd.Parameters.Add("@p2", SqlDbType.VarChar).Value = "光涛信物";rn cmd.Parameters.Add("@p3", SqlDbType.DateTime).Value = DateTime.Now;rn cmd.ExecuteNonQuery();rn con.Close();rn //Response.Redirect("PledgeFor.aspx?username="+userid);rn rn rn rn[/code]
mysql数据库老报错,是什么原因?帮忙看看
Unable to connect to any hosts due to exceptirnon: java.net.SocketException: Socket is not connected: connect
不显示错误,也不执行????
rnrn<%rndim user_name,user_type,expiretime,moditimern user_name=trim(request.form("user_name"))rn user_type=trim(request.form("user_type"))rn expiretime =trim(request.form("expiretime"))rn newtime=dateadd("m",expiretime,date)rn rn moditime=date()rnselect case user_typern case "gc"rn conn.execute "update user_main set gc='1',moditime=moditime,expiretime=expiretime where user_name='"&user_name&"'"rn case "jc"rn conn.execute "update user_main set jc='1',moditime=moditime,expiretime=expiretime where user_name='"&user_name&"'"rn rnend selectrn response.redirect"modiuser.asp"rn Conn.closern%>rn rn
[完] dealloc不调用的原因
① 有计时器没有invalidate掉,这里要注意,先[_timer invalidate];然后再_timer = nil;就OK了; ② 有循环引用强引用造成的; ③ delegate没有取消也会造成影响;  ...
帮忙看看哪错了!
请帮我看看哪里错了,我JS是白痴! 呵呵,我想判断姓名是汉字 和 身份证号码是15位或18位! 下面的代码分开可以用,但我不会整合! 帮我改一下!rnrn非常感谢提供代码的两位兄弟。谢谢了!rnrn rn rnrn rn 姓 名:rnrnrn *rnrnrn rn 身份证号码:rnrn rnrn*rnrn rn
帮忙看看哪错了?
#include rnvoid swap(int *x,int *y)rnint t;rn t=*x;rn *x=*y;rn *y=t;rnrnvoid inv(int *x,int *y,int *z)rnif(*x<*y) swap(*x,*y);rn if(*y<*z) swap(*y,*z);rn if(*x<*y) swap(*x,*y);rnrnvoid main()rnint a,b,c,*p1=&a,*p2=&b;*p3=&c;rnscanf ("%d,%d,%d",p1,p2,p3);rnprintf("a=%d,b=%d,c=%d\n",a,b,c);rninv(a,b,c);rnprintf("max=%d,,mid=%d,min=%d\n",*p3,*p2,*p1);rnrncannot convert parameter 1 from 'int' to 'int *'rn这是什么??rn该怎么改呢?rnps:最近我在学指针rnrn
帮忙看看哪错了?
String ed1;rn String ed2;rn if ((Edit1->Text!="")&&(Edit2->Text!=""))rn rn ed1=Trim(Edit1->Text);rn ed2=Trim(Edit2->Text);rn LoginForm->ADOQuery1->Close();rn LoginForm->ADOQuery1->SQL->Clear();rn //关键可能是这个地方>>>rn LoginForm->ADOQuery1->SQL->Add("select * from login_table where ((login_name="+ed1+")&&(login_password="+ed2+"))");rn LoginForm->ADOQuery1->Open();rn //以上<<<<<<RecordCount!=0)rn rn MessageBox(LoginForm->Handle,"登录成功!欢迎使用学生管理信息系统!","信息提示",MB_OK+MB_ICONINFORMATION+MB_SYSTEMMODAL);rn LoginForm->Close();rn LoginForm->ModalResult = 8;rn rn elsern MessageBox(LoginForm->Handle,"用户名或密码错误!请重新输入!","信息提示",MB_OK+MB_ICONINFORMATION+MB_SYSTEMMODAL);rnrn rn rn elsern MessageBox(LoginForm->Handle,"用户名和密码均不能为空!","信息提示",MB_OK+MB_ICONINFORMATION+MB_SYSTEMMODAL);rnrn编译的时候没有错误,为什么一运行的时候就出错了呢?rn
帮忙看看哪错了
学生的记录由学号和成绩组成,N名学生的数据已在主函数中放入结构体数组s中,请编写函数fun,它的功能是:把分数最低的学生数据放在h所指的数组中,注意:分数最低的学生可能不止一个,函数返回分数最低的学生的人数。rn#includern#define M 5rnstruct studentrnrn int number;rn float score;rn;rnint fun(struct student *h,struct student *stud)rnrn int min=0,k,num=0,m=0;rn for(k=0;k
帮忙看看哪错了,
using System;rnusing System.Collections;rnusing System.Configuration;rnusing System.Data;rnusing System.Linq;rnusing System.Web;rnusing System.Web.Security;rnusing System.Web.UI;rnusing System.Web.UI.HtmlControls;rnusing System.Web.UI.WebControls;rnusing System.Web.UI.WebControls.WebParts;rnusing System.Data.SqlClient;rnusing System.Xml.Linq;rnrnnamespace Jingcairnrn public partial class _Default : System.Web.UI.Pagern rnrn protected void Page_Load(object sender, EventArgs e)rn rn if (Session["Username"] == null)rn rn Response.Redirect("login.aspx");rn return;rn rn elsern rn SqlConnection con = new SqlConnection("server=127.0.0.1;database=Toupiao;uid=sa;pwd=sa");rn con.Open();rn int username = int.Parse(Request.QueryString["username"].ToString());rn SqlDataAdapter sd2 = new SqlDataAdapter("select * from Usermain where Username='" + username + "' ", con);rn DataSet ds2 = new DataSet();rn sd2.Fill(ds2);rn TextBox2.Text = Session["Username"].ToString();rn TextBox3.Text = ds2.Tables[0].Rows[0]["Gold"].ToString();rn rnrn rnrn protected void Button1_Click(object sender, EventArgs e)rn rnrn rn rnrnrn现在提示int username = int.Parse(Request.QueryString["username"].ToString());rn未将对象引用到实例
帮忙看看哪的错
rnrn<%rnname = request.querystring("id")rn rnstrconn = "Driver=SQL Server;SERVER=127.0.0.1;UID=sa;Password=123;DATABASE=DFGG_Pre" rnset conn = server.createobject("adodb.connection") rnconn.open strconn rnrnset rs=server.createobject("adodb.recordset")rnsql="select amount,out,owe,new,acc,markam,markout,markowe,markding,markloss,markpro,marksub,pro,sub,lost from section where name='"&name&"'" rnrs.open sql, conn, 1, 1rnif not rs.eof then rnamount=rs("amount")rnout = rs("out")rnowe = rs("owe")rnacc = rs("acc")rnnew = rs("new") 这行有错 删掉后出现Expected 'End'错误rnmarkam =rs("markam")rnmarkout = rs("markout")rnmarkowe = rs("markowe")rnmarrkding = rs("markding")rnmarkpro = rs("markpro")rnmarkloss = rs("markloss")rnmarksub = rs("marksub")rnsuba = rs("sub")rnlost = rs("lost")rnrnrs.closernset rs=nothingrnconn.closernset conn=nothingrnrn%>rn
帮忙看看哪错了,
CountSQL="select count(*) from (" & sql & ")"rn CountRS.Open CountSQL,conn,1,3 rn CountRecord = CountRS("count(*)")rn n=CountRecord / 12rn response.write n
帮忙看看哪错了。
Printer.CurrentX = 500rn Printer.CurrentY = ROWSETrn Printer.Print "1111111111111111111111111111111111"rn Printer.EndDocrn lret = OpenPrinter(Printer.DeviceName, mhPrinter, pDef)rn lret = GetJob(mhPrinter, 1, 1, PJOB, 2000, 2000)rnrn各类型已定义。可以运行,mhPrinter 已有数据返回,LRET 返回0,PJOB 返回0 ,没有获得PJOB的信息。rnrn怎样才可获得有信息的返回?rnrnPJOB 是 BYTE 类型。如何取得其中的STATUS信息?rnrn
Quartz任务不执行问题
搞了半天,原来有错误,但是为什么不报错了,原来QUARTZ使用的是SLF4J 所以需要slf4j-log4j的包 错误信息才会打印
C#中 timer 控件不执行也不报错怎么回事?
rnprivate void timer1_Tick(object sender, EventArgs e)rn rn string strTime = "";rn //星期一rnrn if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 1)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 2)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn //星期三rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 3)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn //星期四rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 4)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn //星期五rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 5)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn //星期六rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 6)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rnrn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn //星期日rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 7)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn rnrn面板里面 checkBox1 选中 ,在textBox1.Text 文本框里输入 比如 17:20 Interval 属性设置为 1,超过这个时间也不执行相应的代码?rn
有关row = ps1.executeUpdate();不执行也不报错的问题
我想做个注册系统,之前运行的都好好的,但把数据库清空过一次后就出问题了。代码如下rntryrn rn Connection conn = null;rn ResultSet rs = null;rn Class.forName("com.mysql.jdbc.Driver");rn String url = "jdbc:mysql://localhost:3306/jimoran";rn String name = "root";rn String pass = "85452565";rn conn = DriverManager.getConnection(url,name,pass);//此句为被执行!rn %><%="OK1"%><% //此举被运行rn rn if(conn == null)rn rn %>数据库无法连接!<%rn %><%="OK3"%><% //正确rn rn rn else if(Password.equals(Againpass) == false)rn rn %>两次密码不一致!<%rn %><%="OK5"%><% //正确rn rn rn else if(IDnumber.length()<15||IDnumber.length()>19)rn rn %>请输入正确的身份证号码!<%rn %><%="OK4"%><% //正确rn rnrn rnrn elsern rn %><%="OK2"%><% //yunxinrn String sql = "select username from RegistTable where username = '"+Username+"'";rn %><%="OK6"%><% //运行rn PreparedStatement ps = conn.prepareStatement(sql);rn %><%="OK7"%><% //运行到这里rn rs = ps.executeQuery();//运行rn %><%="OK8"%><% rn rn if(rs.next())rn rn %>用户名已经存在!<%rn rn rn elsern rn %><%="OK9"%><% rn String sql1 = "insert into RegistTable values(?,?,?,?,?,?,?,?,?)";rn %><%="OK10 "%><% rn PreparedStatement ps1 = conn.prepareStatement(sql1);rn %><%="OK11 "%><% rn ps1.setString(1,Username);rn ps1.setString(2,Password);rn ps1.setString(3,realname);rn ps1.setString(4,IDnumber);rn ps1.setString(5,age);rn ps1.setString(6,gender);rn ps1.setString(7,telephone);rn ps1.setString(8,actor);rn ps1.setString(9,major);rn %><%="OK12 "%><% rn int row = -1; rn row = ps1.executeUpdate();//不运行,也不报错rn %><%="OK13 "%><% rn if(row > 0)rn rn %><%="OK14 "%><% rn %>注册成功!<%rn rn rn rn ps.close();rn rn rs.close();rn rn rn catch(Exception e)rn rn %><%="OK15 "%><% rn %>注册失败!<%rn e.printStackTrace();rn rnrn我用"%><%=OKXX %>"找哪句话没执行的,结果显示“OK1OK2OK6OK7OK8OK9OK10 OK11 OK12 OK15 注册失败!”
帮忙看看为什么slot不执行
[code=c]#include "networkget.h"rnrnNetWorkGet::NetWorkGet(QUrl url, QString filename)rnrn file = new QFile("./temp/"+filename);rn file->open(QIODevice::WriteOnly|QIODevice::Text);rn //获取网络图片rnrn manager = new QNetworkAccessManager(this);rnrn connect(manager, SIGNAL(finished(QNetworkReply*)),rn this, SLOT(replyFinished(QNetworkReply*)));rn manager->get(QNetworkRequest(url));rnrnrnrnvoid NetWorkGet::replyFinished(QNetworkReply *reply)rnrn if(reply->error() == QNetworkReply::NoError)rn rn file->write(reply->readAll());rn file->close();rn file->flush();rn delete file;rn file = 0;rn rnrn[/code]rnrn[code=c]int main(int argc, char *argv[])rnrn QApplication a(argc, argv);rnrn NetWorkGet *n = new NetWorkGet(QUrl("http://api.bilibili.cn/bangumi"),"bangumi");rn //MainWindow w; // 这么写槽执行rn //w.show();rn return a.exec();rnrn[/code]rnrn[code=c]MainWindow::MainWindow(QWidget *parent) :rn QMainWindow(parent),rn ui(new Ui::MainWindow)rnrn NetWorkGet *n = new NetWorkGet(QUrl("http://api.bilibili.cn/bangumi"),"bangumi");rn ui->setupUi(this);//写在mainwindow 槽不执行 不知道怎么回事 rn[/code]
servlet内部跳转if语句不执行,也不报错
n else if ("shoppingCartBooks".equals(flag)) n String username = req.getParameter("username"); n System.out.println(username+"****"); n if (username != null) n List list = bs.getAllBooksInShoppingCart(username); n req.setAttribute("list", list); n req.getRequestDispatcher("jsp/shopping.jsp").forward(req, resp); n else if(username==null) n //req.setAttribute("errorMess", "请登录!"); n System.out.println("跳转了!!"); n req.getRequestDispatcher("BookServlet?flag=allBooks").forward( n req, resp); n n n 一切正常,username也为空,打出来看了,也取到了,唯独,不进入if()条件句里面,怎么回事??也没有异常!!一切正常!!
sharepoint 2010 farm solution Microsoft.Office.Interop.Word.Save()不执行也不报错
本人遇到一超级奇葩问题,求大神们指点rn环境:Sharepoint2010企业版+SQLServer2008R2+Office2010 32bitrnrn下面这段代码是点击Infopath表单中一个按钮,然后执行编辑WordrnInfoPath表单是office 2010 64bit开发的rn代码:rntryrn...rn logger.LogMessage("开始打开word");rn.....rn logger.LogMessage("开始保存");rn WordDoc1.Save();rn WordDoc2.Save();rn // WordDoc1.Close();rn WordDoc1.Close(ref Nothing, ref Nothing, ref Nothing);rn WordDoc2.Close(ref Nothing, ref Nothing, ref Nothing);rn logger.LogMessage("保存结束");rn catch (Exception e)rn rn logger.LogMessage("异常:" + e.Message.ToString());rn WordApp.Quit(ref Nothing, ref Nothing, ref Nothing);rn WordApp = null;rn rn查看log信息时,rn开始打开wordrn开始保存rnrn问题出现了:竟然没有打正常日志,也没有报错误信息rnrn我将这一块的代码抽出来,建一个Winform程序,在服务器端执行,正常运行,是不是Sharepoint有什么配置没有配啊
spring3.0 + quartz 不执行
用quartz做一个定时任务。rnxml文件都配置好了,但是不执行,也不报错。rn请问是什么原因。rn[code=XML]rn rn rnrn rn rn rn rn rn rn startrn rn rn rn rn rn rn rn rn startrn rn rn rn rn rn rn rn rn 0 30 11 * * ? rn rn rn rn rn rn rn rn rn 0 30 11 * * ?rn rn rn rn rn rn rn rn rn rn rn rn rn[/code]
求教:Console.WriteLine不执行,也不报错,程序直接中断
我使用了一个线程定时器,定时输出一些东西。debug下,发现在定时器里的Console.WriteLine()不仅不执行,还会引起程序中断,并不报错。rnrn[code=csharp]static void Main(string[] args)rn rn T1 t = new T1();rnConsole.ReadKey();rnrnclass T1rnrnpublic System.Threading.Timer CloseTimer = new System.Threading.Timer(StartAndClose, null, 0, 6000);rnpublic void StartAndClose(object sender)rn rn Console.Clear();//这句执行没问题rn Console.WriteLine("Now Start To Connect...");//执行到这句,程序就中断了rnint i = 3+4; //这句压根执行不到rnrnrnrnrnrn[/code]
紧急求助: Cmd.ExecuteNonQuery()死活不执行,也不报错!
asp.net 用c#写的,上传音乐文件到指定的文件夹可以,但把相关信息写到数据库时,Cmd.ExecuteNonQuery()却怎么也不执行;rnrn string StrSql = "Insert Into qm (歌曲名称,演唱者,类别,点击次数,时间,编号) values ('" + title + "'," + content + "','" + ptype + "','0','" + DateTime.Now.ToString("yyyyMMdd").ToString() + "','" + ImageName + "')";rnrn OleDbCommand Cmd = new OleDbCommand(StrSql, MyConn);rnrnrn MyConn.Open();rnrnrn Response.Write("文件开始上传之前为:" + StrSql); //这里能显示rnrn Cmd.ExecuteNonQuery();//到这里不执行了,也不报错rnrn Response.Write("文件开始上传之后为:" + exName);//这里就不显示了rn MyConn.Close();rn Response.Write(" ");rnrnrn请高手帮忙看看!rn
急求啊,setInterval不执行,firebug也不报错
rnrn rn rnrnrn rn rn rnrnrnrn rnrn
if语句不执行。。。请帮忙看看
下面的2个if语句都不执行,请帮忙看看。谢谢!rn[code=C#] private void Entry1()rn rn loginDAL logindal = new loginDAL();rnrn login user=logindal.getUserInfo(this.txtName.Text.Trim());//根据登陆名取该用户信息rn if (user!= null)rn rn if (user.PassWord.Equals(this.txtPwd.Text.Trim()))rn rn Session.Add("User",user.UserName);rn Response.Redirect("addobject.aspx");rn rn rn this.LabMessage.Text = "用户名或密码错误!";rn [/code]rnrn [code=C#] #region//根据UserId得到一个用户信息对象rn public login getUserInfo(string UserId)rn rn //用户名、密码rn string commandText = "select UserName,PassWord from objadmin where UserName='" + UserId + "'";rnrn DBHelper helper = new DBHelper();rn SqlDataReader result = helper.getExecuteReader(commandText);rn if (result != null && result.Read())rn rn login user = new login();rn user.UserName=result.GetString(0);rn user.PassWord=result.GetString(1);rn return user;rn rn return null;rn rn #endregion[/code]rnrnDBSQLrnrn [code=C#] public SqlDataReader getExecuteReader(string commandString, SqlParameter[] param)//带参数 返回查询结果集的方法rn rn SqlCommand com = this.getCommand(commandString, param);rn return com.ExecuteReader();rn rn[/code]
帮忙看看为啥不执行呢?
[code=C#]rnrn protected void Page_Load(object sender, EventArgs e)rn rn if (Request.QueryString["id"] != null)rn rn atrilID = Convert.ToInt32(Request.QueryString["id"]);//得到文章idrn article = bllArticle.GetModel(atrilID);rn if (article==null) //输入的id不存在。rn rn ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert(' 错误文章ID,面页即将关闭!');this.close()", true);rn rn rn elsern rn asArticle();rn rn rn rn else rn rn ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert(' 错误文章ID,面页即将关闭!');this.close()", true);rn rn rn rn[/code]rnrn最下面的 警告窗口可以执行,但是为啥中间的警告就是不出来~~
请帮忙看看这是为什么.不报错.
我写了以下三个文件.可是在加入数据连接后运行不像我没加前的效果.是不是我的BEAN文件写错了呀.rn其目的是想比较用户从Hello.jsp页传过的数据在数据库中有没有.rnrnHello.jsprnrn<%@page contentType="text/html;charset=gb2312"%>rn<%@page language="java"%>rn<%@ page import="java.io.*"%>rnrnrnrn rn请输入用户名:rn rn rnrnrnrnrnrnrnrnrnrnBean.javarnrnpackage be;rnrnimport java.sql.*;rnrnpublic class Beanrn java.sql.Connection sqlConn;rn java.sql.Statement sqlStmt; rn java.sql.ResultSet sqlRst; rn rn rn private String username;rn //********************************rn public Bean()rn username="系统提示:请您输入信息.";rn rn rn public String getUsername()rn return username;rn rn rn public void setUsername(String name)rn如果在此处不用以下代码.只写username=name;这样就返回用户前台所输数据.如果用以下的就只显示系统提示:请您输入信息 好像此处代码没有被运行rn tryrn Dateconn con = new Dateconn(); rn sqlConn = con.getConnection();rn sqlStmt = sqlConn.createStatement();rn //***********************************rn sqlRst=sqlStmt.executeQuery("select * from yjje where name='"+name+"'");rn if(sqlRst.next()) rn username=name+" User Good"; rn //****************************user okrn sqlRst.close(); //close datern sqlStmt.close();rn sqlConn.close();rn rn elsern username=name+" name is Error.";rn rn //*******************************************rn rn catch(Exception ex)rn System.out.println(ex.toString());rn rn rn rnrnrnrnDateconn.javarnrnpackage be;rnimport java.sql.*;rnimport java.io.*;rnpublic class Dateconnrn rn private Connection con=null;rn rn //-----------Goucao Functionrn public Dateconn()rn Date_Conn();rn rn rn public void Date_Conn() //Link Datern tryrn Class.forName("org.gjt.mm.mysql.Driver");rn con = DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql?user='root'&password=''");rn catch(Exception ex)rn System.out.println(ex.toString());rn rn rn //------------rn public Connection getConnection() //Get Datern if(con!=null)rn Date_Conn();rn return this.con;rn rn //------------rn public void close() //Close Datern tryrn con.close();rn con=null;rn catch(Exception ex)rn System.out.println(ex.toString());rn rn rn rn //-------rn rn
求帮忙看看原因
代码:rnrn var formPanel = new Ext.FormPanel(rn id : "fmp",rn collapsible : true,rn labelWidth : 70,rn autoHeight : true,rn frame : true,rn bodyStyle : 'padding:5px 5px 0',rn width : 380,rn height : 300,rn // renderTo : 'formdiv',rn defaults : width : 230,rn defaultType : 'textfield',rn items : [rn rn fieldLabel : '用户名',rn id : 'username',rn name : 'username'rn ,rn fieldLabel : '密码',rn id : 'pwd',rn name : 'pdw'rn rn ]rn );rn // 定义窗口 rn var win = new Ext.Window( rn title : '添加信息',rn layout : 'fit',rn width :400,rn height : 380,rn closeAction : 'close',rn closable : true,rn plain : true,rn modal : true,//遮罩层rn items : [formPanel],rn buttons : [ rn rn text : '确定',rn handler : function() rn , rn text : '取消',rn handler : function() rn win.close();rn rn rn ]rn );rn win.show();rnrn在FF上运行正常,在IE上报错:rn[img=https://img-bbs.csdn.net/upload/201307/25/1374724571_931635.jpg][/img]rn[img=https://img-bbs.csdn.net/upload/201307/25/1374724665_118496.jpg][/img]
帮忙看看是什么原因
_RecordsetPtr m_pRecordset;rn m_pRecordset.CreateInstance(__uuidof(Recordset));rn tryrn AfxMessageBox("hdddasssh");rn m_pRecordset->Open("SELECT * FROM user",rn _variant_t((IDispatch*)m_pConnection,true),rn adOpenDynamic,rn adLockOptimistic,rn adCmdText); //程序运行到这的时候出现一个runtime errorrn AfxMessageBox("hasssh");rn rn catch(_com_error *e)rn AfxMessageBox(e->Description());rn rnrn在vc中用ADO连接数据库,m_pConnection是_ConnectionPtr,初始化没问题rnm_pConnection.CreateInstance(__uuidof(Connection));rn tryrn m_pConnection->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.mdb","","",adModeUnknown);rn rn catch(_com_error e)rn AfxMessageBox("数据库连接失败,确认数据库Demo.mdb是否在当前路径下!");rn return FALSE;rn rnrn菜鸟问题,帮帮忙,100的送
spring+quartz任务调度为什么没有报错,也不执行
[code=html]rn rn rn rn rn rn rn rn rn rn rn rn rnrn[/code]rnrn[code=java]package test;rnrnpublic class TestQuartz rn public void Test()rn System.out.println("我是任务");rn rnrn[/code]rn
jquery为何不报错也不执行
  重要的是这一句     &quot;&amp;lt;?php return redirect('{admin/index/login}');?&amp;gt;&quot;; php即使注释起来也会影响执行
Quartz报错
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.   NOT STARTED.   Currently in standby mode.   Number of jobs executed: 0   Using thread pool 'org.quartz.simpl.SimpleThreadPoo
quartz报错
    今天配置job的时候报了如下错误,很显然是找不到JobDetai类,因为最新的spring-context-support是支持quartz的,以为不需要再引入quartz的包,谁知道在配置文件中,找到JobDetail对应的注入名,进入jar包class源码,发现根本没有这个类,却没有报错,非常不解,于是将quartz的jar包导入之后,就不报这个错了。...
相关热词 c++和c#哪个就业率高 c# 批量动态创建控件 c# 模块和程序集的区别 c# gmap 截图 c# 验证码图片生成类 c# 再次尝试 连接失败 c#开发编写规范 c# 压缩图片好麻烦 c#计算数组中的平均值 c#获取路由参数