4 Replies Latest reply on Aug 19, 2011 12:19 PM by Jeevaraj Dhanaraj

    Is AOP enabled in JBOSS 7?

    Karthee Kholi Newbie
      I

       

      I was able to deploy a WAR file with AOP enabled in JBOSS 5. I passed the spring-agent jar as the javaagent parameter and made a few other modifications.

       

      But I am not able to deploy the war file in JBOSS 7. Is AOP enabled in JBOSS7?

        • 2. Re: Is AOP enabled in JBOSS 7?
          Karthee Kholi Newbie

          thanks Jai for the link.

           

          How do I go about solving the issue? I have a war file and I want to make it run in JBOSS 7 with AOP enabled. Any directions or hints greatly appreciated.

          • 3. Re: Is AOP enabled in JBOSS 7?
            jaikiran pai Master

            Karthee Kholi wrote:

             

            How do I go about solving the issue? I have a war file and I want to make it run in JBOSS 7 with AOP enabled. Any directions or hints greatly appreciated.

            Like Kabir said in that referenced thread, it's not possible in AS7.

            • 4. Re: Is AOP enabled in JBOSS 7?
              Jeevaraj Dhanaraj Newbie

              I have the same issue. I have a war file with load time aop waeving which works fine in jboss 5.x. When I try to deploy this in jboss 7, it is complaining that:

               

              "org.springframework.beans.factory.BeanCreationException: Error creating bean with name  'org.springframework.context.weaving.AspectJWeavingEnabler#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [org.jboss.modules.ModuleClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:org.springframework.instrument.jar"

               

              I even tried adding jvm options as below:

               

              :JAVA_OPTS_SET

              set "JAVA_OPTS=%JAVA_OPTS% -javaagent:spring-instrument-3.0.5.RELEASE.jar"

              rem set "JAVA_OPTS=%JAVA_OPTS% -javaagent:spring-agent-2.5.6.jar"


              Still I get the same error. Any guidelines as to how to resolve this load time aop will be helpful.

              Or load time aop is just not possible is AS7. If so, is it in roadmap to be supported in any future releases?