使用activeMQ监听,调用mapper时为null怎么解决,请大神帮忙看看 5C

spring文件配置如下:
<?xml version="1.0" encoding="UTF-8"?>
xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-4.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
http://www.springframework.org/schema/jms">

<context:annotation-config/>
<context:component-scan base-package="com.lizx" />

<bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/>

<!-- 定义事务管理器 -->
<bean id="transactionManager"
    class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="dataSource" />
</bean>

<!-- 定义事务策略 -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
    <tx:attributes>
        <!--所有以query开头的方法都是只读的 -->
        <tx:method name="query*" read-only="true" />
        <tx:method name="get*" read-only="true" />
        <!--其他方法使用默认事务策略 -->
        <tx:method name="delete*" propagation="REQUIRED" read-only="false"/>
        <tx:method name="edit*" propagation="REQUIRED" read-only="false"/>
        <tx:method name="add*" propagation="REQUIRED" read-only="false"/>
    </tx:attributes>
</tx:advice>

<aop:config>
    <!--pointcut元素定义一个切入点,execution中的第一个星号 用以匹配方法的返回类型,
        这里星号表明匹配所有返回类型。 com.bw.service.*.*(..)表明匹配com.bw.service包下的所有类的所有 
        方法 -->
    <aop:pointcut id="myPointcut" expression="execution(* com.lizx.app.service.*.*(..))" />
    <!--将定义好的事务处理策略应用到上述的切入点 -->
    <aop:advisor advice-ref="txAdvice" pointcut-ref="myPointcut" />
</aop:config>

 <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
    <property name="dataSource" ref="dataSource"></property>
     <property name="configLocation" value="classpath:conf/SqlMapConfig.xml"></property>
     <property name="typeAliasesPackage" value="com.lizx.app"></property>
</bean>

  <!-- 自动扫描所有的Mapper接口与文件 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
    <property name="basePackage" value="com.lizx.app.mapper"></property>
</bean>

<import resource="classpath*:conf/spring-ActiveMQ.xml" />

activemq配置如下:
<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:jms="http://www.springframework.org/schema/jms"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
http://www.springframework.org/schema/jms
http://www.springframework.org/schema/jms/spring-jms-4.1.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core-5.12.1.xsd">

 <mvc:annotation-driven />  
 <amq:connectionFactory     id="amqConnectionFactory"
        brokerURL="tcp://127.0.0.1:61616" userName="admin" password="admin" />

 <!-- 配置JMS连接工长 -->
<bean id="connectionFactory"
   class="org.springframework.jms.connection.CachingConnectionFactory">
    <constructor-arg ref="amqConnectionFactory" />
    <property name="sessionCacheSize" value="100" />
</bean>
 <!-- 定义消息队列(Queue) -->
<bean id="demoQueueDestination" class="org.apache.activemq.command.ActiveMQQueue">
    <!-- 设置消息队列的名字 -->
    <constructor-arg>
        <value>Jaycekon</value>
    </constructor-arg>
</bean>

 <!-- 配置JMS模板(Queue),Spring提供的JMS工具类,它发送、接收消息。 -->
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
    <property name="connectionFactory" ref="connectionFactory" />
    <property name="defaultDestination" ref="demoQueueDestination" />
    <property name="receiveTimeout" value="10000" />
    <!-- true是topic,false是queue,默认是false,此处显示写出false -->
    <property name="pubSubDomain" value="false" />
</bean>
   <!-- 配置消息队列监听者(Queue) -->
<bean id="queueMessageListener" class="com.lizx.app.MQListener" />
<bean id="queueListenerContainer"
      class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    <property name="connectionFactory" ref="connectionFactory" />
    <property name="destination" ref="demoQueueDestination" />
    <property name="messageListener" ref="queueMessageListener" />
</bean>

在监听中使用为null时的情况
图片说明
在其它地方调用,不为null时的情况:
图片说明

5个回答

MQListener在XML里面声明,那么appmaper也必须在xml中注入

lizexing1
lizexing1 能否详细说下呢,有点不懂
一年多之前 回复


去掉,让spring 扫描注解。
原因是xml 的声明和注解冲突了吧

lizexing1
lizexing1 去掉spring扫描注解其它地方就都不能用了吧,具体怎么处理还是有点不明白您说的,可否详细说下
一年多之前 回复
lizexing1
lizexing1 我这个错貌似给您说的这个没关系吧,没看到
一年多之前 回复

1、确定你的MQListener是否存在com.lizx包下面。
2、确定你的MQListener在调用的时候spring的Application对象已经添加到servlet容器里面,并且servlet容器已经初始化成功。

我怀疑是多个不同applicationContext造成的。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
mapper 判断条件为null
在双引号里面再判断不为空 &lt;if test="name != null and name !=''" &gt; and name = #{name} &lt;/if&gt;
请大神帮忙看看
有一张纸,需要切割二半,纸放在平台上的位置不一样(有时纸歪了一点),但每次都要从纸的中心点切,先用相机拍摄纸的轮郭,然后在得到一个中心线,以及它的长度,rn然后用工控机来调用这个OPENCV里的DLL,来控制步进带动刀片去切割。rnrn用OPENCV怎么计算这个纸的中心线,以及它要切割的长度呢?一定要标定么?rn用距离变换可以吗?rn
Mapper对于数据求和返回值为null怎么解决
在对于数据求和时返回值为null , 报如下错误: 数据库语句如下: SELECT FROM user WHERE user_id =#{userid} and YEARWEEK(date_format(create_time,'%Y-%m-%d')) = YEARWEEK(now())-1 and is_delete!='1' 报错原因:数据库中没有符合该条件记录 , 求和...
大神帮忙看看这个问题怎么解决
用模拟器运行程序时老是闪退!04-10 06:37:43.794 2611-3870/? W/GCM-GMS: Failed to get registration: java.io.IOException: AUTHENTICATION_FAILED04-10 06:38:03.761 3881-3881/? D/AndroidRuntime: &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ...
跪求ActiveMQ大神帮忙
最近一直在将ActiveMQ与Spring进行整合,网上也搜了很多的例子,但是每个例子整合的都有哥问题:rn随着消息不断的发送,Connection的数量一直在增加,我在没有整合之前单独发送消息时,这种情况就意味着不停的再消耗内存,直至内存耗尽。rn请问下各个大神,能不能给我个正确整合的例子啊?给哥很简单的发送个接收的例子就好了,或者给个正确例子的网址也行,谢谢了。
大神帮忙 怎么解决
[img=https://img-bbs.csdn.net/upload/201505/07/1431012129_907772.png][/img]rnjava-ADT eclips中出的问题
请大神看看这个问题怎么解决?
现在的Android系统里面,对于大多数软件,几乎是所有的软件,长按EditText可以弹出一个粘贴按钮。进而实现粘贴功能。那么我如何实现在双击(或者单击三次,反正不要和系统现有的操作冲突就行了)之后,能弹出来一个按钮调用我自己的东西?
请大神帮忙看看这个怎么解决,谢谢!!!
[img=https://img-bbs.csdn.net/upload/201512/02/1449037526_409322.png][/img],求帮忙看看怎么解决,谢谢
标签的使用。请大神帮忙看看!
我的jsp页面rnrn选择标签在jsp页面没有显示出来rnlist的值都是在select标签里直接添加,不需要从数据库里取。现在想把它存到数据库,但是出现下面的错误提示:rn严重: Servlet.service() for servlet jsp threw exceptionrntag 'select', field 'list', name 'good.percen': The requested list key '#1:'9',2:'8',3:'7',4:'6'' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.name - [unknown location]rnrn
使用push指令时出现问题,请大神帮忙看看怎么回事。
使用push指令时总是出现问题,和视频教程上的代码一样 ,可用debug单步执行时总是不成功,下面是代码rnrn[code=text]rnassume cs:code,ss:stack,ds:datarnrnrndata segmentrnrndw 111,222rnrndata endsrnrnstack segmentrnrndw 0,0rnrnstack endsrnrncode segmentrnrnstart: mov ax,stackrn mov ss,axrn mov ax,datarn mov ds,axrn mov bx,0rn mov sp,4rn rn push [bx] ;运行到这句时出现问题rn rn mov ax,4c00Hrn int 21Hrnrncode endsrnrnend startrn[/code]rn用debug单步执行时出现这个提示rn[img=https://img-bbs.csdn.net/upload/201509/07/1441599221_756866.png][/img]rnrn请各位大神帮帮忙,看看这是什么情况,不胜感激!rnrnrn
帮忙看看怎么解决!
怎么去掉从edit.text接收到的'这个符号。就是由于不小心误操做了单引号。怎么去掉单引号。多谢!
请大神帮忙解决一下
请各位大神给出源程序,不胜感激!rnrn1.编写一个C++程序,计算并输出两个无符号大整数m与n的和、差、积、整商及余数(其中| m | ≤ 101000 ,| n | ≤ 101000)。用类来实现这个无符号大整数的和、差、积、整商及求余运算以及插入符(<<)和提取符(>> )的重载。rnrn2.编程求解皇后问题。在m*m的棋盘上有n个皇后(n ≤ m),输出所有合法的皇后排列(即在任何一行、一列或一条对角线上,仅能放置一个皇后)。rnrn3.实现图书馆借书系统,其功能包括:rn申请新的图书证;rn注销图书证;rn图书查询,方式包括按书名、作者、关键字查询等;rn借书(包括续借、预约);rn书到期后,发送还书的通知;rn还书(包括过期罚款);rn读者状态查询;rn读者个人信息修改(包括修改密码)。rnrn4.编写一个C++程序,它能根据读入的某二叉树的中序序列和后序序列(两个英文字母串,每个串长不大于80,各占一行),构造该二叉树,并输出该二叉树的前序序列、叶的个数、二度结点个数及其从根节点开始的最长路径上的各结点。rnrn5.编写一个C++程序,它能根据读入的某带权有向图G的边、权,来构造图G,并输出G的邻接矩阵、拓扑序列、各顶点之间的最短路经。输入时用三个非负整数i、j、w表示一条边(顶点Vi到顶点Vj的边)及该边的权(w);三个-1(-1 -1 -1) 表示输入结束。其中,i和j的值都不大于40,i、j值中最大者再加1是图G的顶点个数。
tomcat Redeploy时出错,请帮忙看看怎么解决
2010-5-5 9:34:29 org.hibernate.impl.SessionFactoryImpl closern信息: closingrnrn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbcrn严重: A web application registered the JBDC driver [org.logicalcobwebs.proxool.ProxoolDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbcrn严重: A web application registered the JBDC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [HouseKeeper] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-2] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-3] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-4] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-5] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-6] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-7] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-8] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-9] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-10] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [DefaultQuartzScheduler_QuartzSchedulerThread] but has failed to stop it. This is very likely to create a memory leak.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Prototype beans currently in creation]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Transactional resources]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Actual transaction active]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Transaction synchronizations]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-5-5 9:34:30 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [null] (value [com.sun.faces.config.ConfigureListener$1@14f4c7a]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn
请高手帮忙看看怎么解决
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>rn<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>rn<%@ page contentType="text/html; charset=gb2312" language="java"%>rnrnrnrnrn<%@page import="java.util.*"%>rnrnrn JSTL:这里是一个简单的JSTL应用rnrn 这里是一个简单的JSTL应用rn<%rnCollection customers=new ArrayList();rncustomers.add(new String("guest1"));rncustomers.add(new String("guest2"));rncustomers.add(new String("guest3"));rnrequest.setAttribute("customers",customers);rn%>rn Customers in the request:rnrnrn rnrn rn现在的时间是:rn rnrnrnrnrnrnrnrnDescription Resource Path Location TypernArrayList is a raw type. References to generic type ArrayList should be parameterized simple.jsp /12t/WebRoot line 15 JSP ProblemrnrnCollection is a raw type. References to generic type Collection should be parameterized simple.jsp /12t/WebRoot line 15 JSP ProblemrnType safety: The method add(Object) belongs to the raw type Collection. References to generic type Collection should be parameterized simple.jsp /12t/WebRoot line 16 JSP ProblemrnType safety: The method add(Object) belongs to the raw type Collection. References to generic type Collection should be parameterized simple.jsp /12t/WebRoot line 17 JSP ProblemrnType safety: The method add(Object) belongs to the raw type Collection. References to generic type Collection should be parameterized simple.jsp /12t/WebRoot line 18 JSP Problemrnrnrn
请帮忙看看这个问题怎么解决?
ArrayList myAL = new ArrayList();rnmyAL.Add(Session["optionArray"]);rnResponse.Write(myAL[0].ToString());rnrnrn其中Session["optionArray"]存一个数组值rnrn为什么myAL[0].ToString()里边没有值呢
请帮忙看看这个问题怎么解决
我建了一个基于对话框的应用程序,然后建立了非模式的对话框,探出这个非模式的对话框来之后,原来的那个对话框一直在下面,我就是想在主对话框上点鼠标让他置顶,点非模式对话框时,让非模式的对话框置顶,好像是用SetWindowPos,不过我用过了,在WM_LBUTTONDOWN消息里面,不行啊!请各为支个招。我的邮箱是bit_1010@sina.com.cn,谢谢啊,在线等。
VC6.0报错,请帮忙看看怎么解决
--------------------Configuration: documenttest - Win32 Debug--------------------rnLinking...rnMainFrm.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CMainFrame::CalcWindowRect(struct tagRECT *,unsigned int)" (?CalcWindowRect@CMainFrame@@MAEXPAUtagRECT@@I@Z)rnDebug/documenttest.exe : fatal error LNK1120: 1 unresolved externalsrnError executing link.exe.rnrndocumenttest.exe - 2 error(s), 0 warning(s)rnrn以前写完了之后编译都通过的,后来不知道改了哪个设置,每个程序都报这个错误,用VS2005编译又可以编过去rn请问怎么解决啊?
帮忙看看!为什么checkbox为null呢?
rn删除rnrnrn request.setCharacterEncoding("GBK");rn int count=0;rn String[] checkbox=request.getParameterValues("isBuy");rn NewsBiz newsBiz=new NewsBiz();rn if(checkbox!=null && checkbox.length>0) rn for(int i=0;i0)rnout.print(" ");rnelsernout.print(" ");rn
请帮忙看看怎么
一个单位转换的工具,我的想法是单击鼠标左键时清空所有文本框的内容,单击鼠标中键时将文本框的内容copy到剪贴板。但是现在碰到一个问题:在文本框输入几次之后,除了文本框,其它控件比如退出按钮都没有反应。难道是MouseUp事件出了问题?rn代码如下。rn[code=csharp]public partial class frmMain : Formrnrn public frmMain()rn rn InitializeComponent();rn txtDm.MouseUp += new MouseEventHandler(txtM_MouseUp);rn txtMm.MouseUp += new MouseEventHandler(txtM_MouseUp);rn LengthConvert lengthConvert = new LengthConvert();rn txtM.DataBindings.Add("Text", lengthConversion, "M", true, DataSourceUpdateMode.OnPropertyChanged);rn txtDm.DataBindings.Add("Text", lengthConversion, "Dm", true, DataSourceUpdateMode.OnPropertyChanged);rn rnrn private void txtM_MouseUp(object sender, MouseEventArgs e )rn rn if (e.Button == MouseButtons.Left)rn rn TabPage tp = tabControl1.SelectedTab;rn ClearValue(tp);rn rn if (e.Button == MouseButtons.Middle)rn rn if (!string.IsNullOrWhiteSpace(((NumbericTextBox)sender).Text))rn Clipboard.SetText(((NumbericTextBox)sender).Text);rn rn rnrn public static void ClearValue(Control parContainer)rn rn //rn rnrnrnrnrnclass lengthConversionrnrn private double mm;rn rn public double Mmrn rn get return mm; rn set mm = value; rn rn public double Mrn rn get return mm / 1000; rn set mm = value * 1000; rn rn public double Dmrn rn get return mm / 100; rn set mm = value * 100; rn rn[/code]
调用webservice时HttpContext.Current为null
我通过jquery ajax进行异步调用我的webservice方法时在Webservice中的HttpContext.Current对象为null是什么问题[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/1.gif][/img]
为什么我注入mapper为null啊?
我在service中注入mapper debug却是null  自动扫描什么的都配置了
.net 图片上传字节为0,请大神帮忙看看什么问题!!
首先上后台代码,上传到服务器上,图片字节有的是0,有的又是正常的。会不会跟手机型号有关系啊?项目就是微信公众号里的网页开发rn[code=csharp]public ActionResult UpLoadMindPic()rn rn if (Request.Files.Count <= 0)rn rn return Content("");rn rn List allPah = new List();rn foreach (string uploadFile in Request.Files)rn rn //获取文件的保存路径rn HttpPostedFileBase file = Request.Files[uploadFile] as HttpPostedFileBase;rn string uploadPath;rn string uploadFullPath = Server.MapPath(FileHelper.getFilePath(out uploadPath));rn if (!Directory.Exists(uploadFullPath))rn rn Directory.CreateDirectory(uploadFullPath);rn rn //保存文件rn string newFileName = FileHelper.getFileName(uploadFullPath, file.FileName);rn string newFileFullPath = uploadFullPath + newFileName;rn if (file.ContentLength > 2097152)rn rn throw new Exception("上传的图片大小最大不能超过2M");rn rn if (FileHelper.GetExtension(newFileFullPath) != ".jpg" && FileHelper.GetExtension(newFileFullPath) != ".jpeg" && FileHelper.GetExtension(newFileFullPath) != ".JPG" && FileHelper.GetExtension(newFileFullPath) != ".JPEG" && FileHelper.GetExtension(newFileFullPath) != ".png" && FileHelper.GetExtension(newFileFullPath) != ".PNG")rn rn throw new Exception("请选择文件格式为 jpg/jpeg/png 的文件上传");rn rn tryrn rn file.SaveAs(newFileFullPath);rn DateTime date = DateTime.Now;rn string pathitem = "~/Resource/" + date.ToString("yyyyMM") + "/" + date.ToString("dd") + "/" + newFileName;rn allPah.Add(new path = pathitem );rn rn catchrn rn throw new Exception("文件上传失败,请刷新页面后重试");rn rn rn return Success("文件上传成功", allPah.ToJson());rn [/code]
this.onTimeout为null的错误,请大家帮忙!
用AjaxPro 2,调用方法后出现this.onTimeout为null的错误,是怎么回事?
调用数据表出错 求大神帮忙看看
//任务类型rn /// rn /// getrn /// rn /// rn /// rn public ActionResult CompassionTypeUpdate()rn rnrn rn return View();rn rnrnrn这是代码那块rn@model IEnumerablern则是我页面调用数据表rnrn不知道具体代码怎么写
能不能调用DISCUZ的密码?大神帮忙看看。
网站内架了个DISCUZ的论坛,网站(除了论坛外)还做了独立的[color=#008000]用户注册和登录页面[/color]。rn我想实现的功能是,这个独立的[color=#008000]用户注册和登录页[/color]面使用论坛的用户名和密码来登录。rn问题就在这里。我实在搞不清楚DISCUZ的加密与解密是怎样的。网上的一些说法是要提取数据库里的[color=#800000]$Salt[/color],但是,在我的数据库member表里找不到这个字段。
dir.listFiles();值为null时,会报异常,怎么解决
File[] files = dir.listFiles();rn dir.listFiles();值为null时,会报异常,怎么解决
请求HTTP时返回400,请大神帮忙看看。
首先,服务器是一个JAVA包,用的是REST服务。//Unicode 模式工程//转码std::string UTF8ToString(const std::string &amp;amp; str) {  int nwLen = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, NULL, 0);  wchar_t * pwBuf = new wchar_...
错误: this.el is null 请高手帮忙解决下
目前由于项目需要 在学EXTJS 1.0 版本, 做个分页的toolbarrnrn[code=JScript]rnvar pageToolbar=new Ext.PagingToolbar(rn store: ds,rn pageSize:5,rn displayInfo:true,rn displayMsg:"当前显示从0条到1条,共2条",rn emptyMsg:"对不起没有找到数据"rn);rn[/code]rnrn结果火狐就报这个错误 grid也没有显示出来 不知道差点什么, 希望大家帮忙哦!
高手帮忙看看,怎么解决
Multiple annotations found at this line:rn - The method QueryBookByNo(String) in the type BookinDAO is not applicable for the rn arguments ()rn - Collection is a raw type. References to generic type Collection should be parameterized
帮忙看看错误信息,怎么解决
技术信息(用于支持人员)rnrn错误类型:rnMicrosoft OLE DB Provider for ODBC Drivers (0x80004005)rn[Microsoft][ODBC Text Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0xf40 Thread 0x6d0 DBC 0x1138f3c Text'。rn/admin_backup.asp, 第 203 行rnrnrn浏览器类型:rnMozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TencentTraveler ) rnrn网页:rnPOST 53 ??? /admin_backup.asprnrnPOST Data:rnstrPath=D%3A%5C%C8%ED%BC%FE%5Cmanage%5C8888888888.csv rnrn时间:rn2005年6月9日, 8:56:35 rnrnrnrnrn我导入到sql数据库,用的是csv格式,在我的机子上可以运行,另外一台机子就不能运行,怎么回事?rnrn我的是WIN2003 SERVER rn另外一台是WINXPrn
java.lang.NoClassDefFoundError帮忙看看,怎么解决?
提示出错原因:rnjava.lang.NoClassDefFoundErrorrn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:140)rn at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)rn at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041)rn at lib.graphic.ThumbnailGenerator.generate(Unknown Source)rn at lib.graphic.ThumbnailGenerator.generatePng(Unknown Source)rn at _test__jsp._jspService(/tucool/test.jsp:7)rnrn我这里有2台LINUX服务器,一台上可以正确运行,另一台就报这个错,rn初步定义是这台服务器少了一个图形方面的东东,还有没有人和我遇到过同样的问题,rn有什么好的解决方法?希望大家帮忙!
大家帮忙看看怎么解决!
ERROR: rnORA-12541: TNS 没有监听器 rnrn我刚装的~就这样子了~是怎么回是啊rnrn是个新手
大家帮忙看看,怎么解决?
做一个简化版的仓库管理系统,运行程序之后,首先弹出登陆界面。rn[img=https://img-bbs.csdn.net/upload/201411/30/1417337601_391831.jpg][/img]rn输入账号密码后,进入到主界面。rn[img=https://img-bbs.csdn.net/upload/201411/30/1417337638_634147.jpg][/img]rn问题是,当我在主界面上点击右上角退出时,程序还是处于调试状态,不是完全退到编码状态。rn[img=https://img-bbs.csdn.net/upload/201411/30/1417337663_341973.jpg][/img]rn我知道是把登录窗口给隐藏了,这是代码。rn[img=https://img-bbs.csdn.net/upload/201411/30/1417337676_229139.jpg][/img]rnrn我想问,怎么样才能在点击主界面右上角的退出时,程序停止调试,退回到编码状态?rn
大神们,这个错误怎么解决啊,帮忙看看
[img=https://img-bbs.csdn.net/upload/201708/16/1502815896_839165.png][/img]rn第一条错误是Users下的.gradle缓存文件里的,这些错误都看不懂啊,有大神帮忙解答一下吗
各位大神帮忙看看这个问题怎么解决啊??
我现在想做一个指数函数的循环,写了下面的这个代码,错了,请各位大神帮忙看看该怎么解决啊、、、、rn#include "stdafx.h"rnrnrnint _tmain(int argc, _TCHAR* argv[])rnrn int i;rn int sum=0;rn for(int j;j<10;j++)rn rn sum+=2^i;rn rn printf("sum=%d",sum);rn return 0;rnrn
众位大神,帮忙看看这个LOG怎么解决
遇到这么个log,谁知道怎么解决啊?rnrnpermission denied :can`t access surfaceflinger(uuid=***,...)rnrn修改framework里面AndroidManifest.xml的方式不让用,众大神,有没有什么别的解决方式啊
求大神帮忙看看运行maven install错误怎么解决
[code=java][ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: 1 problem was encountered while building the effective model for org.apache.maven.plugins:maven-clean-plugin:2.5rn[ERROR] [FATAL] Non-parseable POM C:\Users\lenovo\.m2\repository\org\apache\maven\maven-parent\21\maven-parent-21.pom: entity reference names can not start with character '&' (position: START_TAG seen ...Firefox\') > -1; var isSafari = userAgent.indexOf(\'Safari\') > -1 &&... @3:114) @ C:\Users\lenovo\.m2\repository\org\apache\maven\maven-parent\21\maven-parent-21.pom, line 3, column 114[/code]rn如题 感觉好像是maven版本不对啊
求大神帮忙看看怎么解决,JFinal的报错
2018-11-29 12:15:14 [ERROR]-[Thread: Druid-ConnectionPool-Create-1062709130]-[com.alibaba.druid.pool.DruidDataSourceKaTeX parse error: Expected 'EOF', got '&amp;amp;' at position 119: …erEncoding=utf8&amp;amp...
求大神抽空帮忙看看,报错不知怎么解决。。。
页面接收多组数据,我把一组一组的都加入list中,然后把list给mybatis用foreach执行insert。localhost测试时候输完数据点击下一部后报错。。。rnrnrnHTTP Status 500 - Request processing failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.util.List]: Specified class is an interfacernrntypeException reportrnrnmessage Request processing failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.util.List]: Specified class is an interfacernrndescription The server encountered an internal error that prevented it from fulfilling this request.rnrnexceptionrnrnorg.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.util.List]: Specified class is an interfacern org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:927)rn org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:822)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:650)rn org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:731)rn org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rn org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)rnroot causernrnorg.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.util.List]: Specified class is an interfacern org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:102)rn org.springframework.web.method.annotation.ModelAttributeMethodProcessor.createAttribute(ModelAttributeMethodProcessor.java:136)rn org.springframework.web.servlet.mvc.method.annotation.ServletModelAttributeMethodProcessor.createAttribute(ServletModelAttributeMethodProcessor.java:81)rn org.springframework.web.method.annotation.ModelAttributeMethodProcessor.resolveArgument(ModelAttributeMethodProcessor.java:101)rn org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:77)rn org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:162)rn org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:123)rn org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)rn org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:746)rn org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:687)rn org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)rn org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)rn org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)rn org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)rn org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:822)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:650)rn org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:731)rn org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rn org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)rnnote The full stack trace of the root cause is available in the Apache Tomcat/7.0.70 logs.rnrnApache Tomcat/7.0.70
新手,请大神帮忙解决一个jni调用问题.
我刚学android开发. 原来是做c.c++的.现在项目想用jni来调用c原来的代码.rnrn我碰到的问题是.rn我在java里面写了如下的代码.rnpublic class Protocol_type rn rn public class Proctocol_Type_Base rn public int fromType;rn public int operationId;rn rn rn public class Protocol_MsgNormal extends Proctocol_Type_Base rn int normalMsgType;rn String fromAddr; rn String content; rn rn rnrnjni里面写的是rnpublic class readData rn rn static rn System.loadLibrary("readjni");rn rn public native Proctocol_Type_Base Protocol_parseFromString(String telNo, String contentBuf);rn rnrnrn在cpp里面是这样调用的.rnstatic JNINativeMethod const gMethods[] =rn rn "Protocol_parseFromString"," (Ljava/lang/String;Ljava/lang/String;)Lcom/example/data/Protocol_type/Proctocol_Type_Base;",(void*) java_Proctocol_from_CCP rn ;rnrn编译没有问题.rn但是一运行.平台会打印出,找不到本地方法.rn请大家帮你看看.rnrn其实我想的就是返回一个内部类.但是不知道为什么老是说找不到本地方法,rn
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法