前提:本人还是用eclipse 开发 Java EE 的Web项目,java 8,Tomcat 8
问题:某天下午debug时出现之前没有遇到过的报错,出现一个页面显示如下
Source not found.
[一个选择source的按钮]
1.漫漫的解决过程探索
首先,点击出现的页面上的选择按钮,在弹出框中选中本次要调试的项目,没法解决。
然后,查看调试提示框的报错,如下:
Tomcat v8.5 Server at localhost [Apache Tomcat]
org.apache.catalina.startup.Bootstrap at localhost:53707
Thread [main] (Suspended (exception FileNotFoundException))
owns: URLClassPath (id=27)
owns: Object (id=28)
URLClassPath$JarLoader.getJarFile(URL) line: not available
URLClassPath$JarLoader.access$800(URLClassPath$JarLoader, URL) line: not available
URLClassPath$JarLoader$1.run() line: not available
URLClassPath$JarLoader$1.run() line: not available
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
URLClassPath$JarLoader.ensureOpen() line: not available
URLClassPath$JarLoader.<init>(URL, URLStreamHandler, HashMap<String,Loader>, AccessControlContext) line: not available
URLClassPath$3.run() line: not available
URLClassPath$3.run() line: not available
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
URLClassPath.getLoader(URL) line: not available
URLClassPath.getLoader(int) line: not available
URLClassPath.getNextLoader(int[], int) line: not available
URLClassPath.getResource(String, boolean) line: not available
URLClassLoader$1.run() line: not available
URLClassLoader$1.run() line: not available
AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
Launcher$AppClassLoader(URLClassLoader).findClass(String) line: not available
Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: not available
Launcher$AppClassLoader.loadClass(String, boolean) line: not available
Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available
InstrumentationImpl.loadClassAndStartAgent(String, String, String) line: not available
InstrumentationImpl.loadClassAndCallPremain(String, String) line: not available
C:\Program Files\Java\jre1.8.0_281\bin\javaw.exe (2021年1月25日 下午4:16:20)
于是查看org.apache.catalina
这个Tomcat安装目录下catalina.jar包是否存在,即在..\Tomcat 8.5\lib
里看,是有的,解决失败……
再来,我重装了Tomcat,还是同样的报错……
最后,我重装了Java,还是同样的报错……
已经有点小绝望了。
2、找到救命稻草
直到查到一个帖子,报错很类似:点击查看救命贴
原来是我关闭eclipse时,没有把所有调试的断点都去掉,导致的╮(╯▽╰)╭,崩溃……
然后果断根据网上的去掉断点的教程,把断点都去掉:去掉所有断点
然后尝试debug,ok了,高兴~~~
看到熟悉的:
信息: Server startup in 22997 ms