Mybatis非常诡异的异常,求解

图片说明

图片说明


图片说明

The error may exist in com/finaAss/entity/javaBeans/GoodsTypes.xml

The error occurred while processing mapper_resultMap[basicMap]

Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias ''. Cause: java.lang.ClassNotFoundException: Cannot find class:

4个回答

这意思好像是没读到_GoodsTypes的别名,不明白到底什么意思,求大神出手。

配置文件有问题,你试试把typeAliases移到mapper里面的最前面试试。

图片说明
你是这个意思么?用注解?没效果哦,就是感觉很诡异,其他的别名都读出来了,就这个xml从头到脚都是问题。

我没有用spring哦,就单单一个mybatis,很干净的。

不是类中无须加东西,xml中把typeAliases标签内容移到mapper标签里面试一下。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
mybatis诡异的异常!!!时好时坏!!!
springboot项目mybatis报异常,时好时坏。 mybatis映射异常???
非常诡异!VS2008高分求解!
我用的VS2008SP1,现有一工程,主要是用到PSAPI.LIB 里的一些函数枚举进程.rn工程编写完毕,发布版本编译后,在编译环境里CTRL+F5运行,即"开始执行(不调试)",程序运行一切正常.rn而当我直接进入生成执行文件的目录,直接双击运行生成的程序,虽然能正常运行,但是结果不对.这是什么原因啊.rn仿佛,当我的程序是由VS2008启动的时候,他就能正常工作.而自己双击运行,就出问题了!rn诡异!实在诡异!高分求解!
非常诡异的问题,紧急求解
我在做一个网络棋牌室,用MFC框架,绘图使用GDI,现在发现一个这样的问题:大部分机器上都比较流畅,然而有两台机器却发现绘图速度非常慢。但是测试的这批机器配置是完全相同的(赛扬2.8,Intel 82865集成显卡),当然系统也是装好一台之后再克隆的,一共大约有8台机器,其中两台出现上述现象。事情至此就算了,之所以说“诡异”,是因为今天我还发现在这两台机器上,打开棋牌室程序之后可以明显感觉到卡(绘图慢,症状已经确认),然而,把屏幕分辨率换了之后(1024×768换为1280×1024),却发现和其他机器一样快了!!换回1024×768之后也不见变慢。然后我在1280×1024分辨率下启动程序——慢,切换成1024×768之后——又变快了!!从而得出一个结果:只要启动程序之后再切换分辨率,这两台机器的绘图速度就变正常了。rn小弟年少无知,希望有大虾能为小弟解答。
RegCreateKeyEx非常诡异的错误
[code=c]rn// 1.cpp : Defines the entry point for the console application.rn//rnrn#include "stdafx.h"rn#include rn#include rn#pragma comment(lib, "Shlwapi.lib")rnrnvoid MyCreateRegDword(HKEY MainKey,LPCTSTR SubKey,LPCTSTR Vname,DWORD szData)rnrn HKEY hKey; rn DWORD dwDisposition; rn long ret0=(::RegCreateKeyEx(MainKey,SubKey,0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&hKey,&dwDisposition));rn if(ret0!=ERROR_SUCCESS)//如果无法打开hKEY,则中止程序的执行rn rn MessageBox(NULL,"错误:无法打开有关的hKEY",NULL,NULL);rn return;rn rn rn DWORD dwLastError;rn dwLastError = szData;rn if (RegSetValueEx( hKey, Vname, 0,REG_DWORD,(LPBYTE)&dwLastError ,sizeof(DWORD)))rn rn MessageBox(NULL,"不能新增注册表值.",NULL,NULL);rn return;rn rnrn RegCloseKey(MainKey); rn RegCloseKey(hKey);rn return;rnrnrnint main(int argc, char* argv[])rnrn// SHDeleteKey(HKEY_CURRENT_USER, "AppEvents\\Schemes\\FUCK");rn MyCreateRegDword(HKEY_CURRENT_USER,"AppEvents\\Schemes\\FUCK","test", 1);rn return 0;rnrn[/code]rn标题可能有点出入,具体哪里出错我也不知道rn以上代码新建工程编译后完成了在HKEY_CURRENT_USER\AppEvents\Schemes下新建fuck项,并建立REG_DWORD类型的test键,赋值1rn但把MyCreateRegDword函数放到dll中调用竟无法实现上述效果,fuck项都无法建立,郁闷好久,请大神解惑
非常诡异的问题
1.网站后台添加新闻,如果是纯文字的内容就没问题,只要是插入图片的话就会报错!rn2.其实就是多了一个IMG标签的内容。rn3.还有就是在服务器上操作的话,完全没有问题。rnrn错误:rnThis page can't be displayed. Contact support for additional information.rnThe incident ID is: 9006017271153621334
非常诡异的错误
提示:无法将类BufferedReader类中的构造器BufferedReader应用到指定类型rnrnimport java.io.*;rnrnclass BufferedReaderrnrn public static void main(String[] args) throws IOExceptionrn rn FileReader fr=new FileReader("新建文本文档.txt");rn rn BufferedReader bufr=new BufferedReader(fr);rn rn rn String line=null;rn rn while((line=bufr.readLine())!=null)rn rn System.out.println(line);rn rn rn bufr.close();rn rnrn
CImageList的问题!非常诡异!
这是我编的模仿数码管的小程序,rn如果用这个程序显示系统时间,精确到秒,没问题,rn但如果我精确到0.1s,大概运行40几秒后,rn数码管就不显示了,而且会导致整个程序运行不稳定,为什么?rnrnvoid CMy2Dlg::OnTimer(UINT nIDEvent) rnrn // TODO: Add your message handler code here and/or call defaultrn if (1==nIDEvent)rn //表 rn struct timeb current_time;rn char * timeline;rn CString strTime;rn ftime(&current_time);rn timeline = ctime( & ( current_time.time ) );rn strTime.Format("%.8s.%1d", timeline+11, current_time.millitm/100);rn m_timeico.myfun(strTime);rn rn CDialog::OnTimer(nIDEvent);rnrnrnCMytime::CMytime(void)rnrn char_num=0;rn m_pictur=NULL;rn m_imgList=new CImageList;rn m_imgList->Create(IDB_BITMAP1,12,0,RGB(255,255,255));//创建位图链 每个位图12像素rnrnrnCMytime::~CMytime(void)rnrn for(int i=0;iDeleteImageList();rn m_imgList=NULL;rnrnrnvoid CMytime::set(CWnd *parent,int num,int x,int y,int space)rnrn int i;rn char_num=num;rn if(m_pictur)rn rn for(i=0;iCreate(NULL,SS_ICON,seg,parent);// 创建静态图标控件rn m_pictur[i]->ShowWindow(SW_SHOW);rn rnrnrnBOOL CMytime::myfun(CString time)rn rn int i,j;rn HICON myico;rn rn for(i=0;iExtractIcon(10); //取出图标rn //if(myico)rn m_pictur[i]->SetIcon(myico);//设置显示的图标rn //elsern // return FALSE;rn rn rn for(j=i;jExtractIcon(change(time[j-i])); rn //if(myico)rn m_pictur[j]->SetIcon(myico);rn //elsern // return FALSE;rn rn return TRUE;rnrn// 映射字符到数字,返回位图的索引值rnint CMytime::change(char a)rnrnrn switch(a) rn rn case '0':rn case '1':rn case '2':rn case '3':rn case '4':rn case '5':rn case '6':rn case '7':rn case '8':rn case '9':return a-'0';rn break;rn case ' ':return 10;rn break;rn case 'A':return 11;rn break;rn case 'P':return 12;rn break;rn case '.':return 13;rn break;rn case '|':return 14;rn break;rn case ':':return 15;rn break;rn case '-':return 16;rn break;rn default: return 10;rn rnrnrnclass CMytimernrnpublic:rn CMytime(void);rn ~CMytime(void);rn int char_num;rn int change(char);rn BOOL myfun(CString );//显示数字字符串rn void set(CWnd * ,int ,int ,int ,int );//设置显示位置rn CStatic ** m_pictur;// 静态图 指针数组rn CImageList * m_imgList;rn;
WCF非常诡异的问题
同样的代码 部署在 一台服务器 A上是可以访问,一切正常。rnrn部署在另外一台服务器 B 上就一直报404, 但问题是 服务器B上部署其他WCF 就能正常访问。rnrn但是在电脑A上又是一切正常。 可能是啥原因。
非常诡异的数据查询现象
最原始的SQL语句如下:rn[code=SQL]rnselect AA.*, ROWNUM AS RowNorn from (SELECT a.WARECODE, a.WARENAME, b.PLACECODE, b.STOCKQTYrn FROM bd_ware a, ac_placestock brn where a.warecode = b.warecode(+)rn and a.WARECODE Like '%010110404%'rn order by warecode) AArn[/code]rnrn怪异现象如下:rn1、原始SQL执行结果的StockQty列全部为0,但是其他列结果都正常。rn2、将原始SQL里的Order by 子句去掉,结果正常,StockQty有值。rn3、将原始SQL里的 like '%010110404%'改成 like '010110404%',结果正常。rn4、按照ac_placestock表的结构重建一个新表ac_placestock2,并将ac_placestock表的数据用insert方式插入ac_placestock2表中,提交事务后将原始SQL里的ac_placestock替换成ac_placestock2,结果正常。rn5、基本上可以判断是ac_placestock表出现了问题,故对此表的主键、索引全部删除,重建,仍用原始SQL查询,结果错误。rn6、统计ac_placestock表,仍用原始SQL查询,结果仍错误。rn7、将ac_placestock表的数据用delete方法删除,并从ac_placestock2表中将数据插回ac_placestock,用原始SQL查询,结果仍错误。rn8、使用 alter table ac_placestock move tablespace XXX将表的数据空间移动,再用原始SQL查询,结果还是错误。rnrn至此,我要崩溃了,实在没明白怎么回事,求高人指点迷津,不甚感激。rnrn有几个异常现象供参考:rn1、该表曾经用过SQLLDR进行直接路径导入过。rn2、数据库上有GoldGuate的测试环境。rn3、关联的两个表都是具有大数据量的表,查询计划看起来都是使用的hash join
非常诡异的图片
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); rn上面的图片在哪里设置的,我找了半天都没找到这个图 rnresources里面没有rn整个工程都找遍了也没有找到
.net 非常诡异的事情
在网站的根目录中随便建一个文件 然后在后台CS文件中(加在page_load中)加入 test.Bll.info my = new test.Bll.info(); 运行这个文件会报错rnrn错误如下:编译器错误消息: CS0426: 类型“test”中不存在类型名称“Bll”rnrn但是我在网站下面建个目录,在这个目录下建个文件,加入上面代码test.Bll.info my = new test.Bll.info(); 则这个文件能正常运行.rnrn如此诡异的事情第一次碰到,印象中我好像是对网站:对网站运行代码分析   出现上面的问题,该如何解决?rnrn电脑环境:windows server 2003+Vs 2005
范型&&诡异异常
Looper 中是使用一个ThreadLocal 来存储 当前线程的 looper的, static final ThreadLocal sThreadLocal = new ThreadLocal(); 在prepare 方法中,对此 ThreadLocal 方法赋值:private static void prepare(boolean quitAllowed) { if (sTh
一个十分诡异的异常!
rn一个十分诡异的异常!rnrn昨天客户反映了一个异常,如下:rn下面是一个很单纯的SQL,往一个备源档 S06020DCCP1插入数据,语法很简单:INSERT INTO S06020DCCP1...SELECT ....rn但是诡异的事情出现了:rn我后面的select 来源资料查询出只有6笔资料,但是执行insert into S06020DCCP1 ... SELECT ....rn居然插入了4035笔资料,感到很奇怪!rn我到客户正式区资料库模拟,确实情况如上。rn更诡异的是:rn居然一会又正常了,即插入6笔,一会又不正常了,即插入4035笔!rn Insert - 4035 row(s), executed in 1.969 sec.rn Total execution time 2 sec.rnrn Insert - 6 row(s), executed in 0.187 sec.rn Total execution time 0.203 sec.rnrn异常一直查到今天,未果! 不知道坛友们是否遇到过,或者有什么想法没?rn总感觉这是在动态变化的。rnrn下面是该SQL语句:rnINSERT INTO S06020DCCP1(CO,COABR,FCTCLASS,FCTCLASSNM,TGDSDAY,DSTPORT,DSTPORTNM,LINECLASSrn ,SOURODERNO,RAMTXSNOYD,OPNRARGN,OPNRADAT,SPEC,SPECNM,SKU,MTCHCLRSrn ,ODQTY,ITM,LVID,VER,SZNUMBER,RGNIDrn ,RGNNM,MTNO,MTNM,COLOR,UNrn ,UQTY,XREM,JMPGASACO,SORTASACO,TXEMP,TXDAT,TXTMrn ,RFLDONE,LISMPID, QTY,LISDP)rnSELECT CO, COABR, FCTCLASS, FCTCLASSNM, TGDSDAY, DSTPORT, DSTPORTNM, LINECLASS, rn SOURODERNO, RAMTXSNOYD, OPNRARGN,OPNRADAT, SPEC, SPECNM, SKU, MTCHCLRS, rn ODQTY, ITM, LVID, VER, SZNUMBER, RGNID, rn RGNNM, MTNO, MTNM, COLOR,UN, rn UQTY, XREM,JMPGASACO, SORTASACO, TXEMP, TXDAT, TXTM, rn RFLDONE, LISMPID, QTY,LISDPrnFROM (rn SELECT DISTINCT dccp1.CO, dccp1.COABR, dccp1.FCTCLASS, dccp1.FCTCLASSNM, dccp1.TGDSDAY, dccp1.DSTPORT, dccp1.DSTPORTNM,dccp1.LINECLASS, rn dccp1.SOURODERNO, dccp1.RAMTXSNOYD, dccp1.OPNRARGN, dccp1.OPNRADAT, dccp1.SPEC, dccp1.SPECNM,dccp1.SKU, dccp1.MTCHCLRS, rn dccp1.ODQTY, dccp1.ITM, dccp1.LVID, dccp1.VER, dccp1.SZNUMBER, dccp1.RGNID,rn dccp1.RGNNM,dca92.mtsid||dca92.colorid||dca92.misectscalesid mtno,'' mtnm, dca92.colorid COLOR, dccp1.UN,rn dccp1.uqty * dca92.unuqty UQTY,dccp1.XREM, dccp1.JMPGASACO,dccp1.SORTASACO, dccp1.TXEMP, dccp1.TXDAT, dccp1.TXTM, rn dccp1.RFLDONE,dccp1.LisMpId, dccp1.QTY ,dccp1.LISDPrn FROM dcp1 dccp1,t06020dca91 dca91,t06020dca92 dca92rn WHERE dca92.co=dca91.co AND dca92.fctclass=dca91.fctclass AND dca92.hmat=dca91.hmat AND dca91.hmat LIKE 'G%'rn AND dccp1.co=dca92.co AND dccp1.mtno=dca91.mtsid||dca91.colorid||dca91.misectscalesid rn AND dccp1.co='3' AND dccp1.txemp='DSP'rn );rnrnrn不好意思,代码编辑器有问题,CSDN无法编辑SQL格式了!
很诡异的异常
2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbcrn严重: A web application registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrn严重: A web application appears to have started a thread named [AWT-Windows] but has failed to stop it. This is very likely to create a memory leak.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@647b3b24]) and a value of type [org.eclipse.birt.report.context.BirtContext] (value [org.eclipse.birt.report.context.BirtContext@5667ec05]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value [org.apache.axis.utils.XMLUtils$ThreadLocalDocumentBuilder@ad9edbe]) and a value of type [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl] (value [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl@69875a82]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@354742ee]) and a value of type [com.ibm.icu.impl.ResourceBundleWrapper] (value [com.ibm.icu.impl.ResourceBundleWrapper@597b3295]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@27360218]) and a value of type [com.ibm.icu.util.ULocale] (value [zh_CN]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value [org.apache.axis.utils.XMLUtils$ThreadLocalDocumentBuilder@ad9edbe]) and a value of type [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl] (value [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl@4ac389c4]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@647b3b24]) and a value of type [org.eclipse.birt.report.context.BirtContext] (value [org.eclipse.birt.report.context.BirtContext@6b89c934]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@354742ee]) and a value of type [com.ibm.icu.impl.ResourceBundleWrapper] (value [com.ibm.icu.impl.ResourceBundleWrapper@597b3295]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@27360218]) and a value of type [com.ibm.icu.util.ULocale] (value [zh_CN]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@647b3b24]) and a value of type [org.eclipse.birt.report.context.BirtContext] (value [org.eclipse.birt.report.context.BirtContext@22f8ac14]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value [org.apache.axis.utils.XMLUtils$ThreadLocalDocumentBuilder@ad9edbe]) and a value of type [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl] (value [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl@73e966fb]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@354742ee]) and a value of type [com.ibm.icu.impl.ResourceBundleWrapper] (value [com.ibm.icu.impl.ResourceBundleWrapper@597b3295]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn2010-9-17 16:28:15 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMaprn严重: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@27360218]) and a value of type [com.ibm.icu.util.ULocale] (value [zh_CN]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.rn
struts2出现诡异异常
自定义了一个拦截器,init方法被执行了,但是intercept方法没有被执行rn下面是自定义拦截器的代码rn[code=Java]package com.test.interceptor;rnrnimport com.opensymphony.xwork2.ActionInvocation;rnimport com.opensymphony.xwork2.interceptor.Interceptor;rnrnpublic class MyInterceptor implements Interceptor rnrn private String hello;rn rn public String getHello() rn return hello;rn rnrn public void setHello(String hello) rn this.hello = hello;rn rnrn public void destroy() rn System.out.println("destroy");rnrn rnrn public void init() rn System.out.println(hello);rn System.out.println("init");rnrn rnrn public String intercept(ActionInvocation invocation) throws Exception rn System.out.println("intercept");rn String result = invocation.invoke();rn return result;rn rnrnrn[/code]rn下面是struts.xml的代码:rnrnrn rn rn worldrn rn rn rn rn rn rn rn rn rn
MyEclipse诡异异常!!!
MyEclipse 诡异异常??每当在页面写如下代码 request.get* 或session.get* MyEclipse必须重启???谁遇到过?我到网上找了,没找到!!!rn
dorado 7.x诡异异常
1.按钮点击向后台查询传表单参数var data = view.get("#formCondition.entity");set("parameter", data);  argument type mismatch报错:页面弹框报错  argument type mismatch原因及解决办法:dataType condition不要指向具体的类...
javamail诡异的504异常
DEBUG: setDebug: JavaMail version 1.4.1 DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] DEBUG SMTP: useEhlo true, useAuth tru
Delphi7的一个诡异的异常
最近碰到一个诡异的异常,十分纳闷。现贴出代码,希望高手帮助:rnrnprocedure TImageDrawer.WrdToScr(dx,dy,dz:Double;var iX,iY:Integer);rnbeginrn iX:=-1;iY:=-1;rn if FProject = nil then exit;rn if (FProject.FPrjParam.XMax = FProject.FPrjParam.XMin) then exit;rn Tryrn iX:=Floor(FImage.ClientWidth*(dx-FProject.FPrjParam.XMin)/(FProject.FPrjParam.Xmax - FProject.FPrjParam.XMin));rnrn Exceptrn on E:Exception dorn Raise Exception.Create('xMax:'+FLoatToStr(FProject.FPrjParam.XMax)rn +#13#10+'xMin:'+FLoatToSTr(FProject.FPrjParam.Xmin)rn +#13#10+'dx:'+FloatToSTr(dx)rn +#13#10+'ImgWidth:'+IntToSTr(FImage.ClientWidth));rn end;rnend;rn其实是个很简单的代码,但总是异常:raised exception class EInvalidOp With Message'Invalid floating point operation'.rn异常后的消息框如图:[img=http://img.my.csdn.net/uploads/201301/01/1357033635_6651.png][/img]rn从中可以看出,没有异常的值,但计算确实异常的。rnrn而且还有一个诡异的地方:这个函数只在另一个函数中调用时出错,如果放在其他的函数中调用,哪怕是所有的输入参数都相同,还是会异常。郁闷之极!!!rn郁闷之极后,将代码该为如下,就更加郁闷了:rnrnprocedure TImageDrawer.WrdToScr(dx,dy,dz:Double;var iX,iY:Integer);rnvarrn dTmp:Double;rnbeginrn iX:=-1;iY:=-1;rn if FProject = nil then exit;rn if (FProject.FPrjParam.XMax = FProject.FPrjParam.XMin) then exit;rn Tryrn [b]dTmp:=FProject.FPrjParam.XMax;[/b][color=#FF0000][/color]rn dZ:= FProject.FPrjParam.XMin;rn dZ:=dTmp - dZ;rn dz:= (dx-FProject.FPrjParam.XMin)/dZ;rn if dZ = 0 thenrn iX:=0rn elsern beginrn dZ:=FImage.ClientWidth * dZ;rn iX:=Floor(dZ);rn end;rnrn Exceptrn on E:Exception dorn Raise Exception.Create('xMax:'+FLoatToStr(FProject.FPrjParam.XMax)rn +#13#10+'xMin:'+FLoatToSTr(FProject.FPrjParam.Xmin)rn +#13#10+'dx:'+FloatToSTr(dx)rn +#13#10+'ImgWidth:'+IntToSTr(FImage.ClientWidth));rn end;rnend;rn郁闷的原因,异常居然发生在dTmp:=FProject.FPrjParam.XMax这一句?实在搞不懂,简单的赋值语句为什么发生异常????
诡异的异常(一)System.NullReferenceException
企业内部系统,日访问量大概4000次(一次登录操作认为1次)rn平均每天抛出 System.NullReferenceException 异常一次(抛出的页面不定)rn[size=24px]为什么?为什么?为什么?[/size]rn下面是 Global.asax 抛出的异常:rnrn[code=XML]rnrn System.Web.HttpUnhandledExceptionrn 7/17/2009 5:05:17 PMrn System.Web.HttpServerUtilityrn 10.201.238.237 dmnw4864rn Exception of type 'System.Web.HttpUnhandledException' was thrown.rn System.NullReferenceExceptionrn System.Webrn at System.Web.UI.Page.HandleError(Exception e)rn at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)rn at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)rn at System.Web.UI.Page.ProcessRequest()rn at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)rn at System.Web.UI.Page.ProcessRequest(HttpContext context)rn at ASP.passpermitform_createnew_aspx.ProcessRequest(HttpContext context)rn at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()rn at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)rn URL:http://10.201.224.14:8080/PassPermitForm/CreateNew.aspx?rid=090717111656433 &ran=Fri Jul 17 17:05:15 UTC+0800 2009rn rn rn System.NullReferenceExceptionrn 7/17/2009 5:05:17 PMrn ASP.global_asaxrn 10.201.238.237 dmnw4864rn Object reference not set to an instance of an object.rn Nullrn Flextronics.EGate.Webrn at Flextronics.EGate.Web.PassPermitForm.CreateNew.Page_Load(Object sender, EventArgs e)rn at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)rn at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)rn at System.Web.UI.Control.OnLoad(EventArgs e)rn at System.Web.UI.Control.LoadRecursive()rn at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)rn 这是上一个异常的内部异常信息rn rn[/code]rnrn[code=XML]rnrn System.Web.HttpUnhandledExceptionrn 7/17/2009 5:05:17 PMrn System.Web.HttpServerUtilityrn 10.200.34.246 dmnw9305rn Exception of type 'System.Web.HttpUnhandledException' was thrown.rn System.NullReferenceExceptionrn System.Webrn at System.Web.UI.Page.HandleError(Exception e)rn at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)rn at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)rn at System.Web.UI.Page.ProcessRequest()rn at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)rn at System.Web.UI.Page.ProcessRequest(HttpContext context)rn at ASP.myinbox_approvehistory_aspx.ProcessRequest(HttpContext context)rn at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()rn at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)rn URL:http://10.201.224.14:8080/MyInbox/ApproveHistory.aspxrn rn rn System.NullReferenceExceptionrn 7/17/2009 5:05:17 PMrn ASP.global_asaxrn 10.200.34.246 dmnw9305rn Object reference not set to an instance of an object.rn Nullrn Flextronics.EGate.Webrn at Flextronics.EGate.Web.MyInbox.ApproveHistory.BindGrid(Int32 pageIndex)rn at Flextronics.EGate.Web.MyInbox.ApproveHistory.Page_Load(Object sender, EventArgs e)rn at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)rn at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)rn at System.Web.UI.Control.OnLoad(EventArgs e)rn at System.Web.UI.Control.LoadRecursive()rn at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)rn 这是上一个异常的内部异常信息rn rn[/code]
诡异的异常(二)System.InvalidCastException
企业内部系统,日访问量大概4000次(一次登录操作认为1次) rn平均每天抛出 System.InvalidCastException 异常一次(抛出的页面不定)rnrn下面是从 Global.asax 捕获的异常:rn[code=XML]rnrn System.InvalidCastExceptionrn 7/22/2009 2:25:25 PMrn ASP.global_asaxrn 10.200.35.204 dmnw6675rn Unable to cast object of type 'System.Boolean' to type 'System.String'.rn Nullrn System.Datarn at System.Data.SqlClient.SqlBuffer.get_String()rn at System.Data.SqlClient.SqlDataReader.GetString(Int32 i)rn at Flextronics.EGate.DAL.User.BuildEntity(SqlDataReader reader) in D:\Project\Flex\EGateUltimate\DAL\User.cs:line 56rn at Flextronics.EGate.DAL.DBUtility.TableAccess`1.GetByPrimaryKey(Object key) in D:\Project\Flex\EGateUltimate\DAL\DBUtility\TableAccess.cs:line 335rn at Flextronics.EGate.Core.Authorization.UserState.GetCurrentUser() in D:\Project\Flex\EGateUltimate\Core\Authorization\UserState.cs:line 38rn at Flextronics.EGate.Core.PageBase.get_CurrentLoginUser() in D:\Project\Flex\EGateUltimate\Core\PageBase.cs:line 46rn at Flextronics.EGate.Web.PassPermitForm.CreateNew.Page_Load(Object sender, EventArgs e)rn at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)rn at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)rn at System.Web.UI.Control.OnLoad(EventArgs e)rn at System.Web.UI.Control.LoadRecursive()rn at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)rn 这是上一个异常的内部异常信息rn rn[/code]rnrn下面是相关的代码:rn[code=C#]rn// User.csrnprotected override UserInfo BuildEntity(System.Data.SqlClient.SqlDataReader reader) rn UserInfo info = new UserInfo();rn info.GUID = DBUtility.SqlUtility.GetString(reader, 0);rn info.ADAccount = DBUtility.SqlUtility.GetString(reader, 1);rn info.EmployeeID = DBUtility.SqlUtility.GetString(reader, 2);rn info.FirstName = DBUtility.SqlUtility.GetString(reader, 3);rn info.LastName = DBUtility.SqlUtility.GetString(reader, 4);rn info.Email = DBUtility.SqlUtility.GetString(reader, 5);rn info.Ext = DBUtility.SqlUtility.GetString(reader, 6);rn info.BuildingID = DBUtility.SqlUtility.GetString(reader, 7);rn info.SegmentID = DBUtility.SqlUtility.GetString(reader, 8); rn info.DepartmentID = DBUtility.SqlUtility.GetString(reader, 9); rn info.IsAdmin = reader.GetBoolean(10);rn info.IsGuard = reader.GetBoolean(11);rn info.Password = DBUtility.SqlUtility.GetString(reader, 12); // 第56行,这一行报错, password字段为char(32)型rn info.Enabled = reader.GetBoolean(13);rn info.JobTitle = DBUtility.SqlUtility.GetString(reader, 14);rn return info;rnrnrn// DBUtility.SqlUtility.GetString(SqlDataReader, int) 方法rnpublic static string GetString(SqlDataReader reader, int columnIndex) rn return reader.IsDBNull(columnIndex) ? null : reader.GetString(columnIndex);rnrn[/code]
诡异的输出,求解
#include rnrntypedef char *byte_pointer;rnrnvoid show_bytes(byte_pointer x, unsigned len)rnrn unsigned i;rn for (i = 0; i < len; i++) rn printf("%.2x ", x[i]);rn rn printf("\n");rnrnrnint main(void)rnrn int num = 3233;rn show_bytes((byte_pointer)&num, sizeof(int));rn return 0;rnrn两种以上的输出结果:rnA. num = 3222时,输出:ffffffa1 0c 00 00rnB. num = 30000时,输出: 30 75 00 00rnrn为什么会这样呢?
一个诡异的变量作用域,求解
class A rn public virtual void eat();rnrnrnclass B extends A rn public virtual void bit();rnrnrnclass C extends Brn int dog=5; rn rn @overridern public void bit()rn new A()rn public void eat()rn int fox=dog + 6; //此处报错, 诡异的变量作用域,此处不能访问class c 的变量dog,求解rn rn rn rn rnrnrnrn
求解!诡异的问题。急
用VS2005做的网站,运行的时候页面载入有点慢,有从上往下刷出来的感觉。很是纳闷!望高手和知情人解答。万分感谢!
诡异的输出,求解
char c=0;rncout<
一个诡异的错误~求解!!!!!!!!!!
,1>------ 已启动生成: 项目: libavcodec_gcc, 配置: Release Win32 ------rn1>正在执行生成文件项目操作rn2>------ 已跳过生成: 项目: libavcodec, 配置: Release Win32 ------rn2>没有为此解决方案配置选中要生成的项目 rn1>"ERROR : please define CC environment variable"rn1>项目 : error PRJ0002 : 错误的结果 1005 (从“C:\Windows\system32\cmd.exe”返回)。rn1>生成日志保存在“file://c:\Users\Administrator.XL-20130622JIUQ\Desktop\MPC-HC\src\filters\transform\mpcvideodec\ffmpeg\BuildLog.htm”rnrnrn有人见过这个错误么?rn我下载了MingGW,用来编译MPC,但是提示这么个错误?咋解决啊?
很诡异的问题~~~~求解!
“/”应用程序中的服务器错误。rn--------------------------------------------------------------------------------rnrn未将对象引用设置到对象的实例。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。rnrn源错误: rnrnrn行 14: rn行 15: window.onload=function()rn行 16: var s='<%=yltax.me.getpoprb()%>';rn行 17: if(s)poprb(title:'工作(周签到)信息提示',content:s);rn行 18: rn rnrn源文件: D:\cs\yltax\common\index4.aspx 行: 16 rnrn堆栈跟踪: rnrnrn[NullReferenceException: 未将对象引用设置到对象的实例。]rn yltax.me.getpoprb() in d:\inetpub\wwwroot\yltax\me.cs:46rn ASP.index4_aspx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) in D:\cs\yltax\common\index4.aspx:16rn System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27rn System.Web.UI.Control.Render(HtmlTextWriter writer) +7rn System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243rn System.Web.UI.Page.ProcessRequestMain() +1926rnrn rn在我自己的机器上正常显示,但一放到服务器上就显示这样的错误。rnpublic static string getpoprb()rn rn System.Web.HttpContext I = System.Web.HttpContext.Current;rn string ret = "";rn string yhip = I.Request.UserHostAddress;rn DataSet ds = me.ExecuteDataSet("select * from l_gzxx where gzfb=1 and yhip=@yhip", "@yhip", yhip);rn if (ds != null)rn rn for (int i = 0; i < ds.Tables[0].Rows.Count; i++)rn rn DataRow dr = ds.Tables[0].Rows[i];rn ret += " " + I.Server.HtmlEncode("" + dr["gzmc"]) + "";rn rn rnrn if(System.DateTime.Now.DayOfWeek.ToString() == "Monday")//周1显示上周签到情况rn rn string rymc = me.ExecuteScalar("select rymc from p_rydm where yhip=@yhip","@yhip",yhip).ToString();rn DataSet ds1 = me.ExecuteDataSet("select * from p_gzsj a left join l_wsqd b on substring(CONVERT(varchar,a.rq, 120 ),1,10)=substring(CONVERT(varchar,b.qdrq, 120 ),1,10) and qdip=@yhip where substring(CONVERT(varchar,a.rq, 120 ),1,10) BetWeen substring(convert(varchar,'"+(System.DateTime.Now.AddDays(-7))+"',120),1,10) and substring(convert(varchar,'"+(System.DateTime.Now.AddDays(-3))+"',120),1,10) order by a.rq","@yhip",yhip) ;rn if (ds != null)rn rn for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)rn rn DataRow dr1 = ds1.Tables[0].Rows[i];rn string qdqk = "";rn if((""+dr1["s_qk"].ToString() == "")||(""+dr1["s_qk"].ToString() == "迟到"))rn rn qdqk="未签到";rn rn elsern rn qdqk=dr1["s_qk"].ToString();rn rn ret += " " + I.Server.HtmlEncode("" + rymc) + "" + I.Server.HtmlEncode("" + dr1["rq"].ToString()).Substring(0,10) + "" + I.Server.HtmlEncode("" + dr1["xq"]) + "" + I.Server.HtmlEncode("" + qdqk) + "";rn rn rn rnrn return ret;rn
关于FileUpload+button的一个非常非常诡异的问题。
小弟有一页面,上有2个控件。rn rn rn想用FileUpload控件用来上传图片,结果不料,在测试其他图片上传时一切正常,但是惟独上传由佳能拍摄的照片时却奇迹般地出现了一个 “无法显示网页” 的窗口,每次都是这样。rn只要选择好图片路径,再一点Button_Photo按钮,就直接导到无法显示网页(中间无响应时间)。 设过断点,但发现Button_Photo_Click里的代码一条都没有执行,最后甚至将原有的Button_Photo_Click里的代码全都注释掉了,问题依旧。rn但是在上传其他文件时全部正常。实在诡异!!!rn曾怀疑是文件名或者路径的问题,但统统尝试过,均得不到解决,希望有高人能够帮忙,再此谢过。rnrn(IDE:Visual studio 2005)
请教一个非常诡异的问题
一个查询网页,根据关键字查询网站内部的一些网页,以链接的形式表现出来,类似于google那种搜索结果,但是问题是,如果用ie去点击搜索结果的链接,点击去竟然是该页无法显示,然后用后退键会到那个搜索结果的页面,此时再随便点击搜索结果中的任意一条链接,结果是正常显示,每次都是这样,搜索东西之后点的第一次搜索结果链接肯定会显示该页无法显示的,但是用后退键再回到那个页面再去点击任意一条结果链接却都正常显示了,只有ie有这个问题,ff很正常,不会出现第一次点击该页无法显示的情况,这是怎么一回事啊,谢谢
非常诡异的面试题 关于三元运算符的
请问下列的输出结果为:rn char ch='E';rn int x =3;rn System.out.println(false?102/2:'e');rn System.out.println(false?x:ch);rn System.out.println(true?ch:x);rn System.out.println(false?3:ch);rnrn答案是:rnern69rn69rnErnrnrn非常郁闷 不晓得为什么是这样的
非常诡异的界面显示 OnCtlColor函数
1 我做的是个对话框程序。rn2 我先定义了一些颜色。rnrn#define write RGB(255,255,255)rn#define yellow RGB(255,255,0)rn#define orange RGB(247,148,29)rn#define red RGB(255,0,0)rnrn3 我用向导生成了函数OnCtlColorrnrnHBRUSH CMyDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) rnrn HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);rn rn // TODO: Change any attributes of the DC herern switch(pWnd-> GetDlgCtrlID())rn rn case IDC_EDIT1:rn rn pDC-> SetTextColor(RGB(0,0,0));rn pDC-> SetBkMode(TRANSPARENT);rn //pDC->SetBkColor(RGB(0,0,0));rn HBRUSH b=CreateSolidBrush(write); rn return b;rn rn case IDC_EDIT2:rn rn pDC-> SetTextColor(RGB(0,0,0));rn pDC-> SetBkMode(TRANSPARENT);rn //pDC->SetBkColor(RGB(0,0,0));rn HBRUSH b=CreateSolidBrush(red); rn return b;rn rn case IDC_EDIT3:rn rn pDC-> SetTextColor(RGB(0,0,0));rn pDC-> SetBkMode(TRANSPARENT);rn //pDC->SetBkColor(RGB(0,0,0));rn HBRUSH b=CreateSolidBrush(red); rn return b;rn rn case IDC_EDIT4:rn rn pDC-> SetTextColor(RGB(0,0,0));rn pDC-> SetBkMode(TRANSPARENT);rn //pDC->SetBkColor(RGB(0,0,0));rn HBRUSH b=CreateSolidBrush(orange); rn return b;rn rn case IDC_EDIT5:rn rn pDC-> SetTextColor(RGB(0,0,0));rn pDC-> SetBkMode(TRANSPARENT);rn //pDC->SetBkColor(RGB(0,0,0));rn HBRUSH b=CreateSolidBrush(red); rn return b;rn rn case IDC_EDIT6:rn rn pDC-> SetTextColor(RGB(0,0,0));rn pDC-> SetBkMode(TRANSPARENT);rn //pDC->SetBkColor(RGB(0,0,0));rn HBRUSH b=CreateSolidBrush(red); rn return b;rn rn case IDC_EDIT7:rn rn pDC-> SetTextColor(RGB(0,0,0));rn pDC-> SetBkMode(TRANSPARENT);rn //pDC->SetBkColor(RGB(0,0,0));rn HBRUSH b=CreateSolidBrush(orange); rn return b;rn rn case IDC_EDIT8:rn rn pDC-> SetTextColor(RGB(0,0,0));rn pDC-> SetBkMode(TRANSPARENT);rn //pDC->SetBkColor(RGB(0,0,0));rn HBRUSH b=CreateSolidBrush(red); rn return b;rn rn default:rn return hbr;rn rnrn // TODO: Return a different brush if the default is not desiredrn return hbr;rn rnrnrnrn4 运行程序,结果诡异的事情发生了。rn我对话框上所有的combo box控件都和IDC_EDIT2的颜色一样,rnIDC_EDIT2的颜色改成什么combo box的颜色就改成什么。rn我看了所有combo box的资源,发现都和IDC_EDIT2不一样。rn然后我再拖了几个combo box在对话框上 发现背景颜色还是和IDC_EDIT2一样。rn
问一个非常诡异的问题
UDP socket的recvfrom返回-1而且errno为111rn(ECONNREFUSED)的时候一般是什么情况呢?这是rn在一个服务程序上面遇到的。这个程序可能在很短rn的时间里面接收到n多的包,用pthread_mutex同步了。rn这些包一般情况下都可以正常的收发,不过运行一段rn时间以后就出现这种情况,而且只是极个别的情况。rnrnman里面说ECONNREFUSED是这样的意思:rnA remote host refused to allow the networkrnconnection (typically because it is notrnrunning the requested service).rn
JSF一个非常诡异的问题?
为什么我的每个JSF文件运行时都会在页面上多出一行“com.sun.faces.saveStateFieldMarkersssss”rnrn导致我的所有的页面转向和后台Action都无法执行。rnrn百思不得其解,没有任何出错信息。提交后就跟刷新一样,没反应rnrnrn高手帮忙分析分析啊
非常诡异,求高手指教
void ShellSort(int *list,int length) //希尔排序rnrn int i;rn int j,m,n;rn int temp;rn i=length;rn while(i>=1)rn rn i=i/2;rn for(j=0;jlist[n])rn rn temp=list[n];rn while(list[m]>temp&&m>0)rn rn list[m+i]=list[m];rn m=m-i;rn rn list[m+i]=temp;rn rn m=n-i;rn rn rn rnrnrnrnrn那个while循环里(list[m]>temp&&m>0)这样子写的话如要给10000数排序就会报错,但(m>0&&list[m]>temp)反过来的话就不会报错,这是为什么啊(报错是指运行时停止工作,如果给少点数排序如100个数,两个都没事),非常诡异。。。
xhtml + CSS 非常诡异的问题!
非常的诡异,页面上必须加上 样式才正常,请问是怎么回事?下面是代码,请保存为html文件后试一下效果,然后删除页面上方的rn 试一下。浏览器IE6.rn[code=HTML]rnrn rnrnrnrn NGO-QMX 论坛 首 页rnrnrn rnrnrn rn rn rn rn 加为好友 加为好友 加为好友 加为好友 加为好友 加为好友 加为好友 加为好友 加为好友 加为好友 加为好友 加为好友 rn rn rn rn rn rn 发表于:2008-9-8 14:56:32rn rn rn rn rn 看不到图.rn rn rn rn rn rn rn rn rn 回复rn rn rn rn rn rn rn rnrnrnrn[/code]rn
VS2008卸载问题~~~~~~~~~~~~~非常诡异
安装的是vs2008 90天试用版,卸载时由于setup打开失败(报的错误是:A problem has been encountered while loading setup components.Canceling setup),所以我就按照网上说的卸载顺序在控制面板中手动卸载,并删除了注册表中关于vs2008的信息。rn现在,问题来了:我打开vs2008,准备重新安装时,它显示的是change or remove,意味着vs2008没卸载,但是我在注册表,program files,控制面板的添加/删除程序中都没有发现vs2008的踪影,当我打开我之前写的c#工程时,发现.resx,.sln文件正常显示。rnrn现在是我重新安装不行(因为setup.exe显示的是change or remove),卸载也不行(用setup.exe卸载,它报错:[color=#FF0000]A problem has been encountered while loading setup components.Canceling setup[/color],手动卸载,已经没有vs2008的相关组件了。)rn因为不想重装系统(如果重装,将会相当麻烦,基本要一天的时间)rn请教高手指点一下~~~~~谢谢!!!!!!!!!!!!!!!!!!!!!!!!!!
异常求解?
[size=24px]Struts Problem ReportrnrnStruts has detected an unhandled exception:rnMessages: rnrn1 a different object with the same identifier value was already associated with the session: [cn.com.su.domain.Supplier#s001]rn2 a different object with the same identifier value was already associated with the session: [cn.com.su.domain.Supplier#s001]; nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [cn.com.su.domain.Supplier#s001]rnrnFile: org/hibernate/engine/StatefulPersistenceContext.javarnLine number: 637rnStacktracesrnorg.springframework.orm.hibernate3.HibernateSystemException: a different object with the same identifier value was already associated with the session: [cn.com.su.domain.Supplier#s001]; nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [cn.com.su.domain.Supplier#s001]rnrn org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:661)rn org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)rn org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)rn org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)rn org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:690)rn cn.com.su.daoimpl.MaterialDaoImpl.addMaterial(MaterialDaoImpl.java:23)rn cn.com.su.serviceimpl.MaterialServiceImpl.addMaterial(MaterialServiceImpl.java:20)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)rn org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)rn org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)rn org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)rn org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)rn $Proxy10.addMaterial(Unknown Source)rn cn.com.su.action.MaterialAction.addMaterial(MaterialAction.java:55)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rn[/size] rnrnrnrn[code=java]rn//添加材料rn public String addMaterial()rn rn Supplier s = (Supplier) ActionContext.getContext().getSession().get("supplier");rn Material material = new Material();rn BeanUtils.copyProperties(getModel(), material);rn Type type = typeService.searchTypeById(getModel().getMaterial_type().getId());rn material.setMaterial_type(type);rn Supplier supplier = supplierService.searchSupplierById(s.getSupplier_id());rn material.setMaterial_supplier(supplier);rn materialService.addMaterial(material);rn success = true;rn return "success";rn rn[/code]rn我知道是不同的对象有相同的标识符导致的错误,但是我不明白为什么会这样,以及解决办法。
mybatis诡异的问题---大神看下
### Error updating database. Cause: java.sql.SQLException: Error accessing PooledConnection. Connection is invalid.rn### SQL: insert into csl_loginoutrecord ( idBgt, Channel, loginIP ) values( ?, ?, ? )rn### Cause: java.sql.SQLException: Error accessing PooledConnection. Connection is invalid.rnorg.apache.ibatis.exceptions.PersistenceException:rn### Error updating database. Cause: java.sql.SQLException: Error accessing PooledConnection. Connection is invalid.rn### SQL: insert into csl_loginoutrecord ( idBgt, Channel, loginIP ) values( ?, ?, ? )rn### Cause: java.sql.SQLException: Error accessing PooledConnection. Connection is invalid.rn at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:150)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:137)rn at com.csl.dao.CslLoginoutrecordDAO.save(CslLoginoutrecordDAO.java:33)rn at com.csl.Util.LoginRegtUtil.LoginFunction(LoginRegtUtil.java:124)rn at com.csl.service.YundingLoginExecutor.execute(YundingLoginExecutor.java:98)rn at com.csl.action.Manegement.execute(Manegement.java:80)rn at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:601)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rnrnrn每天在凌晨1:30 到 2:30 分会出现该错误rn每天早上6:00 也会出现这个错误。其余时间不会出现。郁闷。。。。。rnrnmybatis 配置如下rn rn rn rn rn rn rn rn rn rn rn rn rn
一次诡异的redis连接异常
一、异常出现  启动jar包报异常,异常信息如下,简单分析后初步定位为redis连接异常。 2018-10-23 15:24:00.781 ERROR kmessage [main] [org.springframework.boot.SpringApplication] - Application run failed org.springframework.context.Applic...
大神,请进。诡异的类型转换异常。
各位大牛,来看看看这个异常吧。rnrn代码背景:rn这是两个项目的整合,在A项目中用session set了一个对象,然后将其封装到一个servletContext中,代码如下:rn[code=Java]HttpSession session = request.getSession(true);rn session.setAttribute(Constant.USER_SESSION, user);rn ServletContext context=session.getServletContext();rn context.setAttribute("session", session);[/code]rnrn然后在B项目中获取这个user对象,代码如下:rn[code=Java]HttpSession session=request.getSession();rn ServletContext Context=session.getServletContext();rn ServletContext Context1=Context.getContext("/A");rn if(Context1 !=null && !Context1.equals("")) rn HttpSession sess =(HttpSession)Context1.getAttribute("session");rn User user=(User)sess.getAttribute(Constant.USER_SESSION);rn if(user!=null)rn System.out.println("username:--------"+user.getUserName());rn [/code]rn然后抛出一个类型转换异常:rn[code=Java]java.lang.ClassCastException: com.nodoor.vo.User cannot be cast to com.nodoor.vo.User[/code]rn我这样测试了下:System.out.println(sess.getAttribute(Constant.USER_SESSION) instanceof User)rn结果竟然是false....求解。。。。rn诡异的异常。纠结我一天了。。求解脱。rn
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池