Could not load java.net.BindException
Illegal access: this web application instance has been stopped already .Could not load java.net.BindException.
Illegal access: this web application instance has been stopped already. Could not load java.net.BindException. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1244)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
原因:
重启tomcat,但是之前关闭tomcat的线程还未关闭,不影响使用
web项目中,当response.sendRedirect("xxxx"); 时,而客户端关闭了浏览器,就会出这种错.
解决:
将tomcat中server.xml文件的reloadable="true"设置成false
但是这样的话就不能自动更新java的类文件了
不是程序的问题,可以不管
Exception in thread "main" java.lang.ArrayStoreException: com.qf.test.Employee
public static void main(String[] args) { // Employee emp1 = new Employee("wxf", 2000, LocalDate.now()); // Employee emp2 = new Manager("wxf", 2000, LocalDate.now(),3000); Manager[] mArr = new Manager[3]; mArr[0] = new Manager("wxf", 2000, LocalDate.now(),3000); mArr[1] = new Manager("qf", 2000, LocalDate.now(),3000); mArr[2] = new Manager("wf", 2000, LocalDate.now(),3000); Employee[] eArr = mArr; eArr[0] = new Employee("wxf", 2000, LocalDate.now()); }
原因:
子类数组的引用赋值给父类数组,现在等价于父类数组引用指向之前创建的子类数组,
然后修改数组中的元素,赋值为父类,数组元素类型不一致,所以报ArrayStoreException异常