
Java
文章平均质量分 87
iceagezw
这个作者很懒,什么都没留下…
展开
-
Class.forName加载mysql驱动总是产生ClassNotFoundException异常
最近在学Java web,编译器用的IDEA,然后写一个连接数据库的demo,我出现的问题是在连接数据库时,在Java类的主函数中运行连接数据库代码时,返回的Connection是有值的,但是每当我挂在tomacat上面的时候就会提示ClassNotFoundException异常,此时的connection也是null的,如果有相同问题的,可以看看哦,现在分享一下我的解决方法,解决之后很开心的啊...原创 2018-06-29 00:10:43 · 4531 阅读 · 1 评论 -
eclipse 中Spring 使用@Autowired 报空指针异常
最近在学生Spring框架,这算是一个很低级的错误,写出来希望不要有人犯和我一样的错误,运行下面的例子时,使用了@autowired注释,但是报出了空指针异常,例子程序如下:TextEditorSpellCheckerMainApp:运行后报了一个空指针异常,在搜索过后知道了在使用@autowired的时候必须事先在Spring容器中声明AutowiredAnnotatio...原创 2018-08-03 16:17:12 · 2412 阅读 · 0 评论 -
Spring MVC 报 Context initialization failed
最近在学spring MVC框架,写了一个Hello World,但是在运行的时候总是报 Context initialization failed,先把我的错误贴出来org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletConte...原创 2018-08-06 14:03:13 · 3869 阅读 · 0 评论 -
Spring MVC 报错 Neither BindingResult nor plain target object for bean name 'command' available as req
还是Spring MVC的例子,运行的时候报出Neither BindingResult nor plain target object for bean name 'command' available as request attribute,在出现这个错误的时候去需要使用“command”这个变量的jsp界面,注意看有没有这两句话<%@taglib uri="http://ww...原创 2018-08-06 15:51:23 · 864 阅读 · 0 评论