求大神指点,SSM项目 dao层测试出错,不知道问题在哪里

基于ssm框架开发的项目,dao层测试时发生错误,求大神帮忙指引解决,说不清楚的可以加我q远程协助.

```五月 10, 2018 12:11:50 下午 org.springframework.context.support.GenericApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\MyEclipse\MyClass\o2o Maven Webapp\target\classes\mapper\AreaDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 47; 文档根元素 "mapper" 必须匹配 DOCTYPE 根 "null"。
五月 10, 2018 12:11:50 下午 org.springframework.test.context.TestContextManager prepareTestInstance
严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@77b52d12] to prepare test instance [com.imooc.o2o.dao.AreaDaoTest@4de4b452]
java.lang.IllegalStateException: Failed to load ApplicationContext

spring-dao.xml配置如下

 <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context.xsd">
    <!-- 配置整合mybatis过程 -->
    <!-- 1.配置数据库相关参数properties的属性:${url} -->
    <context:property-placeholder location="classpath:jdbc.properties"/>
    <!-- 2.数据库连接池 -->
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
        <!-- 配置连接池属性 -->
        <property name="driverClass" value="${jdbc.driver}" />
        <property name="jdbcUrl" value="${jdbc.url}" />
        <property name="user" value="${jdbc.username}" />
        <property name="password" value="${jdbc.password}" />

        <!-- c3p0连接池的私有属性 -->
        <property name="maxPoolSize" value="30" />
        <property name="minPoolSize" value="10" />
        <!-- 关闭连接后不自动commit -->
        <property name="autoCommitOnClose" value="false" />
        <!-- 获取连接超时时间 -->
        <property name="checkoutTimeout" value="10000" />
        <!-- 当获取连接失败重试次数 -->
        <property name="acquireRetryAttempts" value="2" />
    </bean>

    <!-- 3.配置SqlSessionFactory对象 -->
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <!-- 注入数据库连接池 -->
        <property name="dataSource" ref="dataSource" />
        <!-- 配置MyBaties全局配置文件:mybatis-config.xml -->
        <property name="configLocation" value="classpath:mybatis-config.xml" />
        <!-- 扫描entity包 使用别名 -->
        <property name="typeAliasesPackage" value="com.imooc.o2o.entity" />
        <!-- 扫描sql配置文件:mapper需要的xml文件 -->
        <property name="mapperLocations" value="classpath:mapper/*.xml" />
    </bean>

    <!-- 4.配置扫描Dao接口包,动态实现Dao接口,注入到spring容器中 -->
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <!-- 注入sqlSessionFactory -->
        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
        <!-- 给出需要扫描Dao接口包 -->
        <property name="basePackage" value="com.imooc.o2o.dao" />
    </bean>
</beans>

13个回答

贴一个链接,你可以参考一下, https://www.cnblogs.com/tanglie/p/6672225.html

fengyidong123
fengyidong123 非常感谢,问题已经解决
一年多之前 回复

你的dao和映射文件.xml需要放在同一个文件目录里面,否则映射不到。

可能是mybatis-spring版本不支持当前mybatis版本跟Spring版本。

这个可能是版本不兼容吧

你的web.xml会不会没有引入这个文件?

AreaDao.xml 你检查一下这个文件,上面以经说了 行数 和 列数。 lineNumber: 2; columnNumber: 47; 文档根元素 "mapper" 必须匹配 DOCTYPE 根 "null"。

发一下你的jar包版本,和web.xml配置

Cause: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 47; 文档根元素 "mapper" 必须匹配 DOCTYPE 根 "null"。

这已经给出了原因, xml 文档,用sax 解析时出错!
xml 文档写的不对, mapper.xml 文件不对嘛

把你的mapper文件, 找个xml校验器, 验证下。

Cause: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 47; 文档根元素 "mapper" 必须匹配 DOCTYPE 根 "null"。

这已经给出了原因, xml 文档,用sax 解析时出错!
xml 文档写的不对, mapper.xml 文件不对嘛

把你的mapper文件, 找个xml校验器, 验证下。

共13条数据 1 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
求大神帮我看看问题在哪里了
/*有5个学生,每个学生的数据包括学号 姓名 3门课成绩,平均分.n要求:从键盘依次输入5个学生的学号 姓名 3门课成绩,n自动计算3门课成绩的平均分,并将5个学生的数据在屏幕上输出*/n#includenstruct STUDENTnn char id[10];n char name[8];n int score[3];n double ave;nstu[5];nvoid main()nn int num=5,i,j;n for(i=0;i
不知道问题在哪里(JAVA)
同时用VB和JAVA对问题进行编程,对于较少数据量,VB和JAVA编程所得的结果都和论文中别人所得结果一样,但是当数据量比较大时VB还是能得出正确的结果,而JAVA却表现出不稳定的计算结果,有时还出现java.lang.outofmemoryerror的错误。请问是怎么个情况。我应该怎么处理才能让JAVA正常运行!
问题在哪里?请指点!
在jbuilder里编译别人的程序的时候总是rn报错:rnerror#:914:unable to write to output directoryrnrn而自己的程序就是正常的rnrn刚学她!也许问题幼稚,诚请指点,为谢!
高手指点,短短几行代码,不知道问题在哪里
#include "stdafx.h"rn#include "windows.h"rnrnLRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM);rnrnint WINAPI WinMain(HINSTANCE hInstance,rn HINSTANCE hPrevInstance,rn LPSTR lpCmdLine,rn int nCmdShow)rnrn static TCHAR szname[]=TEXT("IDD_DIALOG");rn HWND hwnd;rn MSG msg;rn WNDCLASS wndclass;rn rn// wndclass.style=CS_HREDRAW|CS_VREDRAW;rn wndclass.lpfnWndProc=WndProc;rn// wndclass.cbWndExtra=DLGWINDOWEXTRA;rn// wndclass.cbClsExtra=0;rn wndclass.hInstance=hInstance;rn wndclass.hIcon=LoadIcon(hInstance,szname);rn wndclass.hCursor=LoadCursor(NULL,IDC_ARROW);rn wndclass.hbrBackground=(HBRUSH)(COLOR_BTNFACE+1);rn wndclass.lpszMenuName=0;rn wndclass.lpszClassName=szname;rnrn RegisterClass(&wndclass);rnrnrn hwnd=CreateDialog(hInstance,szname,0,NULL);rn ShowWindow(hwnd,nCmdShow);rnrn while(GetMessage(&msg,NULL,0,0))rn rn TranslateMessage(&msg);rn DispatchMessage(&msg);rn rn rn return msg.wParam;rnrn rnrnrnLRESULT CALLBACK WndProc(HWND hwnd,UINT message,WPARAM wparam,LPARAM lparam)rn rnrn switch(message)rn rn case WM_CREATE:rn break;rn case WM_DESTROY:rn break;rn return 0;rn rnrn return DefWindowProc(hwnd,message,wparam,lparam);rnrnrnrn创建一个对话框,为什么对话框不出现,进程却创建了。
创建二叉搜索书出错..不知道问题在哪里
如题,不知道那里出错了,请大家指点一下.rn谢谢rn代码如下:rn#includernusing namespace std;rnrnstruct bintreernrn int data;rn bintree * left;rn bintree * right;rn;rnrnvoid insert(bintree *&bt,int x)rnrn bintree *p=new bintree;rn p->data=x;rn p->left=p->right=NULL;rn if(bt==NULL)rn bt=p;rn elsern rn if(xdata)rn insert(bt->left,x);rn elsern insert(bt->right,x);rn rnrnrnvoid disp(bintree *bt)rnrn while(bt)rn cout<data<left);rn disp(bt->right);rnrnrnvoid main()rnrn bintree *h;rn insert(h,3);rn insert(h,4);rn insert(h,7);rn insert(h,9);rn disp(h);rn
删除不了进程,不知道问题在哪里
Private Declare Function CreateToolhelp32Snapshot Lib "kernel32.dll" (ByVal dwFlags As Long, ByVal th32ProcessID As Long) As Long '这个API返回的是长整型值,就是快照系统的后的句柄 ,,,最后一个参数0表示快照当前所有的进程rnPrivate Declare Function Process32First Lib "kernel32" (ByVal hSnapshot As Long, lppe As PROCESSENTRY32) As LongrnPrivate Declare Function Process32Next Lib "kernel32" (ByVal hSnapshot As Long, lppe As PROCESSENTRY32) As LongrnPrivate Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As LongrnPrivate Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As LongrnConst PROCESS_QUERY_INFORMATION = &H400rnConst PROCESS_VM_READ = &H10rn Const TH32CS_SNAPPROCESS = &H2rnPrivate Type PROCESSENTRY32rndwSize As LongrncntUseage As Longrnth32ProcessID As Longrnth32DefaultHeapID As Longrnth32ModuleID As LongrncntThreads As Longrnth32ParentProcessID As LongrnpcPriClassBase As LongrnswFlags As LongrnszExeFile As String * 1024rnEnd TypernDim QQStr As StringrnDim Jhwnd As StringrnPrivate Sub Command1_Click() '判断QQ进程是否存在rnList1.ClearrnCall Form_LoadrnEnd SubrnPrivate Sub Command2_Click() '删除进程的按钮rnDim ProcessHwnd As LongrnDim Ret As Longrn Jhwnd = List1.List(List1.ListIndex)rn Jhwnd = Trim(Left(Jhwnd, 3))rn ProcessHwnd = OpenProcess(PROCESS_QUERY_INFORMATION Or PROCESS_VM_READ, False, Jhwnd)rn If ProcessHwnd <> 0 Thenrn Ret = TerminateProcess(ByVal ProcessHwnd, 0&)rn If Ret <> 0 Thenrn MsgBox "结束进程成功", vbInformation, "提示信息"rn Elsern MsgBox "结束进程失败", vbCritical, "错误"rn End Ifrn End Ifrn rnEnd SubrnrnPrivate Sub Form_Load()rn Dim Mysnapshot As Longrn Mysnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)rn If Mysnapshot <> 0 Thenrn Dim processinfor As PROCESSENTRY32rn processinfor.dwSize = Len(processinfor)rn If Process32First(Mysnapshot, processinfor) <> 0 Thenrn List1.AddItem "第一个进程PID值是" & processinfor.th32ProcessIDrn List1.AddItem "第一个进程文件名是" & processinfor.szExeFilern While Process32Next(Mysnapshot, processinfor) <> 0rn List1.AddItem processinfor.th32ProcessID & " " & processinfor.szExeFilern Wendrn End Ifrn Dim i As Integerrn '为什么会返回空? MsgBox List1.Textrn For i = 1 To List1.ListCountrn QQStr = List1.List(i)rn If InStr(QQStr, "QQ.exe") Thenrn MsgBox "QQ.exe进程存在", vbInformation, "提示"rn Exit Forrn End Ifrn Nextrn If Right(QQStr, 6) <> "QQ.exe" Thenrn MsgBox "QQ.exe进程不存在", vbInformation, "提示"rn End Ifrn Label1.Caption = "进程数: " & List1.ListCountrn End IfrnEnd Subrnrnrnrn这是第一个小问题:请大家帮帮忙啊.rnrn以上是我自己写的小程序,后来我想删除一个进程就出现了问题.rnrn不知道怎么删除..我都调试看过了变量了啊都返回了进程的句柄了啊.rnrn删除不了进程,不知道问题在哪里rnrn第二个小问题:就是怎么从一个字符串中取出想要的值,,,比如有一个这样的字符串 "520 中间是有3个空格 QQ.exe"rnrn520是进程的PID值 QQ.exe 是进程文件名rnrn我想取的就是数字,也就是进程PID的值..因为有时候进程PID的值有时候是4位数字的..在不知道的情况下我不知道怎么准确的取这个进程PID值》》rnrnrn第三个小问题:暂时就这么多了.请大家帮帮忙啊.祝大家天天开心.工作顺利......哈哈 别笑我写的乱啊..rn
SSM项目扫描不到dao层
配置ssm项目,在测试时碰到了问题,异常信息如下: java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCach...
jsp分页的问题?不知道问题在哪里
java类中的相关代码: rn session.setAttribute("pageNum",String.valueOf(pageNum));rn session.setAttribute("pageTotal",String.valueOf(pageTotal));rn session.setAttribute("page_RECORDS",String.valueOf(page_RECORDS));rn session.setAttribute("currentPage",String.valueOf(currentPage));rn session.setAttribute("CBODataStructList",list);rnjsp中的代码:rn<%rn ArrayList list = new ArrayList();rn list = (ArrayList)session.getAttribute("CBODataStructList");rn int pageNum=Integer.parseInt((String)session.getAttribute("pageNum"));rn int pageTotal=Integer.parseInt((String)session.getAttribute("pageTotal"));rn int page_RECORDS=Integer.parseInt((String)session.getAttribute("page_RECORDS"));rn int currentPage=Integer.parseInt((String)session.getAttribute("currentPage"));rnrn if(list!=null)rn%>rn rn rn 序号rn <%=Util.getInitParam(Util.INIT_DATA,"TABLE1.COL1")%>rn <%=Util.getInitParam(Util.INIT_DATA,"TABLE1.COL2")%>rn 技术 rn <%=Util.getInitParam(Util.INIT_DATA,"TABLE1.COL24")%>rn <%=Util.getInitParam(Util.INIT_DATA,"TABLE1.COL11")%> rn rn 有效时间段 rn (YY/MM/DD)rn <%=Util.getInitParam(Util.INIT_DATA,"TABLE1.COL12")%>rn <%=Util.getInitParam(Util.INIT_DATA,"TABLE1.COL13")%>rn rn rn <%=Util.getInitParam(Util.INIT_DATA,"TABLE1.COL21")%>rn <%=Util.getInitParam(Util.INIT_DATA,"TABLE1.COL22")%>rn <%=Util.getInitParam(Util.INIT_DATA,"TABLE1.COL23")%>rn rn <% rn for(int i = (currentPage-1)*page_RECORDS; i < currentPage*page_RECORDS ; i++) rn CBODataStruct rsStruct = (CBODataStruct)list.get(i);rn if (rsStruct != null) rn %>rn rn <%=i+1%>rn <%=Tool.nullToBlank(rsStruct.getCOL1())%>rn <%=Tool.nullToBlank(rsStruct.getCOL2())%>rn <%=Tool.nullToBlank(rsStruct.getCOL21())%>rn <%=Tool.nullToBlank(rsStruct.getCOL22())%>rn <%=Tool.nullToBlank(rsStruct.getCOL23())%>rn <%=Tool.nullToBlank(rsStruct.getCOL24())%>rn <%=Tool.nullToBlank(rsStruct.getCOL11())%>rn <%=Tool.nullToBlank(rsStruct.getCOL9())%> - <%=Tool.nullToBlank(rsStruct.getCOL10())%>rn <%=Tool.nullToBlank(rsStruct.getCOL12())%>rn <%=Tool.nullToBlank(rsStruct.getCOL13())%>rn rn <% rn rn rn rnrn%>rnrnrn共<%=list.size()%>条记录,当前第<%=currentPage%>页,共<%=pageTotal%>页 rnrn<%if(currentPage>1)%>上一页 <% rnrnif(currentPage下一页 <%rnrnsession.removeAttribute("CBODataStructList"); rnrn%>rnrnrnrn不知道为何捕获异常:doDispatcher() ExrnE Ex = org.apache.jasper.JasperExceptionrnE 未能跳转到gongfang.jsprn大家帮帮忙 谢谢
不知道问题在那里了?
[code=SQL]rnSELECT s.SUBMITTIME ,s.FAULTLEVEL,COUNT(S.FLEVEL) AS [FLEVEL] rnFROMrn(SELECT Convert(nvarchar(100),a.SUBMITTIME,23) AS SUBMITTIME, b.FAULTLEVEL AS FAULTLEVEL,b.FAULTLEVEL AS FLEVEL rnfromrn(select SUBMITTIME,FAULTLEVEL=convert(xml,''+replace(FAULTLEVEL,';','')+'') from [View_GetMMInfoForReport] as a rnouter applyrn(select FAULTLEVEL=c.v.value('.','nvarchar(100)')rnfrom a.FAULTLEVEL.nodes('/root/v') as c(v)rn) as brn) as srnGROUP BY s.SUBMITTIME,s.FAULTLEVELrn[/code]rnrn消息 102,级别 15,状态 1,第 12 行rn'FAULTLEVEL' 附近有语法错误。rnrn不知道问题在那里了?
一直不懂这种写法的问题在哪里?求大神。
[code=c]rnclass A rn rnpublic: rn A()rn rn p=this; rn rn ~A() rn rn if(p!=NULL) rn rn delete p; p=NULL; rn rn rnrn A* p; rn;[/code]
问题在哪里?
抓住时间学习。要学会学习。 向人请教,学习,看书,实践。 自己所获得的经验,就是知识。 做事啊,要找方法。从书里找,跟人请教,自己去实践。血与累的教训就是知识。
问题在哪里
表aa、bb、cc,均包含字段bh,mc,rksj,cksj,所有字段均为varchar,当用以下查询语句时rksj显示的格式为yyyy-mm-dd 0:00:00(如2009-2-23 0:00:00)rnselect * from aa where CAST(rksj AS DATETIME) between '2009-02-01' and '2009-02-28'rnunion all rnselect * from bb where cast(rksj as datetime) between '2009-02-01' and '2009-02-28'rnrn但当将以上查询的数据插入到cc后rksj的显示格式变为mm dd yyyy 12:00AM(如02 23 2009 12:00AM)rninsert ccrnselect * from aa where CAST(rksj AS DATETIME) between '2009-02-01' and '2009-02-28'rnunion all rnselect * from bb where cast(rksj as datetime) between '2009-02-01' and '2009-02-28'rnrn请问如何在执行插入数据到cc表后rksj的显示格式为为yyyy-mm-dd 0:00:00(如2009-2-23 0:00:00),rksj的类型不能改变
判断素数问题在哪里????
#includernusing namespace std;rn#includernint main()rn int a;rn float b;rn b = sqrt(a);rn cin>>a; rn for(int i=2;i<=b;i++)rn if(a % i = 0)rn cout<<"不是素数"<
问题在哪里???
一个很简单的登录rn连接数据库,判断输入的用户名和密码是否正确rnselect userid,username from users rn运行的时候提示错误rn“在关键字 'select' 附近有语法错误。”rn哪里的问题呢????
问题在哪里?
“/myweb/WebApplication1”应用程序中的服务器错误。rn--------------------------------------------------------------------------------rnrn分析器错误 rn说明: 在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。 rnrn分析器错误信息: 未能加载类型“WebApplication1.Global”。rnrn源错误: rnrnrn行 1: <%@ Application Codebehind="Global.asax.cs" Inherits="WebApplication1.Global" %>rnrn rnrn源文件: D:\wwwroot\WebApplication1\global.asax 行: 1
所以问题在哪里?
今天练习js的一个小练习时遇到很奇怪的现象,明明是相同的代码,可是却是不同的结果。&amp;lt;!DOCTYPE html&amp;gt; &amp;lt;html&amp;gt; &amp;lt;head&amp;gt; &amp;lt;meta charset=&quot;utf-8&quot;&amp;gt; &amp;lt;title&amp;gt;06&amp;lt;/title&amp;gt; &amp;lt;/head&amp;gt; &amp;lt;body&amp;gt; &amp
这个的问题在哪里?
for(item::iterator ptr = result.begin(); ptr!=result.end(); ptr++)rnrn cout<<*ptr;rnrnrn其中result是一个vector.....为什么这样输出。。编译通不过?。。。。
求看看问题在哪里 纠结死了
import Stanford.Karel.*;rnrnpublic class my Karel extends Karel rn public void run() rn move();rn move();rn turnleft();rn move();rn turnright();rn move();rn rnrnrnrnrn哪里出错了
求大神指点 哪里错了?
private void lblMode_MouseClick(object sender, MouseEventArgs e)rn rn if (e.Button != MouseButtons.Left)rn return;rn int xPos, yPos;rn xPos = e.X / 31;rn yPos = e.Y / 31;rn struArr[xPos, yPos] = !struArr[xPos, yPos];rn bool b = struArr[xPos, yPos];rn Graphics gp = lblMode.CreateGraphics();rn SolidBrush s = new SolidBrush(b ? blockColor : Color.Black);rn gp.FillRectangle(s, 31 * xPos + 1, 31 * yPos + 1, 30, 30);rn gp.Dispose;rn
求大神指点。。哪里不对
// 设置查询字符串rn /*rn CString strSQL;rn strSQL.Format(_T("select * from employees where 员工编号 = '%s'order by 员工编号 desc"),strNum);rn _bstr_t bstrSQL;rn bstrSQL = (_bstr_t)strSQL;rn // 每次在m_pRecordset->Open()函数出错!!!rn */rn rnrn _bstr_t bstrSQL = _T("select * from employees where 员工编号 = 6 order by 员工编号 desc"); rn //成功了!!!rnrn //创建记录集指针对象实例rn m_pRecordset.CreateInstance(__uuidof(Recordset));rnrn //打开记录集rn m_pRecordset->Open(bstrSQL,m_pConnection.GetInterfacePtr(),adOpenDynamic,adLockOptimistic,adCmdText);rnrn m_pRecordset->MoveFirst();rn[img=https://img-bbs.csdn.net/upload/201610/26/1477447858_97460.png][/img]rn
不知道哪里出错,求告知
[img=https://img-bbs.csdn.net/upload/201803/08/1520496700_369028.png][/img]rnrn#includerndouble fun(int n)rn double sum=0.0,m=0.0;rn int i;rn for(i=1;i<=2*n;i+2)rn m=(1.0/i)-1.0/(i+1);rn sum = sum + m; rn rn return sum;rnrnint main()rn int n;rn double s;rn printf("\ninput n:");rn scanf("%d",&n);rn s=fun(n);rn printf("\nS=%f\n",s);rn return 0;rnrnrnrn程序编译没有问题,但是输入8后,没有结果输出,请帮忙看一下是哪里出了错。rnrnps:main函数没有错
SSM框架中dao层和mapper.xml无法实现绑定,求大神指点啊
描述:原本项目在另一台电脑运行正常,然后整个项目完整复制到这个电脑,就报下面错误,各方面配置也是正常的,ecilipse重启,电脑重启也没用,mapper.xml中的namespace配置也是对的rnrn报错:rn三月 04, 2018 11:20:57 上午 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet [springMVC] in context with path [/ExaminationSystem] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.[color=#FF0000]BindingException: Invalid bound statement (not found): org.seventh.examingsystem.dao.StudentMapper.selectLogin] with root cause[/color]rnjava.lang.IllegalArgumentException: [color=#FF0000]Result Maps collection does not contain value for org.seventh.examingsystem.pojo.Student[/color]rn at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:775)rn at org.apache.ibatis.session.Configuration.getResultMap(Configuration.java:534)rn at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap(MapperBuilderAssistant.java:363)rn at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:303)rnrnmapper.xml配置rnrnrnrnrnrnsql语句:rnrn selectrn rn from STUDENTrn where LOGINNAME = #loginname,jdbcType=VARCHARrn rnrnrnrnrn rn rn rn rn rnrnrn rn rn rn rn
CString出错,求大神指点
[code=c]rnrnrn CString csCurPath;rn CString csAddPath;rn CString csFullPath;rn GetCurrentDirectory(50,csCurPath.GetBufferSetLength(MAX_PATH+1));rnrn AfxMessageBox(csCurPath);rn csAddPath = "information.ini";rn csFullPath = csCurPath + csAddPath;rn AfxMessageBox(csFullPath);rnrn[/code]rnrn结果发现csCurPath和csFullPath的结果是一样的,搞不明白~~
重画问题在哪里解决!!!
小弟刚刚做了个托盘程序,当关闭对话框时托盘图标不能立即清除,要等鼠标移到其上才能清除图标,请问大虾门具体应该在哪里修改??
帮忙看看问题在哪里?
http://www.tjae.com/answer/soundemail.asprnrn选择——土力学rnrn在本机上是好的,但在服务器上就不对了:(
看看代码,问题在哪里??
我想当移动记录指针时,EDIT里的内容也跟着改变。(不用DBEDIT)。rn如何得到正解?rnrnunit Unit1;rnrninterfacernrnusesrn Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,rn Db, Grids, DBGrids, ADODB, StdCtrls;rnrntypern TForm1 = class(TForm)rn Button1: TButton;rn Button2: TButton;rn Edit1: TEdit;rn Edit2: TEdit;rn ADOTable1: TADOTable;rn DBGrid1: TDBGrid;rn DataSource1: TDataSource;rn procedure Button1Click(Sender: TObject);rn procedure Button2Click(Sender: TObject);rn procedure FormCreate(Sender: TObject);rn procedure ADOTable1MoveComplete(DataSet: TCustomADODataSet;rn const Reason: TEventReason; const Error: Error;rn var EventStatus: TEventStatus);rn procedure DBGrid1ColumnMoved(Sender: TObject; FromIndex,rn ToIndex: Integer);rn privatern Private declarations rn publicrn Public declarations rn end;rnrnvarrn Form1: TForm1;rnrnimplementationrnrn$R *.DFMrnrnprocedure TForm1.Button1Click(Sender: TObject);rnbeginrn ADOTable1.Next;rnend;rnrnprocedure TForm1.Button2Click(Sender: TObject);rnbeginrn ADOTable1.Prior;rnend;rnrnprocedure TForm1.FormCreate(Sender: TObject);rnbeginrn ADOTable1.open;rn ADOTable1.First;rn edit1.text:=ADOTable1.Fieldbyname('dm').asstring;rn edit2.text:=ADOTable1.fieldbyname('mc').asstring;rnend;rnrnprocedure TForm1.ADOTable1MoveComplete(DataSet: TCustomADODataSet;rn const Reason: TEventReason; const Error: Error;rn var EventStatus: TEventStatus);rnbeginrn// edit1.text:=ADOTable1.Fieldbyname('dm').asstring;rn // edit2.text:=ADOTable1.fieldbyname('mc').asstring;rnend;rnrnprocedure TForm1.DBGrid1ColumnMoved(Sender: TObject; FromIndex,rn ToIndex: Integer);rnbeginrn edit1.text:=ADOTable1.Fieldbyname('dm').asstring;rn edit2.text:=ADOTable1.fieldbyname('mc').asstring;rnend;rnrnend.rnrn
这个公式问题在哪里?
表中F2单元格为身份证号,E2单元格以公式计算出该身份证主人的性别。公式如下:rnrn=IF(F2="","",CHOOSE(MOD(IE(LEN(F2)=15,RIGHT(F2,1),IF(LEN(F2)=18,MID(F2,17,1),"")),2)+1,"女","男"))rnrn结果,当F2为18位身份证的时候,E2能正确显示性别,当F2为15位身份证的时候,则不能显示出性别,而显示为:#NAME?rnrn请高手赐教,这个公式的问题出在哪里?如果公式没有问题,那么问题又在什么地方?先谢过!
switch 声明问题在哪里?
Notice: Undefined variable: Name in C:\wamp\www\FlowControl.php on line 30rnrnNotice: Undefined variable: Name in C:\wamp\www\FlowControl.php on line 31rnrnNotice: Undefined variable: Name in C:\wamp\www\FlowControl.php on line 35rnrnNotice: Undefined variable: Name in C:\wamp\www\FlowControl.php on line 36rnrnNotice: Undefined variable: Name in C:\wamp\www\FlowControl.php on line 41rnrn[code=PHP]rnrn[/code]rnrn什么意思?? 要怎么解决??rnswitch case break default 是什么??
帮我看看问题在哪里
jiaoshi.asprnrnrn 教师界面rnrnrn rn <%=request.form("name")%>老师,欢迎你使用本系统 rn已有的题目 rn题目一:rn点击率统计系统 rn题目二:rn图书在线预订系统 rn题目三:rn在线聊天室系统 rn rn请在这填写实验内容 rnrn显示实验rnrn rnrnrnrnrnrnshuju.asprn<%rnresponse.write server.htmlencode (request.form("text")="3")rn%>rn就是显示不了第二界面
这个语句问题在哪里??
declare @my_billnum varchar(50)rnselect @my_billnum = 'P0'+bill_num from insertedrn......rnrnrnexec('update '+@tbs+' set iRAmount_f = '+@my_value +'where '+@tbs+'.clink='+@my_billnum)rnrnrn出错说:列名0000001无效。rnrn请问如何解决rnrn
问题在哪里? Twrite treader
[code=Delphi(Pascal)] s:=TFileStream.Create('D:\A.txt',fmOpenWrite);rn Writ:=TWriter.Create(S,SizeOf(My.InstanceSize));rn Writ.Root:=Self;rn Writ.WriteSignature;rn// Writ.WriteComponent(btn1);rn Writ.WriteListEnd;rn Writ.Free;rn s.Free;[/code]rnrn写入 btn1为按钮rnrn读出rn[code=Delphi(Pascal)]rnvarrn Reader:TReader;rn s:TFileStream;rn tv:TButton;rnbeginrn s:=TFileStream.Create('D:\A.txt',fmOpenRead);rn S.Position:=0;rn Reader:=TReader.Create(S,4096);rn tv:=TButton.Create(Self);rn tv.Parent:=Self;rn tv:=TButton(Reader.ReadComponent(nil));[/code]
看看它,问题在哪里
sql server2000 and pb7rn我想有条件地导出数据,用了管道pipeline1,pipeline2分别导出同一个库的表table1,table2rn可是两者的syntax完全不一样。rntable1实现了有条件地导出syntax为RETRIEVE(statement="SELECT basicinformation1.id,basicinformation1.name,basicinformation1.gender,basicinformation1.age,basicinformation1.job,basicinformation1.address,basicinformation1.telephone,basicinformation1.visitway,basicinformation1.fromplace,basicinformation1.fromtime,basicinformation1.attribute,basicinformation1.mainproblem,basicinformation1.registrydate,basicinformation1.repetition,basicinformation1.yueji FROM basicinformation1 WHERE basicinformation1.id="2003052001" ")rntable2的确是rnRETRIEVE(statement="PBSELECT(TABLE(NAME=~"basicinformation~") COLUMN(NAME=~"basicinformation.id~")COLUMN(NAME=~"basicinformation.name~")COLUMN(NAME=~"basicinformation.gender~")COLUMN(NAME=~"basicinformation.age~")COLUMN(NAME=~"basicinformation.job~")COLUMN(NAME=~"basicinformation.address~")COLUMN(NAME=~"basicinformation.telephone~")COLUMN(NAME=~"basicinformation.visitway~")COLUMN(NAME=~"basicinformation.fromplace~")COLUMN(NAME=~"basicinformation.fromtime~")COLUMN(NAME=~"basicinformation.attribute~")COLUMN(NAME=~"basicinformation.mainproblem~")COLUMN(NAME=~"basicinformation.registrydate~")COLUMN(NAME=~"basicinformation.repetition~")COLUMN(NAME=~"basicinformation.yueji~")COLUMN(NAME=~"basicinformation.toniban~"))")rn为什么????????rn
大侠告诉我问题在哪里?
我在mysql命令行下,从文件恢复数据库,比如:mysql student < student.sql;老是告诉我‘语法错误',student.sql是我从原来的数据库导出的文件。大侠告诉我怎么语法错误了?
这句Sql问题在哪里?
sql1="Select * from [notice] where (not isnull(img_dir)) order by id desc"rnrn愿意是将数据库中字段img_dir非空的记录选出来,结果是全部记录选出来了,问题在哪里?
这段程序的问题在哪里?
<%rnset conn=server.CreateObject("adodb.connection")rn conn.open "user"rn set rs=conn.execute("select top 5 username,oicq from user order by time desc")rn set username=rs("username")rn set userqq=rs("oicq")rn Do Until rs.EOFrn Response.Write username & " " & userqq & " "rn rs.MoveNextrn looprn%>
问题在哪里?高手出手!
我编译一个小程序总出现下面编译错误,但我检查程序是在检查不出问题,我怀疑是VC集成环境设置问题,望高手指点,问题入下:rn--------------------Configuration: SingleFile - Win32 Debug--------------------rnLinking...rnLIBC.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in msvcrtd.lib(crtexe.obj)rnLIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in msvcrtd.lib(MSVCRTD.dll)rnLIBC.lib(crt0dat.obj) : error LNK2005: __exit already defined in msvcrtd.lib(MSVCRTD.dll)rnLIBC.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrtd.lib(cinitexe.obj)rnLIBC.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrtd.lib(cinitexe.obj)rnLIBC.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrtd.lib(cinitexe.obj)rnLIBC.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrtd.lib(cinitexe.obj)rnLINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:libraryrnLINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:libraryrnSingleFile.obj : error LNK2001: unresolved external symbol "short __cdecl criterrhandler(short)" (?criterrhandler@@YAFF@Z)rnmsvcrtd.lib(crtexe.obj) : error LNK2001: unresolved external symbol _mainrnLIBC.lib(crt0.obj) : error LNK2001: unresolved external symbol _mainrnDebug/SingleFile.exe : fatal error LNK1120: 2 unresolved externalsrnError executing link.exe.rnrnSingleFile.exe - 11 error(s), 2 warning(s)rn但我已经在setting->link中忽略了libc, msvcrtd也出现次问题,我知道可能是库冲突,高手出手!!rn
这个存储过程问题在哪里?
这是我的存储过程rnCREATE PROCEDURE GetEmpConInf1( rn@PubDate datetime,rn@GIDID int,rn@Code varcharrn) rnASrn BEGIN rn rn select * from cpucodern where gidid=@GIDID and pubdate>@PubDate and Code = @Codern ENDrnGOrn在查询分析器里执行EXEC GetEmpConInf1 '2005-01-03',2, 'sgtrt2'rn时什么也查不出,表里是有满足这个条件的纪录的,但不报错,自己感觉是where 里的“and Code = @Code”这个写法好像有问题,rn清高手指教,另外如果是“Code like '%@Code%'”该怎样写?rn
lcd程序问题,我不知道哪里错了,求大神指点一下
void main() lcd_init(); write_data(0,1,"A"); while(1);void lcd_init(void) write_command(0x38); write_command(0x0c); write_command(0x06); write_command(0x01);void write_command(uchar command) RS=0; RW=0; E=1; E=0; Data=command; delay(1);void write_data(uint x,uint y,uchar da) uchar ad; if(y==1) ad=0x80+x; else ad=0xc0+x; write_command(ad); LCDdate(ad);void LCDdate(uchar da) Data=da; RS=1; RW=0; E=1; E=0; delay(1);void delay(uint n) uint i; uchar j; for(i=n;i>0;i--) for(j=2;j>0;j--);
SpringBoot 多模块 Dao 层测试
     源码下载地址: 链接: https://pan.baidu.com/s/1v5FmbEvWtQXmv1DGnIOPvw 提取码: cxtn      CSDN下载: https://download.csdn.net/download/zcf980/10719897      在网上找了很久都没找到关于SpringBoot多模块的有效单元测试方法, 后来自己摸索了很久才解决, 写两篇...
基于ssm框架的个人博客(5)--Dao层设计及测试
前台的页面完成了一部分,那么是时候开发Dao层了,前面我们提到了mybatis的逆向工程,也展示了一些逆向生成的一些配置文件,实体类......现在我们就基于ssm框架,对Dao进行开发,由于代码比较简单,在此不做解释,直接看注释。 贴上代码 package testDao; import java.util.List; import org.junit.Test; import org.
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池