1、deployment failure on tomcat 6.x.could not copy all resources to a.if a file locked,you can wait until the lock times out to redeploy.or stop the server and redeploy,or manualy remove the deployment at c
http://blog.csdn.net/zhang6622056/article/details/7534147
报这个错通常是缺少jar包,在build path里引入了,但是实际上没有这个包,在将项目部署到tomcat去时就会报这个错,将jar包加上或者删掉重新部署即可。
2、eclipse 4.1 导入项目后 Target runtime Apache Tomcat v6.0 is not defi..
在工作台目录下找到 自己操作的项目的文件夹 /.settings/org.eclipse.wst.common.project.facet.core.xml,打开后
将<runtime name="Apache Tomcat v6.0"/>删除,保存即可解决。
3、Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'detailJobDetail' defined in class path resource [applicationContext-job.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodException:
com.*.kaoqin.job.AttendanceDetailJob.execute()
这是对execute()这个方法传的参数有误,参数没有匹配上,修改参数即可
4、com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused: connect
STACKTRACE:
java.net.SocketException: java.net.ConnectException: Connection refused: connect
这是拒绝连接,是数据连接配置有误造成的
5、com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
……
at java.net.Socket.<init>(Socket.java:218)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)
... 18 more
这是数据库连接不对造成的,我报出这个异常是因为我的数据库url、用户名、密码都用了生产环境的,而我本地是开发环境的,所以会报这个错。
6、java.lang.IllegalArgumentException: Document base C:\tools\Tomcat 7.0\wtpwebapps\XX项目 does not exist or is not a readable directory
造成这个异常的原因,就是项目没有删除干净,tomcat去加载项目时没有加载成功,需要检查E:\Tomcat6.0\webapps、E:\Tomcat6.0\work\Catalina\localhost、E:\Tomcat6.0\conf\Catalina\localhost这三个目录下有没有未清除干净的项目文件,如果都删除了还报错,就检查/conf/server.xml中的<Context docBase="" path="" reloadable="true" source=""/></Host>中是否有项目目录,有的话删除干净即可。
7、添加tomcat时如果finish按钮是灰色的,在eclipse中的window/preferences/server/runtime environment选项中重新修改tomcat即可。