JBoss Community

org.apache.xml excluded from precompilation?

created by Tom Cunningham in JBoss AOP - View the full discussion

I'm trying to patch over a bug in XMLBeans ( https://issues.apache.org/jira/browse/XMLBEANS-328 ) using pointcuts.       I've been struggling over the past couple of days to try to get aopc working on my class, even building a stub class that models the class structure of the class I'm trying to advise, which worked fine, but I still get a "no comp needed" when trying to aopc org.apache.xmlbeans.impl.store.Xobj.

 

Today I set some breakpoints and discovered that it is being rejected because of the package name of the class :

 

(from AspectManager.class)

public boolean isNonAdvisableClassName(String classname)

   {

      if (ignoreClass(classname)) return true;

      if (includeClass(classname)) return false;

      if (excludeClass(classname)) return true;

      return (classname.startsWith("org.jboss.aop.") ||

              classname.endsWith("$aop") ||

              classname.startsWith("javassist") ||

              classname.startsWith("org.jboss.util.") ||

              classname.startsWith("gnu.trove.") ||

              classname.startsWith("EDU.oswego.cs.dl.util.concurrent.") ||

              classname.contains('.' + JoinPointGenerator.JOINPOINT_CLASS_PREFIX) ||

      // System classes

              classname.startsWith("org.apache.tools.ant") ||

              classname.startsWith("org.apache.crimson") ||

              classname.startsWith("org.apache.xalan") ||

              classname.startsWith("org.apache.xml") ||

....

 

Everything starting with org.apache.xml seems to be filtered out - which org.apache.xmlbeans.impl.store would fall under.     Is there a reason why "org.apache.xmlbeans" should be blocked, and not just "org.apache.xml."?       Is there a way I can short circuit this by getting includeClass(classname) to return true?     I'm calling aopc through the ant task :

 

            <aopc compilerclasspathref="build.classpath" verbose="true">
                        <classpath path="${aopc.xbean.classes.dir}"/>
                        <src path="${aopc.xbean.classes.dir}"/>
                        <include name="Foo.class"/>
                        <include name="org/apache/xmlbeans/impl/store/Xobj$SoapBodyXobj.class"/>
                        <include name="org/apache/xmlbeans/impl/store/Xobj.class"/>
                        <aoppath path="${aop.resources.dir}/META-INF/jboss-aop.xml"/>
                        <aopclasspath path="${aop.classes.dir}"/>
                </aopc>

Reply to this message by going to Community

Start a new discussion in JBoss AOP at Community