Tuesday, 27 August 2013

byteman can not print out the trace message

byteman can not print out the trace message

i am trying to use byteman to add dynamic debug information to JBOSS, but
when i attached the byteman script to JVM, there is no trace message
printed in system.out.
Below is my byteman script (script file name:select-provider.btm):
RULE select provider rule
CLASS com.xxx.tpim.struts.wizard.SelectProviderAction
METHOD execute
AT ENTRY
IF true
#DO traceln("entering createHelloMessage")
#DO traceStack("found the caller!\n", 100)
DO traceln("Hey, I'm random java code!")
ENDRULE
And below is the command i used to install the byteman agent:
bminstall.sh -b -Dorg.jboss.byteman.transform.all 11526
Below is the nohup output after i run above install script:
2013-08-27 17:04:23,554 INFO [stdout] (Attach Listener) Setting
org.jboss.byteman.transform.all=
Below is the command i used to submit the byteman script:
bmsubmit.sh -l select-provider.btm
Below is the result i use bmsubmit.sh to check if the script submit
successfully:
[eniayin@ecnshxenlx0291 target]$ bmsubmit.sh
# File select-provider.btm line 5
RULE select provider rule
CLASS com.xxx.tpim.struts.wizard.SelectProviderAction
METHOD execute
AT ENTRY
IF true
DO traceln("Hey, I'm random java code!")
ENDRULE
Transformed in:
loader: ModuleClassLoader for Module "deployment.tpim.war:main" from
Service Module Loader
trigger method:
com.xxx.tpim.struts.wizard.SelectProviderAction.execute(org.apache.struts.action.ActionMapping,org.apache.struts.action.ActionForm,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
org.apache.struts.action.ActionForward
From the message above, it seems the script is submitted successfully, but
there is no message printed in the nohup file when the
SelectProviderAction.execute method is called.
anyone has ideas about this issue?
thanks for your time ~

No comments:

Post a Comment