時(shí)間緊張,先記一筆,后續(xù)優(yōu)化與完善。
????在tomcat打開(kāi)調(diào)試設(shè)置jvm參數(shù)
????
????-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
????
????設(shè)置斷點(diǎn)
????
????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
????
????執(zhí)行程序
????
????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]
????
文章結(jié)束給大家分享下程序員的一些笑話語(yǔ)錄: 現(xiàn)在社會(huì)太數(shù)字化了,所以最好是有一個(gè)集很多功能于一身的設(shè)備!
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

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