5 Replies Latest reply on Nov 10, 2014 9:37 AM by whobu23

    Byteman Helper class unexpected behavior in parameter

    whobu23

      I was originally trying to cast one of my objects to another object when I noticed some interesting behavior when calling the method in my helper class and how it was interpeting the parameter for the method.

      The rules are below.  You will notice the call to castToLicenseModel in both, the code in this method is a simple system out that says success.  The first rule is succesful the second throws and ExecuteException.  Also if I change the parameter of the castToLicenesModel method to the AuditTrail Object and call it from both rules instantiating a new AuditTrail, the first on fails and the second one succeeds.  Any help would be appreciated as I am not sure why there would be a difference.

       

      RULE LicenseProcessWriteFileErrorsRule1
      CLASS com.creativesolutions.ems.license.ejb.LicenseCompositeEJB
      HELPER com.creativesolutions.ems.brw.byteman.helper.EMSBytemanHelper
      METHOD testMethod(AuditTrail)
      AT ENTRY
      BIND engine:com.creativesolutions.ems.entityBean.model.AuditTrail  = $1;
      IF true
      DO System.out.println("Testing 1");
      castToLicenseModel(new com.creativesolutions.ems.license.LicenseFile())
      ENDRULE

       

       

      RULE LicenseProcessWriteFileErrorsRule
      CLASS com.creativesolutions.ems.license.model.LicenseModel
      HELPER com.creativesolutions.ems.brw.byteman.helper.EMSBytemanHelper
      METHOD setLicenseFile(LicenseFile)
      BIND engine:com.creativesolutions.ems.license.LicenseFile  = $1;
      IF true
      DO System.out.println("Testing 2");

      castToLicenseModel(new com.creativesolutions.ems.license.LicenseFile())
      ENDRULE

       

      Sorry it is a wrapped exception trace.  Looks like an illegalargumentexception is being thrown, see the bottom of the trace

       

      The firm is 295212

      org.jboss.byteman.rule.exception.ExecuteException: MethodExpression.interpret : exception invoking method castToLicenseModel file C:\Byteman\LicensingExceptionRules.btm line 19
      at org.jboss.byteman.rule.expression.MethodExpression.interpret(MethodExpression.java:353)
      at org.jboss.byteman.rule.Action.interpret(Action.java:144)
      at com.creativesolutions.ems.brw.byteman.helper.EMSBytemanHelper_HelperAdapter_Interpreted_2.fire(LicensingExceptionRules.btm)
      at com.creativesolutions.ems.brw.byteman.helper.EMSBytemanHelper_HelperAdapter_Interpreted_2.execute0(LicensingExceptionRules.btm)
      at com.creativesolutions.ems.brw.byteman.helper.EMSBytemanHelper_HelperAdapter_Interpreted_2.execute(LicensingExceptionRules.btm)
      at org.jboss.byteman.rule.Rule.execute(Rule.java:684)
      at org.jboss.byteman.rule.Rule.execute(Rule.java:653)
      at com.creativesolutions.ems.license.model.LicenseModel.setLicenseFile(LicenseModel.java)
      at com.creativesolutions.ems.license.ejb.LicenseCompositeEJB.getPreparerDetailsAndCreateLicense(LicenseCompositeEJB.java:2133)
      at com.creativesolutions.ems.license.ejb.LicenseCompositeEJB.producePreparerLicense(LicenseCompositeEJB.java:2094)
      at com.creativesolutions.ems.license.ejb.LicenseCompositeEJB.processTaxDSWFamilyInfo(LicenseCompositeEJB.java:2862)
      at com.creativesolutions.ems.license.ejb.LicenseCompositeEJB.compileLicenseBlock(LicenseCompositeEJB.java:3072)
      at com.creativesolutions.ems.license.ejb.LicenseCompositeEJB.produceProductVersionLicenseAddOnTaxLicenses(LicenseCompositeEJB.java:1866)
      at com.creativesolutions.ems.license.ejb.LicenseCompositeEJB.processTaxFamilyInfo(LicenseCompositeEJB.java:1903)
      at com.creativesolutions.ems.license.ejb.LicenseCompositeEJB.processTaxDSWFamilyInfo(LicenseCompositeEJB.java:2857)
      at com.creativesolutions.ems.license.ejb.LicenseCompositeEJB.compileLicenseBlock(LicenseCompositeEJB.java:3072)
      at com.creativesolutions.ems.license.ejb.LicenseCompositeEJB.getFirmDetailsAndCreateLicenses(LicenseCompositeEJB.java:1248)
      at com.creativesolutions.ems.license.ejb.LicenseCompositeEJB.produceLicense(LicenseCompositeEJB.java:3819)
      at com.creativesolutions.ems.license.ejb.LicenseCompositeEJB.startGenerationOfLicensesByFirm(LicenseCompositeEJB.java:3605)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:233)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:404)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
      at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:268)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:167)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:84)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
      at org.jboss.ejb.Container.invoke(Container.java:1092)
      at sun.reflect.GeneratedMethodAccessor365.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
      at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:260)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:246)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
      at org.jboss.proxy.ejb.SecurityContextInterceptor.invoke(SecurityContextInterceptor.java:64)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
      at com.sun.proxy.$Proxy1603.startGenerationOfLicensesByFirm(Unknown Source)
      at com.creativesolutions.ems.license.ejb.LicenseGeneratorEJB.generateLicenses(LicenseGeneratorEJB.java:403)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:233)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
      at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:268)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:167)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:84)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
      at org.jboss.ejb.Container.invoke(Container.java:1092)
      at sun.reflect.GeneratedMethodAccessor365.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
      at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:260)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:246)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
      at org.jboss.proxy.ejb.SecurityContextInterceptor.invoke(SecurityContextInterceptor.java:64)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
      at com.sun.proxy.$Proxy1254.generateLicenses(Unknown Source)
      at com.creativesolutions.ems.licenseDisk.LicenseDiskControllerBean.startLicenseGeneration(LicenseDiskControllerBean.java:238)
      at com.creativesolutions.ems.licenseDisk.LicenseDiskControllerBean.generateLicenseFilesForFirm(LicenseDiskControllerBean.java:300)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:233)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
      at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:268)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:167)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:84)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
      at org.jboss.ejb.Container.invoke(Container.java:1092)
      at sun.reflect.GeneratedMethodAccessor365.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967)
      at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:586)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
      Caused by: java.lang.IllegalArgumentException: argument type mismatch
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.byteman.rule.expression.MethodExpression.interpret(MethodExpression.java:342)
      ... 131 more

       

      Message was edited by: Brian Mondeau

        • 1. Re: Byteman Helper class unexpected behavior in parameter
          adinn

          Hi Brian,

           

          Thanks for reporting this. I cannot see why you would be getting an ExecuteException here. Both rules look ok to me. More details from the the ExecuteException would help.

           

          Could you provide an exception message and backtrace, preferably showing the stack backtrace from the ExecuteException itself (rather than any exception which catches and wraps it). If the program does not print the ExecuteException backtrace when it fails the maybe you could try to print it from a debugger. Also, while you are debugging, you might try breaking method castToLicenseModel and see i) if execution reaches there and, if so, ii) what happens inside that method.

           

          regards,

           

           

          Andrew Dinn

          • 2. Re: Byteman Helper class unexpected behavior in parameter
            whobu23

            Added my response to the original post


            • 3. Re: Byteman Helper class unexpected behavior in parameter
              whobu23

              I have also notice the following

               

              This works

              RULE LicenseProcessWriteFileErrorsRule

              CLASS com.creativesolutions.ems.license.model.LicenseModel

              HELPER com.creativesolutions.ems.brw.byteman.helper.EMSBytemanHelper

              METHOD setLicenseFile

              IF true

              DO castToLicenseModel(new com.creativesolutions.ems.license.LicenseFile())

              ENDRULE

               

              This does not - though I can print the contents of the engine, I can not call castToLicenseModel

              RULE LicenseProcessWriteFileErrorsRule

              CLASS com.creativesolutions.ems.license.model.LicenseModel

              HELPER com.creativesolutions.ems.brw.byteman.helper.EMSBytemanHelper

              METHOD setLicenseFile

              BIND engine:com.creativesolutions.ems.license.LicenseFile  = $1;

              IF true

              DO castToLicenseModel(new com.creativesolutions.ems.license.LicenseFile())

              ENDRULE

              • 4. Re: Re: Byteman Helper class unexpected behavior in parameter
                adinn

                Hi Brian,

                 

                Thanks for adding the exception trace and also honing down the problem to the presence of the BIND clause. That helps a lot in determining what is going wrong. The exception makes it clear that the problem is happening in the Byteman interpreter at the point where it calls castToLicenseModel. In the broken case the object being passed in is clearly of a different type to that expected by the method. Since we are clearly creating a LicenseFile and the method expects a LicenseFile that means that the failing rule is resolving the type LicenseFile differently to the non-failing rule.

                 

                So, it appears that you are in ClassLoader hell where what is essentially the same class is available for loading from more than one classloader and which version gets loaded by which classloader depends on the order in which things execute. Well, ok, it is maybe ModuleLoader hell if this is running on JBoss AS 7 (AS7 uses JBoss Modules which was supposed to get rid of ClassLoader hell and, indeed, pretty much does, but you can still arrive in ModuleLoader hell and it's just as unpleasant a destination).

                 

                Can you describe how your classes have been deployed? Specifically, where are the jars which contain EMSBytemanHelper, LicenseFile and LicenseModel located? If any of these 3 classes exist in different jars then how are the jar contents made visible to each other. Also are any of the class files for these classes included in more than one jar (or as bare class files in the class path)?

                • 5. Re: Re: Byteman Helper class unexpected behavior in parameter
                  whobu23

                  Ok I have an application outside my byteman application that holds the LicenseModel (which hold a

                   

                  LicenseFile) and LicenseFile classes, these classes are .jar'd and put into an EAR and deployed to my local JBoss 5 EAP server instances' deploy directory.  The byteman project holds my helper class along with another class called BytemanDAO.  The helper class holds the castToLicenseModel(LicenseFile) method and is compiled with the jar in the deploy directory on the build path.

                   

                  The VM args set when staring the JBoss server are below.  The DEV_COMMON.jar holds LicenseFile and LicenseModel classes and the emsbyteman.jar holds the Helper and DAO class

                   

                  "-Dprogram.name=JBossTools: JBoss EAP 5.x Runtime 1" -Xms256m -Xmx768m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.endorsed.dirs=C:\jboss-eap-5.1.2\jboss-as\lib\endorsed -Dorg.jboss.byteman.transform.all=true -Dorg.jboss.byteman.verbose=true -Djboss.byteman.debug=true -server -javaagent:C:\Byteman\byteman-download-2.2.0.1\lib\byteman.jar=boot:"C:\jboss-eap-5.1.2\jboss-as\server\ems_dev\deploy\DEV_EAR.ear\DEV_COMMON.jar",boot:C:\Byteman\emsbyteman.jar,boot:C:\Byteman\byteman-download-2.2.0.1\lib\byteman.jar,script:C:\Byteman\LicensingExceptionRules.btm,listener:true,prop:org.jboss.byteman.debug=true

                   

                  public void castToLicenseModel(LicenseFile model){

                       System.out.println("Inside the Helper");

                  }

                   

                  What I have discovered after testing this weekend:  I put a castToLicenseModel(LicenseFile), in the Helper class, the BytemanDAO class and the LicenseModel class then wrote rules that would call these methods either creating a new LiceseFile, passing in $1 or getting the LicenseFile from the LicenseModel $0.getLicenseFile.

                   

                  When calling the method in the LicenseModel class packaged with the main project all three ways are successful, example rule below

                  RULE LicenseProcessWriteFileErrorsRule3

                  CLASS com.creativesolutions.ems.license.model.LicenseModel

                  METHOD setLicenseFile

                  IF true

                  DO $0.castToLicenseModel($1);

                  ENDRULE

                   

                  However when calling the method in BytemanDAO or the Helper class, which are packaged in the byteman projects jar, when trying to use $1 it always fails, though when getting the LicenseFile from the LicenseModel or creating a new one, works.  See example success and failure rules below.

                   

                  So where I am at now while furthuring my testing  is I changed my castToLicenseModel methods to take and Object rather than a LicenseFile when calling the Helper or the BytemanDAO, and I have discovered that this is successful in all scenarios and that it seems like when using $1 that the LicenseFile is being past to the calling method as a  java Object, or at least can interpet it as this, and not a LicenseFile. Not sure why this is happening or if it is expected behavior but I would assume since Byteman knows what a LicenseFile is while in the rule itself, and you can access all of the LicenseFile data within $1 while in the rule, that it would pass it as such when calling the castToLicenseModel method in the Helper class, however that does not appear to be the case when using the $1 reference to the object.  Note that the LicenseFile and LicenseModel objects do not extend anything and only implement Serializable.  Thanks for the help.

                   

                  These fail ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                  RULE LicenseProcessWriteFileErrorsRule8
                  CLASS com.creativesolutions.ems.license.model.LicenseModel
                  METHOD setLicenseFile(com.creativesolutions.ems.license.LicenseFile)
                  AT ENTRY
                  BIND engine:com.creativesolutions.ems.brw.byteman.dao.BytemanDAO = new com.creativesolutions.ems.brw.byteman.dao.BytemanDAO();
                  file:com.creativesolutions.ems.license.model.LicenseModel = $0;
                  IF true
                  DO engine.castToLicenseModel($1);
                  ENDRULE

                   

                  RULE LicenseProcessWriteFileErrorsRule5
                  CLASS com.creativesolutions.ems.license.model.LicenseModel
                  HELPER com.creativesolutions.ems.brw.byteman.helper.EMSBytemanHelper
                  METHOD setLicenseFile(com.creativesolutions.ems.license.LicenseFile)
                  AT ENTRY
                  IF true
                  DO castToLicenseModel($1);
                  ENDRULE

                  ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                   

                  ---These

                   

                  work -----------------------------------------------------------------------------------------

                  RULE LicenseProcessWriteFileErrorsRule4

                  CLASS com.creativesolutions.ems.license.model.LicenseModel

                  METHOD setLicenseFile(com.creativesolutions.ems.license.LicenseFile)

                  AT ENTRY

                  BIND engine:com.creativesolutions.ems.brw.byteman.dao.BytemanDAO = new com.creativesolutions.ems.brw.byteman.dao.BytemanDAO();

                  file:com.creativesolutions.ems.license.model.LicenseModel = $0;

                  IF true

                  DO engine.castToLicenseModel(file.getLicenseFile());

                  ENDRULE

                   

                  RULE LicenseProcessWriteFileErrorsRule2

                  CLASS com.creativesolutions.ems.license.model.LicenseModel

                  HELPER com.creativesolutions.ems.brw.byteman.helper.EMSBytemanHelper

                  METHOD setLicenseFile(LicenseFile)

                  IF true

                  DO castToLicenseModel(new com.creativesolutions.ems.license.LicenseFile())

                  ENDRULE

                   

                  RULE LicenseProcessWriteFileErrorsRule2

                  CLASS com.creativesolutions.ems.license.model.LicenseModel

                  HELPER com.creativesolutions.ems.brw.byteman.helper.EMSBytemanHelper

                  METHOD setLicenseFile

                  BIND file:com.creativesolutions.ems.license.model.LicenseModel = $0;

                  IF true

                  DO castToLicenseModel(file.getLicenseFile());

                  ENDRULE

                  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------