Exception_08

36.
Tomcat中设置远程debug方法
何为远程调试?我们一般调试一个web项目的java代码时,需要将你的tomcat服务器和你的开发工具(比如Jbuilder)集成,或需要工具的一些插件支持(比如Eclipse下的myclipse等),这些方式都是在本地进行,即你的开发工具和tomcat运行在同一台服务器上,如果你的开发工具和服务器不再一台机器上那就需要实现远程调试功能了。
实现方法:
在tomcat的catalina.bat文件中加入下面的设置,当然SET CATALINA_OPTS 变量应该在使用它之前。这是在tomcat启动时设置一些虚拟机参数,使服务器允许远程连接功能,address=5888表示远程连接的端口号,可以设置成任意其他不冲突端口。其他的应用服务器比如weblogic也应该可以设置这些参数,有兴趣的可以测试。
SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5888
这样就Ok了,重启动tomcat,可以直接独立启动,而不用在eclipes的插件中启动。打开eclipse中的debug设置窗口,选择Remote Java Application ,新建一个debug项,输入服务器IP和刚才设置端口号,点ok就可以进入debug状态了。Jbuilder中同样可以设置Remote Java Application。

37.
在授权与认证模块中
一个用户会有多个角色,当一个用户所拥有的两个角色中的权限有冲突时(即一个角色为不允许,而另一个为允许),则根据角色的优先级来确定何种权限。

38.
OA
1.组织机构

39.
java.lang.SecurityException: class "junit.framework.JUnit4TestCaseFacade"'s signer information does not match signer information of other classes in the same package
解决方法是在java build path的order and export中把junit调整到比较靠前位置。

40.
org.hibernate.HibernateException: No CurrentSessionContext configured!
我们使用如下代码获取Session:
 sessionFactory = new Configuration().configure().buildSessionFactory();
 Session session = sessionFactory.getCurrentSession();
     使用getCurrentSession 不对;应该使用openSession
      参考hibernate api doc 对 openSession 和 getCurrentSession 的说明

C:\Users\Administrator\Documents\Arduino\sketch_jun18a_copy_20250620142542_copy_20250706090617\sketch_jun18a_copy_20250620142542_copy_20250706090617.ino:61:18: error: variable or field 'custom_exception_handler' declared void 61 | extern "C" void custom_exception_handler(EXCEPTION_INFO* exc_info) { | ^~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\Arduino\sketch_jun18a_copy_20250620142542_copy_20250706090617\sketch_jun18a_copy_20250620142542_copy_20250706090617.ino:61:43: error: 'EXCEPTION_INFO' was not declared in this scope 61 | extern "C" void custom_exception_handler(EXCEPTION_INFO* exc_info) { | ^~~~~~~~~~~~~~ C:\Users\Administrator\Documents\Arduino\sketch_jun18a_copy_20250620142542_copy_20250706090617\sketch_jun18a_copy_20250620142542_copy_20250706090617.ino:61:59: error: 'exc_info' was not declared in this scope 61 | extern "C" void custom_exception_handler(EXCEPTION_INFO* exc_info) { | ^~~~~~~~ C:\Users\Administrator\Documents\Arduino\sketch_jun18a_copy_20250620142542_copy_20250706090617\sketch_jun18a_copy_20250620142542_copy_20250706090617.ino:61:17: error: variable or field 'custom_exception_handler' declared void 61 | extern "C" void custom_exception_handler(EXCEPTION_INFO* exc_info) { | ^~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\Administrator\Documents\Arduino\sketch_jun18a_copy_20250620142542_copy_20250706090617\sketch_jun18a_copy_20250620142542_copy_20250706090617.ino:61:42: error: 'EXCEPTION_INFO' was not declared in this scope 61 | extern "C" void custom_exception_handler(EXCEPTION_INFO* exc_info) { | ^~~~~~~~~~~~~~ C:\Users\Administrator\Documents\Arduino\sketch_jun18a_copy_20250620142542_copy_20250706090617\sketch_jun18a_copy_20250620142542_copy_20250706090617.ino:61:58: error: 'exc_info' was not declared in this scope 61 | extern "C" void custom_exception_handler(EXCEPTION_INFO* exc_info) { | ^~~~~~~~ C:\Users\Administrator\Documents\Arduino\sketch_jun18a_copy_20250620142542_copy_20250706090617\sketch_jun18a_copy_20250620142542_copy_20250706090617.ino: In function 'void setup()': C:\Users\Administrator\Documents\Arduino\sketch_jun18a_copy_20250620142542_copy_20250706090617\sketch_jun18a_copy_20250620142542_copy_20250706090617.ino:143:27: error: 'custom_exception_handler' was not declared in this scope; did you mean '_xtos_set_exception_handler'? 143 | set_exception_handler(custom_exception_handler); | ^~~~~~~~~~~~~~~~~~~~~~~~ | _xtos_set_exception_handler C:\Users\Administrator\Documents\Arduino\sketch_jun18a_copy_20250620142542_copy_20250706090617\sketch_jun18a_copy_20250620142542_copy_20250706090617.ino:143:5: error: 'set_exception_handler' was not declared in this scope; did you mean '_xtos_set_exception_handler'? 143 | set_exception_handler(custom_exception_handler); | ^~~~~~~~~~~~~~~~~~~~~ | _xtos_set_exception_handler exit status 1 Compilation error: variable or field 'custom_exception_handler' declared void
07-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值