eclipse 破坏类文件内部
每次我在调试模式下执行我的应用程序时,执行都会在我正在使用的外部库的某些类文件中中断。即使它是一个 NullPointerException,由于某种原因我可以点击恢复并继续执行。如果您好奇,我将堆栈跟踪放在下面。
但我的问题是我只是想阻止它。这非常烦人,并且在执行过程中时不时地发生。但我找不到任何可以防止破坏类文件内部的设置。我该如何避免这种情况?
Thread [main] (Suspended (exception NullPointerException))
Transformer.isRuntimeCode(ProtectionDomain) line: 154
Transformer.transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 81
TransformerManager.transform(ClassLoader, String, Class, ProtectionDomain, byte[]) line: 169
InstrumentationImpl.transform(ClassLoader, String, Class, ProtectionDomain, byte[], boolean) line: 365
Proxy.defineClass0(ClassLoader, String, byte[], int, int) line: not available [native method]
Proxy.getProxyClass(ClassLoader, Class<?>...) line: 504
ClearCast$CasterImpl<S,T>.constructProxy() line: 349
ClearCast$CasterImpl<S,T>.<init>(Class<S>, Class<T>, Options) line: 313
ClearCast.compileCaster(Class<S>, Class<T>, Options) line: 219
ClearCast.cast(S, Class<T>, Options) line: 231
ClearCast.cast(S, Class<T>) line: 241
Runtime.<clinit>() line: 32
ObjectFactory.newInstance(String, ClassLoader, boolean) line: not available
ObjectFactory.findJarServiceProvider(String) line: not available
ObjectFactory.createObject(String, String, String) line: not available
ObjectFactory.createObject(String, String) line: not available
SAXParser.<init>(SymbolTable, XMLGrammarPool) line: not available
SAXParser.<init>() line: not available
SAXParserImpl.<init>(SAXParserFactory, Hashtable) line: not available
SAXParserFactoryImpl.newSAXParser() line: not available
XmlParser.setValidating(boolean) line: 93
XmlParser.<init>(boolean) line: 83
TagLibConfiguration.configureWebApp() line: 210
DevAppEngineWebAppContext(WebAppContext).startContext() line: 1247
DevAppEngineWebAppContext(ContextHandler).doStart() line: 517
DevAppEngineWebAppContext(WebAppContext).doStart() line: 467
DevAppEngineWebAppContext(AbstractLifeCycle).start() line: 50
JettyContainerService$ApiProxyHandler(HandlerWrapper).doStart() line: 130
JettyContainerService$ApiProxyHandler(AbstractLifeCycle).start() line: 50
Server(HandlerWrapper).doStart() line: 130
Server.doStart() line: 224
Server(AbstractLifeCycle).start() line: 50
JettyContainerService.startContainer() line: 185
JettyContainerService(AbstractContainerService).startup() line: 147
DevAppServerImpl.start() line: 219
DevAppServerMain$StartAction.apply() line: 164
Parser$ParseResult.applyArgs() line: 48
DevAppServerMain.<init>(String[]) line: 113
DevAppServerMain.main(String[]) line: 89
Everytime I execute my app in debug mode, the execution breaks inside some class file of an external library that I'm using. Even though it's a NullPointerException, for some reason I can hit resume and continue the execution. In case you're curious, I've put the stacktrace below.
My problem though is that I simply want to stop that. It's extremely annoying and happens every now and then during the execution. But I can't find any setting anywhere which will prevent breaking inside class files. How do I avoid this?
Thread [main] (Suspended (exception NullPointerException))
Transformer.isRuntimeCode(ProtectionDomain) line: 154
Transformer.transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 81
TransformerManager.transform(ClassLoader, String, Class, ProtectionDomain, byte[]) line: 169
InstrumentationImpl.transform(ClassLoader, String, Class, ProtectionDomain, byte[], boolean) line: 365
Proxy.defineClass0(ClassLoader, String, byte[], int, int) line: not available [native method]
Proxy.getProxyClass(ClassLoader, Class<?>...) line: 504
ClearCast$CasterImpl<S,T>.constructProxy() line: 349
ClearCast$CasterImpl<S,T>.<init>(Class<S>, Class<T>, Options) line: 313
ClearCast.compileCaster(Class<S>, Class<T>, Options) line: 219
ClearCast.cast(S, Class<T>, Options) line: 231
ClearCast.cast(S, Class<T>) line: 241
Runtime.<clinit>() line: 32
ObjectFactory.newInstance(String, ClassLoader, boolean) line: not available
ObjectFactory.findJarServiceProvider(String) line: not available
ObjectFactory.createObject(String, String, String) line: not available
ObjectFactory.createObject(String, String) line: not available
SAXParser.<init>(SymbolTable, XMLGrammarPool) line: not available
SAXParser.<init>() line: not available
SAXParserImpl.<init>(SAXParserFactory, Hashtable) line: not available
SAXParserFactoryImpl.newSAXParser() line: not available
XmlParser.setValidating(boolean) line: 93
XmlParser.<init>(boolean) line: 83
TagLibConfiguration.configureWebApp() line: 210
DevAppEngineWebAppContext(WebAppContext).startContext() line: 1247
DevAppEngineWebAppContext(ContextHandler).doStart() line: 517
DevAppEngineWebAppContext(WebAppContext).doStart() line: 467
DevAppEngineWebAppContext(AbstractLifeCycle).start() line: 50
JettyContainerService$ApiProxyHandler(HandlerWrapper).doStart() line: 130
JettyContainerService$ApiProxyHandler(AbstractLifeCycle).start() line: 50
Server(HandlerWrapper).doStart() line: 130
Server.doStart() line: 224
Server(AbstractLifeCycle).start() line: 50
JettyContainerService.startContainer() line: 185
JettyContainerService(AbstractContainerService).startup() line: 147
DevAppServerImpl.start() line: 219
DevAppServerMain$StartAction.apply() line: 164
Parser$ParseResult.applyArgs() line: 48
DevAppServerMain.<init>(String[]) line: 113
DevAppServerMain.main(String[]) line: 89
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您已在 NullPointerException 或超类上添加了显式断点,那么您似乎可以:
此外,在“Java> 调试”下的“首选项”中,有一个用于停止未捕获的异常的全局设置。
If you've added an explicit breakpoint on NullPointerException or a superclass, then it looks as if you can:
Also, there's a global setting for stopping on uncaught exceptions in Preferences under Java>Debug.
我会更担心修复 NPE。如果可能的话,下载并附上源代码。
I would be more worried about fixing the NPE. Download and attach the source if possible.