時間緊張,先記一筆,后續優化與完善。
????在tomcat打開調試設置jvm參數
????
????-Xrunjdwp:transport=dt_socket,server=y,address=9090,suspend=y
????
????在linux命令行jdb連接9090端口
????
????jdb -attach ip:9090 -sourcepath /softwares/apache-tomcat-7.0.40-src/java
????
????設置斷點
????
????stop at org.apache.tomcat.util.IntrospectionUtils:402 stop at org.apache.tomcat.util.IntrospectionUtils:406 stop at org.apache.tomcat.util.IntrospectionUtils:408 stop at org.apache.tomcat.util.IntrospectionUtils:412
????
????執行程序
????
????main[1] run > Set deferred breakpoint org.apache.tomcat.util.IntrospectionUtils:412 Set deferred breakpoint org.apache.tomcat.util.IntrospectionUtils:412 Set deferred breakpoint org.apache.tomcat.util.IntrospectionUtils:408 Unable to set deferred breakpoint org.apache.tomcat.util.IntrospectionUtils:406 : No code at line 406 in org.apache.tomcat.util.IntrospectionUtils Stopping due to deferred breakpoint errors. Set deferred breakpoint org.apache.tomcat.util.IntrospectionUtils:402 Breakpoint hit: Breakpoint hit: "thread=main", org.apache.tomcat.util.IntrospectionUtils.setProperty(), line=412 bci=849 412 ExceptionUtils.handleThrowable(ie.getCause());
????
????打印變量
????
????main[1] locals Method arguments: o = instance of x.x.x.JNDIRealm(id=1156) name = "connectionPassword" value = "1234" invokeSetProperty = true Local variables: setter = "setConnectionPassword" ie = instance of java.lang.reflect.InvocationTargetException(id=1160) main[1] dump ie.target ie.target = { serialVersionUID: -7034897190745766939 java.lang.Exception.serialVersionUID: -3387516993124229948 java.lang.Throwable.serialVersionUID: -3042686055658047285 java.lang.Throwable.detailMessage: "password decrypt is error!" java.lang.Throwable.cause: instance of java.lang.RuntimeException(id=1163) java.lang.Throwable.stackTrace: null }
????
????打印變量dump信息
????
????main[1] dump ie.target.cause ie.target.cause = { serialVersionUID: -7034897190745766939 java.lang.Exception.serialVersionUID: -3387516993124229948 java.lang.Throwable.serialVersionUID: -3042686055658047285 java.lang.Throwable.detailMessage: "get content from cyberark error" java.lang.Throwable.cause: instance of javapasswordsdk.exceptions.PSDKException(id=1165) java.lang.Throwable.stackTrace: null }
????
????ctrl+c 退出
????
????main[1]
????
文章結束給大家分享下程序員的一些笑話語錄: 現在社會太數字化了,所以最好是有一個集很多功能于一身的設備!
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
