CompileException invalid stack height 2 expecting 1
whitingjr Nov 12, 2013 8:16 PMHi,
I am getting this exception when a Byteman Rule is being initially loaded on my server.
19:58:18,028 INFO [stdout] (ServerService Thread Pool -- 60) Rule.ensureTypeCheckedCompiled : error compiling rule TxConnectionListener state
19:58:18,028 INFO [stdout] (ServerService Thread Pool -- 60) org.jboss.byteman.rule.exception.CompileException: FieldExpression.compile : invalid stack height 2 expecting 1
19:58:18,028 INFO [stdout] (ServerService Thread Pool -- 60) at org.jboss.byteman.rule.expression.FieldExpression.compile(FieldExpression.java:298)
19:58:18,028 INFO [stdout] (ServerService Thread Pool -- 60) at org.jboss.byteman.rule.expression.LogicalExpression.compile(LogicalExpression.java:104)
19:58:18,029 INFO [stdout] (ServerService Thread Pool -- 60) at org.jboss.byteman.rule.Condition.compile(Condition.java:101)
19:58:18,029 INFO [stdout] (ServerService Thread Pool -- 60) at org.jboss.byteman.rule.compiler.Compiler.compileBytes(Compiler.java:406)
19:58:18,029 INFO [stdout] (ServerService Thread Pool -- 60) at org.jboss.byteman.rule.compiler.Compiler.getHelperAdapter(Compiler.java:64)
19:58:18,029 INFO [stdout] (ServerService Thread Pool -- 60) at org.jboss.byteman.rule.Rule.compile(Rule.java:545)
19:58:18,029 INFO [stdout] (ServerService Thread Pool -- 60) at org.jboss.byteman.rule.Rule.ensureTypeCheckedCompiled(Rule.java:450)
19:58:18,029 INFO [stdout] (ServerService Thread Pool -- 60) at org.jboss.byteman.rule.Rule.execute(Rule.java:672)
19:58:18,029 INFO [stdout] (ServerService Thread Pool -- 60) at org.jboss.byteman.rule.Rule.execute(Rule.java:653)
19:58:18,029 INFO [stdout] (ServerService Thread Pool -- 60) at org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.setTrackByTx(TxConnectionListener.java)
1
Using the bmcheck tool no errors or warnings were reported.
$ bmcheck -cp ./java/jboss/ironjacamar/ironjacamar_1.0.21/target/ironjacamar-core-impl.jar -cp ./java/jboss/ironjacamar/ironjacamar_1.0.21/target/ironjacamar-core-api.jar -cp ./java/jboss/jboss-eap-6.2.0.ER7/modules/system/layers/base/javax/resource/api/main/jboss-connector-api_1.6_spec-1.0.1.Final-redhat-2.jar -cp ./java/jboss/jboss-eap-6.2.0.ER7/modules/system/layers/base/javax/transaction/api/main/jboss-transaction-api_1.1_spec-1.0.1.Final-redhat-2.jar -cp ./java/jboss/jboss-eap-6.2.0.ER7/modules/system/layers/base/org/jboss/logging/main/jboss-logging-3.1.2.GA-redhat-1.jar ./java/jboss/byteman/byteman-download-2.1.3/sample/scripts/ConnectionTrackByTxStateMonitor.btm
checking rule TxConnectionListener state against class org.jboss.jca.core.connectionmanager.listener.TxConnectionListener
parsed rule "TxConnectionListener state" for class org.jboss.jca.core.connectionmanager.listener.TxConnectionListener
type checked rule "TxConnectionListener state"
TestScript: no errors
This is my Byteman script
# StateMonitor
#
# A byteman script which finds a condition causing the state for connection
# tracking to change during a transaction.
#
########################################################################
#
# Rule to detect state change
#
RULE TxConnectionListener state
CLASS org.jboss.jca.core.connectionmanager.listener.TxConnectionListener
METHOD setTrackByTx(boolean)
AT ENTRY
IF (!$1)
AND
($this.isTrackByTx())
AND
($this.getTransactionSynchronization().enlisted)
DO traceStack("*** the trackByTx state is being changed to false for an inflight transaction by thread name ["+Thread.currentThread().getName()+ "]. ***")
ENDRULE
The class the rule has been written for is added as an attachment.
-
TxConnectionListener.java 23.9 KB