2 Replies Latest reply on Apr 15, 2005 12:31 AM by Tim McCune

    Failed to aspectize class

    Tim McCune Novice

      I'm getting warning messages from JBoss AOP that begin "org.jboss.aop.instrument.TransformationException: Failed to aspectize class..." I've got a few questions.

      1) Why are these messages going to stderr instead of using log4j? That's the most annoying problem.

      2) Is there any way to suppress these warnings? I have SuppressTransformationErrors set to "true" in jboss-service.xml, but that doesn't seem to be helping.

      3) Any idea why I would be getting these errors for Jakarta Velocity? I'm using Velocity 1.3, and the specific message is "Failed to aspectize class org.apache.velocity.runtime.log.LogManager. Could not find class it references org.apache.velocity.runtime.log.AvalonLogSystem It may not be in your classpath and you may not be getting field and constructor weaving for this class." But I have velocity-1.3.jar in my classpath, and
      jar tvf velocity-1.3.jar |grep AvalonLogSystem
      3094 Sun Jul 07 17:03:54 EDT 2002 org/apache/velocity/runtime/log/AvalonLogSystem.class
      So the class is in the jar file. What more does JBoss AOP need? I'm guessing that maybe the problem is because JBoss has an avalon-framework.jar in its lib directory, and that's causing some kind of conflict. Of course, I'd try using an isolated classloader, but since that break JBoss AOP, (http://www.jboss.org/index.html?module=bb&op=viewtopic&t=62368), that's not really an option. :) Any suggestions?

        • 1. Re: Failed to aspectize class
          Bill Burke Master

          We're eventually going to use the JBoss logging abstraction in the jboss-common.jar so that you can plug in log4j and such for logging. Originally I didn't want to depend on yet another thirdparty library for JBoss AOP.

          As far as your error goes, the Load-Time transformer is trying to find the bytecode for the AvalonLogSystem class. It does this by calling ClassLoader.getResource("org/apache/velocity/runtime/log/AvalonLogSystem.class");
          Is that class in one of those jars?

          BTW, I could not reproduce your scoped classloading problem. Can you log a bug on JIRA and attach a simple test case?

          • 2. Re: Failed to aspectize class
            Tim McCune Novice

             

            As far as your error goes, the Load-Time transformer is trying to find the bytecode for the AvalonLogSystem class. It does this by calling ClassLoader.getResource("org/apache/velocity/runtime/log/AvalonLogSystem.class");
            Is that class in one of those jars?


            Yes, it is in both velocity-1.3.jar, which is inside my ear as a jar module, and in JBOSS_HOME/server/all/lib/avalon-framework.jar.

            BTW, I could not reproduce your scoped classloading problem. Can you log a bug on JIRA and attach a simple test case?


            Bug filed: http://jira.jboss.org/jira/browse/JBAOP-108