为什么相应添加的注解我也添加了,然后运行时会报错说无法解析xml文件路径异常

卡了几天![![图片说明](https://img-ask.csdn.net/upload/201703/15/1489578000_942246.png)图片说明](https://img-ask.csdn.net/upload/201703/15/1489577967_955536.png)图片说明

0

1个回答

查看工作目录里的路径位置,是不是和当前.java是同一路径,在你xxx.xml前加个“../”试试

0
CK_zoubo
只想你仍安好 不行,还是会报同样的错误!这个Spring采用注解来配置bean需要导入其他的jar包的吗?
2 年多之前 回复
CK_zoubo
只想你仍安好 不行
2 年多之前 回复
CK_zoubo
只想你仍安好 不行,还是会报同样的错误!这个Spring采用注解来配置bean需要导入其他的jar包的吗?
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
添加了JBabel报错
代码:rnimport java.awt.*;rnimport javax.swing.*;rnrnpublic class classSalutonFrame extends JFramern public classSalutonFrame()rn setTitle("google"); //from名称rn //super("QQ"); //from名称rn setSize(400,300); //from大小rn setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//单击按钮时退出程序rn setVisible(true);//是否显示rn FlowLayout flo=new FlowLayout();rn setLayout(flo);rn JButton ok=new JButton("确定");rn JButton quit=new JButton("退出");rn JLable pagelable=new JLable("地址",JLable.RIHGT);rn JTextFiele addess=new JTextFiele(20);rn add(ok);rn add(quit);rn //FlowLayout flo=new FlowLayout();rn //setLayout(flo);rn add(pagelable);rn add(addess);rn setVisible(true);rn rnrnrnrnrn错误:rnrnclassSalutonFrame.java:15: 找不到符号rn符号: 类 JLablern位置: 类 classSalutonFramern JLable pagelable=new JLable("地址",JLable.RIHGT);rn ^rnclassSalutonFrame.java:15: 找不到符号rn符号: 类 JLablern位置: 类 classSalutonFramern JLable pagelable=new JLable("地址",JLable.RIHGT);rn ^rnclassSalutonFrame.java:15: 找不到符号rn符号: 变量 JLablern位置: 类 classSalutonFramern JLable pagelable=new JLable("地址",JLable.RIHGT);rn ^rnclassSalutonFrame.java:16: 找不到符号rn符号: 类 JTextFielern位置: 类 classSalutonFramern JTextFiele addess=new JTextFiele(20);rn ^rnclassSalutonFrame.java:16: 找不到符号rn符号: 类 JTextFielern位置: 类 classSalutonFramern JTextFiele addess=new JTextFiele(20);rn ^rn
为什么说我Snake无法解析?
rnimport javax.swing.*;rnrnrnrnimport java.awt.*;rnimport java.awt.event.*;rnimport java.util.*;rnrnpublic class Game rn public static void main(String args[]) rn GameSnake gs = new GameSnake();rn rn rnrnrnclass GameSnake implements KeyListener rn rn JLabel jlabel;rn JPanel jpanel;rn JFrame jframe; rn rn rn static int panelWidth = 294;rnrn static int panelHeight = 450;rnrn int rectX = 15;rnrn int rectY = 15;rnrn Snake snake; rnrn Node n;rnrn public GameSnake() rn jframe=new JFrame("贪吃蛇DEMO!");rn jframe.setLayout(new BorderLayout());rn Container cp=jframe.getContentPane();rn jlabel=new JLabel("welcome");rn jlabel.setText("Welcome my friend! Enjoy your self!");rn rn cp.add(jlabel,BorderLayout.NORTH);rn jpanel=new JPanel();rn jpanel.setLayout(new BorderLayout()); rn cp.add(jpanel,BorderLayout.CENTER);rn rnrnrn jframe.pack();rn snake = new Snake(this, panelWidth / rectX, panelHeight / rectY);rn setBackground(Color.WHITE);rn setSize(panelWidth, panelHeight);rn setFocusable(true);rn addKeyListener(this);rn rn rnrn public void paintComponent(Graphics g) rn super.paintComponent(g);rn Graphics2D g2 = (Graphics2D) g;rn LinkedList list = Snake.snakeList;rn Iterator it = list.iterator();rn g2.setColor(Color.black);rn while (it.hasNext()) rn n = (Node) it.next();rn drawNode(g2, n);rn rn g2.setColor(Color.ORANGE);rn Node f = snake.food;rn drawNode(g2, f);rn snake.drawMap(g2);// 绘制地图rn rnrn public void keyPressed(KeyEvent e) rn int keycode = e.getKeyCode();rn if (keycode == KeyEvent.VK_ENTER) rn begin();rn else if (keycode == KeyEvent.VK_UP) rn snake.changeDirection(Snake.up);rn else if (keycode == KeyEvent.VK_DOWN) rn snake.changeDirection(Snake.down);rn else if (keycode == KeyEvent.VK_LEFT) rn snake.changeDirection(Snake.left);rn else if (keycode == KeyEvent.VK_RIGHT) rn snake.changeDirection(Snake.right);rn else if (keycode == KeyEvent.VK_S) rn Snake.run = false;rn rn rnrn public void keyReleased(KeyEvent e) rn rnrn public void keyTyped(KeyEvent e) rn rnrn public void drawNode(Graphics2D g, Node n) rn g.fillRect(n.x * rectX, n.y * rectY, rectX - 2, rectY - 2);rn rnrn public void begin() rn Snake.run = true;rn SnakeThread thread = new SnakeThread(snake);rn thread.start();rn rnrn public void repaint()rn int score=snake.getScore();rn jlabel.setText("您的得分是:"+score);rn rn rnrnrnrnrnclass Node rn int x;rnrn int y;rnrn public Node(int x, int y) rn this.x = x;rn this.y = y;rn rnrnrnclass SnakeThread extends Thread rn Snake snake;rnrn public SnakeThread(Snake s) rn snake = s;rn rnrn public void run() rn rn int interval=200;rn rn boolean pause=false;rnrn double speedRate=0.5;rnrn Snake.run = true;rn rn GameSnake gs;rnrn while (Snake.run) rn try rn snake.move();rn sleep(interval);rn rn catch (InterruptedException e) rn e.printStackTrace();rn rn if(!pause)rn if(move())rn gs.repaint();rn rn elsern JOptionPane.showMessageDialog(null, "sorry myboy,GAME OVER!", "message", JOptionPane.INFORMATION_MESSAGE);rn break;rn rn rn rn Snake.run = false;rn rnrnrnclass Snake rn GameSnake gs;rnrn Node food;rnrn boolean[][] all;rnrn public static boolean run;rnrn int maxX;rnrn int maxY;rnrn public static int left = 1;rnrn public static int up = 2;rnrn public static int right = 3;rnrn public static int down = 4;rn rn int interval=200;rn rn boolean pause=false;rnrn double speedRate=0.5;rnrnrnrn int direction = 4;rn rn int score=0;rnrn LinkedList snakeList = new LinkedList();rnrn public Snake(GameSnake p, int maxX, int maxY) rn gs = p;rn this.maxX = maxX;rn this.maxY = maxY;rn all = new boolean[maxX][maxY];rn for (int i = 0; i < maxX; i++) rn for (int j = 0; j < maxY; j++) rn all[i][j] = false;rn rn rn int arrayLength = maxX > 20 ? 10 : maxX / 2;rn for (int i = 0; i < arrayLength; i++) rn int x = maxX / 10 + i;rn int y = maxY / 10;rn snakeList.addFirst(new Node(x, y));rn all[x][y] = true;rn rn food = createFood();rn all[food.x][food.y] = true;rn rnrn // 蛇移动的方法rn public void move() rn Node n = (Node) snakeList.getFirst();rn int x = n.x;rn int y = n.y;rnrn if (direction == 3) rn x++;rn else if (direction == 4) rn y++;rn else if (direction == 1) rn x--;rn else if (direction == 2) rn y--;rn rn // 实现对蛇撞到自身的检测rn if ((0 <= x && x <= GameSnake.panelWidth / 15 - 1)rn && (0 <= y && y <= GameSnake.panelHeight / 15 - 1)) rn if (all[x][y]) rn if (x == food.x && y == food.y) rn snakeList.addFirst(food);rn food = createFood();rn all[food.x][food.y] = true;rn else rn JOptionPane.showMessageDialog(null, "你撞到自己了");rn System.exit(0);rn rn else rn snakeList.addFirst(new Node(x, y));rn all[x][y] = true;rn Node l = (Node) snakeList.getLast();rn snakeList.removeLast();rn all[l.x][l.y] = false;rn rn else rn JOptionPane.showMessageDialog(null, "越界了,游戏结束");rn System.exit(0);rn rn gs.repaint();rn rnrn public Node createFood() rn int x = 0;rn int y = 0;rn do rn Random r = new Random();rn x = r.nextInt(maxX - 10);rn y = r.nextInt(maxY - 10);rnrn while (all[x][y]);rn return new Node(x, y);rn rn rn //获取当前游戏得分rn public int getScore()rn return this.score;rn rn rn //加速rn public void speedUp()rn interval*=speedRate;rn rn //减速rn public void speedDown()rn interval/=speedRate;rn rn //设置暂停rn public void chagePause()rn pause=!pause;rn rn //设置方向rn public void chageDirection(int newdirection)rn if(direction % 2 != newdirection % 2)rn direction=newdirection;rn rn rnrnrnrnrn//设置蛇不能回头rn public void changeDirection(int newDirection) rn if (direction % 2 != newDirection % 2) rn direction = newDirection;rn rn rnrn public void drawMap(Graphics2D g) rn for (int i = 0; i < maxX; i++) rn for (int j = 0; j < maxY; j++) rn if (all[i][j] == true) rn g.setColor(Color.red);rn g.fillRect(i, j, 4, 4);rn rn rn rn rnrnrnrn
也说Java文件路径
对于Java文件路径,网上看的很多,但未必对自身的系统正确,唯有自己实践出真知。         立此存照,以备候查。环境jdk1.8.0-66. public class MyClass { public static void main(String[] args) { System.out.println("getClass().getResource(\"\"): " + My
为什么我已经添加了引用,还报错找不到命名空间?
我新建了一个类库,取名为Common.然后在一个原有的项目中添加了这个类库的dll引用,结果发现原有的这个项目中已经有一个叫Common的类.因为原有的这个项目不让对已有程序做改动,所以我将我自己的这个Common类库里的文件复制到一个新项目CommonDB中,把里面每个类的命名空间都对应改为了CommonDB.然后重新把这个类库添加到原项目的引用里.但是编译有错误:rn"E:\bjydper\DigiArch\testliu.aspx.cs(11): 找不到类型或命名空间名称“CommonDB”(是否缺少 using 指令或程序集引用?)"rn谁知道是什么原因?(引用里可以肯定是添加了的)rn
g++编译时添加-I添加了一个头文件路径导致编译错误
今天使用Jsonapp,  在编译时添加了头文件搜索路径-Ixxx/json ,结果导致很多错误,如下:rnIn file included from /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:482:0,rn from /usr/include/c++/5/iostream:38,rn from JsonProcess.cpp:1:rn/usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h:44:19: error: missing binary operator before token "("rn #if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE)rn.....rn.....rnIn file included from /usr/include/libio.h:56:0,rn from /usr/include/stdio.h:74,rn from JsonProcess.cpp:2:rn/usr/include/x86_64-linux-gnu/sys/cdefs.h:41:20: error: missing binary operator before token "("rn # if __GNUC_PREREQ (4, 6) && !defined _LIBCrn....rn/usr/include/c++/5/cwchar:208:11: error: ‘::wmemchr’ has not been declaredrn using ::wmemchr;rn....rnrnrn去掉这个指定路径可以编译通过.  另外,我还试了一下,在cpp文件中include xxx/json下的所有头文件时是可以rn编译通过的,只有添加-I后才出错. rn为什么涅?
为什么ASSERT(m_pFindDialog == NULL);运行时会报错??
在一个菜单的消息函数中有:rn ASSERT(m_pFindDialog == NULL);rn m_pFindDialog = new CFindReplaceDialog();rn m_pFindDialog->Create(TRUE, "Initial Text", NULL, FR_DOWN, this);rnrn可以一点菜单就报错,说的就是:rn ASSERT(m_pFindDialog == NULL);rn这行的意思不就是为了让m_pFindDialog的对象唯一吗,好让我产生的FindReplace对话框唯一吗?这有什么不对的,运行后为什么要报错呢。rn好像MSDN里关于这个也是这样写的呀?rnrn如果我将其关闭 : //只是rn m_pFindDialog = new CFindReplaceDialog();rn m_pFindDialog->Create(TRUE, "Initial Text", NULL, FR_DOWN, this);rn点菜单,不会报错,会弹出FindReplace对话框。rnrn但是问题是:再点一次菜单,又出现一个,这就不唯一了!。rnrn这难道和我的变量:rnm_pFindDialog 的定义有什么关系吗。 -------我的初步估计。rn我只是在这个类定义中 rnCFindReplaceDialog* m_pFindDialog;rn没有在构造函数中:CFindReplaceDialog m_pFindDialog = rn new FindReplaceDialog();rn这应该对着呢呀?rn因为,ASSERT(m_pFindDialog == NULL);的后面,才是rnm_pFindDialog = new CFindReplaceDialog();rn--------------------------------------rnrn以上到底是怎么回事呀?rnrn
我在前台添加了一个html控件,为什么后台不自动添加一个相应的类~~~急
而我自己添加了相应的类之后比如rnrnprotected System.Web.UI.HtmlControls.HtmlInputFile upload_file;rn为什么后台的upload_file有postedFile属性.但运行的时候却报错对象未实例化~~rnrn而前台的属性查看器也未见到此属性~~
.net2005为什么说我的文件路径不对?
.net2005为什么说我的文件路径不对?rnrnstring strfile = "d:\test.xml";rnxmlDocument ar;rnar.load(strfile );rnrnrn报错:请使用正确的文件路径rnrnrn为什么?rntest.xml就在d盘的。rnrnrn
数据为什么添加了两次???
rn<%rnptitle=request.Form("ptitle")rnimagePath=request.Form("imagePath")rnif request.Form("info")<>"" thenrninfo=request.Form("info")rnelserninfo="暂无该产品信息"rnend ifrnSqlStr="select * from product"rnrs.open SqlStr,conn,1,3rnrs.addnewrnrs("p_title")=ptitlernrs("p_imagepath")=imagepathrnrs("p_info")=infornrs.updaternrs.closernset rs=nothingrnconn.close rnset conn=nothingrnresponse.Redirect("manage.asp")rn%>rnrn上面的代码。 把数据添加到数据。怎么老是添加了两次的?rn 请教~
为什么打印机不能添加了???
系统是XP的,在控制面板中不能在添加打印机了,而且以前添加的打印机都不见了。而且从网上邻居中打开这台电脑,也看不见“打印机”这个共享文件夹,这是为什么,有没有解决方法???????????
为什么delete时会报错
源代码如下:rnrnvoid main()rnrn int i,j;rn double **p;rn p=new double*[1000];rnrn for (int m=0;m<5000;m++)rn rn p[m]=new double[5000];rn rn clock_t beg, end; rn double time;rn beg=clock();rn for (i=0; i<1000; i++) rn rn for (j=0; j<5000; j++) rn rn p[i][j]=0.5;rn rn rn rn for (i=0; i<1000; i++) rn for (j=0; j<5000; j++) rn p[i][j]=p[i][j]*p[i][j]+2.0*p[i][j]+10.0;rn rn rn rn end=clock();rn time=(double)(end-beg)/CLOCKS_PER_SEC;rn printf("Compute time is %f seconds\n",time);rn for (int n=0;n<5000;n++)rn rn delete[] p[n];rn rn delete[] p;rnrnrn报错:file:dbgdel.cpprn line:47 rn Expression:_BLOCK_TYPE_IS_VALID(pHesd->nBlockUse)
为什么我读文件时会引起MouseMove的异常
废话不多说,直接发程序 :rnprivate void button8_Click(object sender, EventArgs e)rn rn OpenFileDialog openFileDialog1 = new OpenFileDialog();rn openFileDialog1.InitialDirectory = "C:\\Documents and Settings\\Administrator.151SERVER\\桌面\\wanban";rn openFileDialog1.Filter = "Text files(*.txt)|*.txt|All files(*.*)|*.*";rn openFileDialog1.FilterIndex = 1;rn openFileDialog1.RestoreDirectory = true;rn pictureBox1.Image = new Bitmap(pictureBox1.ClientSize.Width, pictureBox1.ClientSize.Height);rn if (openFileDialog1.ShowDialog() == DialogResult.OK)rn rn Graphics g = Graphics.FromImage(pictureBox1.Image);rn StreamReader sr = new StreamReader(openFileDialog1.FileName); rn g.Clear(SystemColors.ControlLightLight);rn string line;rn int[] rect = new int[40];rn rn while ((line = sr.ReadLine()) != null)rn rn string[] toks = line.Split(new char[] ' ', ',', '\t' );rn for (int i = 0; i < Math.Min(rect.Length, toks.Length); i++)rn rn int.TryParse(toks[i], out rect[i]);rn rn //rn // use coordinates in every line to draw an ellipsern //rn //g.DrawEllipse(Pens.PeachPuff, rect[0], rect[1], rect[2], rect[3]);rn g.FillEllipse(new SolidBrush(Color.Yellow), rect[0], rect[1], rect[2], rect[3]);rn rn pictureBox1.Refresh();rn g.Dispose();rn m_FileName = openFileDialog1.FileName; rn rn rn上面时一个读文件程序,可动态的加载图像,当我读取一个文件,把里面的数据读出,然后画图,再把他加载到picturebox上去,就是此时,MouseMove出现了异常,但是只要按了继续运行后,以后读取就不会有异常出现了,为什么?第一次出现的异常如何解决掉,因为我还需要再MouseMove上继续编写画图的程序。rnprivate void pictureBox1_MouseMove(object sender, MouseEventArgs e)rn rn if (e.Button != MouseButtons.Left)rn return; rn newPoint.EndX = e.X;rn newPoint.EndY = e.Y;rn rn switch (newType)rn rn case ImageType.Pick:rn if (picked == true && changed != true)rn rn mouseMove = true;rn int MoveX = newPoint.EndP.X - newPoint.StartP.X;rn int MoveY = newPoint.EndP.Y - newPoint.StartP.Y;rn RegionMove(regionIndex, MoveX, MoveY);rn if (drawImageType[regionIndex] != (int)ImageType.Path)rn rn drawingList[regionIndex].pointchange(pointArray[regionIndex]);rn rn elsern rn regionPath = (GraphicsPath)mousePath.Clone();rn Matrix translateMatrix = new Matrix();rn translateMatrix.Translate(MoveX, MoveY);rn regionPath.Transform(translateMatrix);rn drawingList[regionIndex].pathChange(regionPath, false);rn rn PointChange(regionIndex);rn rn if (changed == true && drawImageType[regionIndex] != (int)ImageType.Path)rn rn mouseMove = true;rn pointArray[regionIndex][pointIndex] = newPoint.EndP;rn if (drawImageType[regionIndex] == (int)ImageType.Rectanglern || drawImageType[regionIndex] == (int)ImageType.FillRectanglern || drawImageType[regionIndex] == (int)ImageType.Ellipsern || drawImageType[regionIndex] == (int)ImageType.FillEllipse)rn rn tempChangePoint = new MousePoint(pointArray[regionIndex][1 - pointIndex].X, pointArray[regionIndex][1 - pointIndex].Y);rn tempChangePoint.EndX = pointArray[regionIndex][pointIndex].X;rn tempChangePoint.EndY = pointArray[regionIndex][pointIndex].Y;rn regionCollection[regionIndex] = new Region(tempChangePoint.Rect);rn rn drawingList[regionIndex].pointchange(pointArray[regionIndex]);rn PointChange(regionIndex);rn rn break;rn rn pictureBox1.Invalidate();rn rn上面的程序时模拟画板的,可移动画出来的图形。
添加了lib,为什么说找不到.h文件呢?
我在carbide C++中的一个简单程序的MMP中添加了一 lib,(这个lib是symbian的)rn然后在cpp文件中写上 rn#include rn为什么编译提示说这个LIB中的 client.h cannot be opened 呢????rn如何解决呢??谢谢了。
sturts的映射文件配置的常量 我添加了注解
-
为什么运行时会抛出异常?
import java.io.*; rn public class Forest implements Serializable rnrn private Tree tree = new Tree(); rn public static void main(String [] args) rn Forest f = new Forest(); rn try rnrn FileOutputStream fs = new FileOutputStream("Forest.ser"); rn ObjectOutputStream os = new ObjectOutputStream(fs); rn os.writeObject(f); rn os.close(); rn catch (Exception ex) ex.printStackTrace(); rn rn class Tree rn rn
为什么运行时会失败
//RTrnrn#include rnusing namespace std;rnrnint foobar(int *pi)rnrn *pi=1024;rn return res;rnrnrnint main()rnrn int *pi2=0;rn int ival=foobar(pi2);rn return 0;rn
菜问题!我添加了#include "ICMPHeader.h",然后就出错了。
我在自己写的一个类(CPing)前面添家了#include "ICMPHeader.h",然后报错。rn我在自己的类里有这样两句语句:CICMPHeader m_hdrICMP;和void FillICMPPacket(ICMPHeader *pHeader,UINT nBufferSize);去掉这个头文件的话这两句话又出错。
在使用C#中添加了menu,也添加了一些东西, 但为什么在运行的时候显示不出来,
在使用C#中添加了menu,也添加了一些东西, 但为什么在运行的时候显示不出来,是什么原因啊,我是刚学的, 要怎么办才能显示出来呢,请详细说明, 谢谢!!
添加了个类CMemDC, 却报错
添加了一个新的头文件,CMemDC.h ,没有CMemDC.cpp 里面声明并定义了一个小类CMemDC,其基类是CDCrn别的类中已包含CMemDC.hrnrnCMemDC memDC ;rn用的时候却报错 rnMemDC :CMemDC' : undeclared identifierrnmissing ';' before identifier 'memDC'rnrn请指点
sping为什么每次添加了plug-in标签就会报错呢?
2010-5-5 23:56:35 org.apache.catalina.core.ApplicationContext logrn严重: action: nullrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)VrnCaused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Vrn at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)rn at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173)rn at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)rn at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)rn at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)rn at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)rn at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)rn at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)rn at net.sf.cglib.proxy.Enhancer.(Enhancer.java:69)rn at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)rn at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)rn at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)rn at org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:135)rn at org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:55)rn at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:56)rn at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:295)rn at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434)rn at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:109)rn at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)rn at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)rn at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:285)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationContext(ContextLoaderPlugIn.java:354)rn at org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:295)rn at org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:225)rn at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)rn at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)rn at javax.servlet.GenericServlet.init(GenericServlet.java:212)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:578)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
shell脚本添加了function就会报错
[code=PHP]#!/bin/shrnfunction urlencode()rnrn echo $1 | tr -d '\n' | xxd -plain | sed 's/\(..\)/%\1/g'rnrnrnusage="Usage: mdb "rncase "$1" inrn "apply")rn # echo $0 apply attribute value!rn submit commitrn ;;rn "get")rn # echo $0 get $2 valuern case "$2" inrn fw_version)rn rgdb -i -g /runtime/sys/info/firmwareVersionrn ;;rn[/code]rnrn代码没写完整,想说的问题是:当我把function那四行注释掉,脚本能正常运行。可是如果加上function的代码,就算脚本里没有调用它,运行脚本,仍会报错“syntax error”。不知道哪里错了,希望大家帮忙。
locationManager.requestLocationUpdates方法的添加了权限,依然报错
将方法的权限添加进去,依然报错,求大神指点rn[img=https://img-bbs.csdn.net/upload/201711/17/1510920288_60269.png][/img]rn在使用方法时rn[img=https://img-bbs.csdn.net/upload/201711/17/1510920325_369512.png][/img]rn依然报错rn[img=https://img-bbs.csdn.net/upload/201711/17/1510920366_324155.png][/img]
为什么我的VB运行时会清空剪贴板?
为什么我的VB运行时会清空剪贴板?
QNetworkAccessManager定义对象报错,说构造函数无法解析
代码如下[code=c]#include rn#include rn#include rn#include rn#include rn#include rn#include rn#include rnrnclass Dialog : public QDialogrnrnpublic:rn Dialog(QWidget *parent = 0);rnprotected slots:rn void httpDownload();rn void replyFinished(QNetworkReply*reply);rn void onUploadProgress(qint64 bytesSent,qint64 butesTotal);rnrnprivate:rn QPushButton *download_Btn;rn QFile *file;rn QNetworkAccessManager *accessManager;rn QNetworkRequest request;rn QNetworkReply *reply;rn QHBoxLayout *layout;rn;rnrn#endif // DIALOG_H[/code]rnrnrnrnrn[code=c]#include "dialog.h"rn#includernDialog::Dialog(QWidget *parent): QDialog(parent)rnrn download_Btn=new QPushButton("download");rn layout=new QHBoxLayout();rn layout->addWidget(download_Btn);rn layout->sizeHint().height();rn setLayout(layout);rn connect(download_Btn,SIGNAL(clicked()),this,SLOT(httpDownload()));rnrnvoid Dialog::httpDownload()rn //QUrl url("http://localhost:8080/uploadtest/MyUpload");rn QUrl url("http://www.baidu.com");rn QByteArray post_data;//上传的数据可以是QByteArray或者file类型rn post_data.append("hello");rn file=new QFile("/home/vino/Desktop/a.txt");rn file->open(QIODevice::ReadOnly);//只读方式打开文件rn accessManager=new QNetworkAccessManager(this);rnrn request.setUrl(url);rn /******************设置http的header***********************/rn // request.setHeader(QNetworkRequest::ContentTypeHeader, "multipart/form-data");rn // request.setHeader(QNetworkRequest::ContentTypeHeader, "application/octet-stream");//上传文件rn // request.setRawHeader("Content-Disposition","form-data;name='doc';filename='a.txt'");rn //request.setHeader(QNetworkRequest::ContentLengthHeader,post_data.length());rnrnrn connect(accessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));//finish为manager自带的信号,replyFinished是自定义的rn reply=accessManager->post(request,post_data);//通过发送数据,返回值保存在reply指针里.rnrn //connect(reply, SIGNAL(uploadProgress ( qint64 ,qint64 )), this, SLOT( onUploadProgress(qint64 ,qint64 ));//上传文件时进度rnrn //void QNetworkReply::downloadProgress ( qint64 bytesReceived, qint64 bytesTotal ) qt也有提供下载文件的进度rnrnrnvoid Dialog::replyFinished(QNetworkReply *reply)rn //获取响应的信息,状态码为200表示正常rn QVariant status_code = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);rnrn //无错误返回rn if(reply->error() == QNetworkReply::NoError)rn rn download_Btn->setText("success");rn QByteArray bytes = reply->readAll();rn QString result(bytes); //转化为字符串rn qDebug()<setText("failed");rn rnrn reply->deleteLater();//要删除reply,但是不能在repyfinished里直接delete,要调用deletelater;rnrnrnrnvoid Dialog::onUploadProgress(qint64 bytesSent, qint64 butesTotal)rnrn[/code]rnrnrn帮看下
xml注解用法造成的异常
javax.persistence.PersistenceException: Unable to configure EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:265) at org.hibernate.ejb.HibernatePersiste...
在WIN2000下tcpclient.SendData时会报错,为什么?
在WIN2000下执行tcpclient.SendData时报“实时错误 40006,所需事物或请求的错误协议或连接状态”,而在WIN98下运行正常,为什么?请各位高手帮帮我!
Jquery为什么无法解析 XML呢?!
http://topic.csdn.net/u/20100731/12/ad4d6c11-6a83-4427-aef1-b1c48c7f1ad0.html?96407rn代码很清晰!rnrnrn在asp.net区没人鸟我rn那位高手帮我看看rn
菜单添加了运行不显示
原来程序没有menu 打开就是 视频画面(directshow的例子 playcap)rn我添加一个菜单--file helprn添加之后 运行 还是没有我添加的 菜单。。。。rn请指点
为什么退出表单时会报错?
在退出表单时,我一次选择使用过的工作区并用use关闭所有的表,最后用sele 1选择一个不用的工作区,并使用了close all和release thisformrn但退出时仍会报错说cannot access the selected tablern哪位大虾可否指点一二?深表感谢
程序编译之后不能运行(动态库我都添加了)
我用的是pb7,我的程序在pb下是好用的,编译之后运行系统报错:‘该程序执行了非法操作’,pb该连的动态库我都拷过去了。我又重新写了个最简单的应用(hello )编译之后还是报相同的错,不知哪位大侠能帮我解决这个问题?rn急!!在线等待!
spring2.5 加了事务注解报错的解决
Spring 2.5 的包和所依赖的包加上 , 配置了数据库连接,  事务控制 , IBATIS 的 SQLMAP 配置 .   当在SERVICE前 加事务标记  @Transactional 后, 启动报错     2011-7-22 22:39:12 org.apache.catalina.core.StandardContext listenerStart 严重: Excep...
为什么vb.net报错说我的insert into语法错误
TempDate = CDate(LblNow.Text.Trim)rn TempName = CmbName.Text.Trimrn TempValue = CDbl(CmbValue.Text.Trim)rn TempQty = CInt(TxtQty.Text.Trim)rn TempPay = CDbl(TxtPay.Text.Trim)rn SqlStr = "INSERT INTO OrderInfo (Date,CardName,CardValue,Quantity,Payment) VALUES (" & _rn TempDate & ",'" & TempName & "'," & TempValue & "," & TempQty & "," & TempPay & ")"
添加了引用为什么在页面不能用
新建的一个winform 添加了原来的引用,但在页面就是不能用,有知道的帮帮忙。谢了急用!!!
菜单栏添加了消息处理,为什么还是灰的
我做的SDI单文档程序,rn利用CLASSWIZARD给菜单栏添加消息, rnrn如果选择在CMAINFRAME类中添加消息,那么菜单栏目是亮的,因为它已经有了消息处理函数。rnrn但是如果选择在我自己定义的对话框CMyDialg中添加了消息,那么尽管已经写了消息处理函数,可是菜单栏目还是灰的,怎么办啊??
为什么添加了用户不能登陆?
我使用命令添加了一个用户以后不能登陆。rn但是我使用root把他的密码改了以后,再登陆就可以了rn为什么?
为什么添加了OnSize却没反应~
OnSize不是响应队列消息吗?rn我在一个基于对话框的程序中重载了OnSize函数~rn内容只是AfxMessageBox~可是好像不响应最大最小化消息~
为什么添加了@Aspect 还要加@Component
官方文档中有写: You may register aspect classes as regular beans in your Spring XML configuration, or autodetect them through classpath scanning - just like any other Spring-managed bean. However, note that...
已经添加了引用,为什么还说没找到?
rnusing System.Web;rnusing System.Web.SessionState;rnrnrnHttpCookie cookie = Request.Cookies["DigitalLib_ReaderId"];rnrnif(Session["ReaderId"]!=null)rnrnrnrnD:\ASP\DigitalLib_1\Components\ReadingCartDB.cs(232): 找不到类型或命名空间名称“Request”(是否缺少 using 指令或程序集引用?)rnrnD:\ASP\DigitalLib_1\Components\ReadingCartDB.cs(236): 名称“Session”在类或命名空间“DigitalLib.ReadingCartDB”中不存在rnrn
我也说RUBY
好久不来,都荒的长草了。写点关于Ruby的话。 最近看到又有一个新的Script语言Falcon面世了。众多评论中,偶见一条,说“Ruby臻于完美,就是性能不佳”。 首先澄清立场,我是做Ruby处理机(interpreter, processor)开发的,但我本人不太会写Ruby script。 Ruby最大的问题是什么?很多人都会拿speed说事。但其实放在整个系统中,大多数情...
WPF,添加了类库,为什么不能using
[img=https://img-bbs.csdn.net/upload/201405/26/1401091147_76160.jpg][/img]rn[img=https://img-bbs.csdn.net/upload/201405/26/1401091156_172453.jpg][/img]rn在WPF项目中,添加了一个自定义的类库Limits,为什么在项目中不能using呢,老是报错:未能找到类型或命名空间名称“Limits”(是否缺少 using 指令或程序集引用?) rn