简体   繁体   English

如何调试部署在jar文件中的存根类?

[英]how to debug a stub class deployed in a jar file?

I ask for some help here for debugging a class in a deployed jar file, As the codes below, I have a stateless session bean and its interface packaged into a iiop.jar file which deployed to server, and I try to debug to see execution of testException method, but that class that read from a deployed jar file, 我在这里要求一些帮助调试已部署的jar文件中的类。如下面的代码,我有一个无状态会话bean,其接口打包到一个部署到服务器的iiop.jar文件中,我尝试调试以查看执行testException方法,但是从已部署的jar文件中读取的类,

 StatelessSessionHome home = 
     (StatelessSessionHome)PortableRemoteObject.narrow(
                getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                StatelessSessionHome.class);
  StatelessSession session = home.create();

(break point here) session.testException(-2); (此处断点)session.testException(-2);

the debug process will jump to the next step and ignore things happened in testException() with a follow message: _StatelessSession_Stub.testException(int) line: not available and asking to edit source path 调试过程将跳转到下一步并忽略testException()中发生的事情,并带有以下消息:_StatelessSession_Stub.testException(int)行:不可用并要求编辑源路径

Any suggestion should be helpful. 任何建议都应该有所帮助。

While debugging line by line, you often land on a class which is not a part of your source code (it could be inside a jar). 在逐行调试时,您经常会遇到一个不属于源代码的类(它可能位于jar中)。 In such cases it will show a message that the source is not available. 在这种情况下,它将显示消息来源不可用。 If you are using eclipse, keep pressing F6 until you jump out of the library class back into your code so that you can continue debugging from that point. 如果您正在使用eclipse,请继续按F6,直到您从库类中跳回到代码中,以便您可以从该点继续调试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM