Byteman preventing Wildfly 8.1.0 from starting?
taylor.marks Mar 7, 2016 1:05 PMWhen my wildfly 8.1.0 server starts up, it should create an instance of a class.
I'm not sure whether that's happening or not, and I'm unable to change the source code, so I figured I would use Byteman to accomplish this.
I wrote this rule file for Byteman, stored at C:\app\ECLSManagedConnectionFactory.btm:
RULE trace ECLSManagedConnectionFactory init entry
CLASS com.empolis.ecls.server.j2ee.jca.impl.ECLSManagedConnectionFactory
METHOD <init>
AT ENTRY
IF true
DO traceOpen("ECLSManagedConnectionFactory", "/app/ECLSManagedConnectionFactory.log");
traceln("entering <init>");
traceClose("ECLSManagedConnectionFactory");
ENDRULE
I downloaded Byteman and unzipped it to C:\byteman-3.0.3.
I modified my java_opts and have wildfly echo the value during startup:
-Xms64m -Xmx512m -XX:MaxPermSize=256m
-Dorg.jboss.byteman.transform.all
-javaagent:C:/byteman-3.0.3/lib/byteman.jar=script:C:/app/ECLSManagedConnectionFactory.btm,boot:C:/byteman-3.0.3/lib/byteman.jar:listener:true
-Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000
-Djava.net.preferIPv4Stack=true
-Dorg.jboss.resolver.warning=true
-Djboss.modules.system.pkgs=org.jboss.byteman
-Djboss.server.default.config=cls.xml
My server successfully starts up if lines 2 and 3 of my java_opts above aren't present, but the moment I add those in, the server simply doesn't start. Nothing to indicate what's happening goes to stdout or stderr. I get a message saying to check server.log for more info, but that file doesn't exist.
What am I doing wrong? I've tried every combination of slash directions for the paths (on Windows 10 if that's important).
(Also, does anyone here use Stack Overflow? I find the lack of a tag for byteman over there to be very odd... it would lead me to think that byteman is a very immature, niche product that nobody uses. If you want to pick up some rep and put an answer where it'll actually be found, post it on this same question over there: http://stackoverflow.com/questions/35849538/byteman-preventing-wildfly-8-1-0-from-starting .)