[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Aspect Weaving GlassFish and Errors
|
Does anyone know how to do this?
What i really want is
1) to apply an aspect to classses which implement the interface/classes
in javax.jbi all methods and constructors. I will pinpoint this once i
know how to do this.
2) to do this in GlassFish
3) to do this with Weaving
This is my current test Aspect which is not working. NOTE: sometimes
things will just die.
package test.aspects;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.reflect.CodeSignature;
// http://www.eclipse.org/aspectj/doc/released/progguide/semantics.html
// [[Key]]
// constructor
// new (..)
// class
// com..*
// method
// * *(..)
// [[Notes]]
// add jvm-option
// -javaagent:<path>\aspectjweaver.jar
public aspect TraceAspect {
public pointcut classes() :
!within(TraceAspect) && within(com.sun.jbi..*);
public pointcut constructors() :
execution(public new (..));
public pointcut methods() :
call(public * javax.jbi..*(..));
//execution(public * javax.jbi..*(..));
public pointcut printJoinPoint() :
(classes() && methods());
// (classes() && constructors()) || (classes() && methods());
Object around() : printJoinPoint() {
Object result = null;
try {
printJoinPoint(thisJoinPoint);
result = proceed();
} finally {
}
return result;
}
...
}
This is my aop.xml file
<aspectj>
<aspects>
<aspect name="test.aspects.TraceAspect" />
<!--
<include within="com..*"/>
<include within="java..*"/>
<include within="javax..*"/>
-->
</aspects>
<weaver>
<!--
<weaver options="-verbose">
<include within="com..*"/>
<include within="java..*"/>
<include within="javax..*"/>
<exclude within="test.aspects.*"/>
<dump within="com..*"/>
<dump within="java..*"/>
<dump within="javax..*"/>
-->
</weaver>
</aspectj>
I am receiving a whole bunch of errors of the type: (How can i get past
this?)
<dependency_failed type='unique_concrete_method' x='java/util/HashMap
size ()I' witness='org/apache/commons/collections/FastHashMap'
stamp='28.811'/>
<writer thread='5472'/>
<dependency_failed type='unique_concrete_method'
ctxk='com/sun/org/apache/commons/logging/Log'
x='com/sun/org/apache/commons/logging/impl/Jdk14Logger isDebugEnabled
()Z' witness='com/sun/org/apache/commons/logging/Log' stamp='28.944'/>
<dependency_failed type='unique_concrete_method'
ctxk='com/sun/org/apache/commons/logging/Log'
x='com/sun/org/apache/commons/logging/impl/Jdk14Logger isDebugEnabled
()Z' witness='com/sun/org/apache/commons/logging/Log' stamp='28.944'/>
<dependency_failed type='unique_concrete_method'
ctxk='com/sun/org/apache/commons/logging/Log'
x='com/sun/org/apache/commons/logging/impl/Jdk14Logger isTraceEnabled
()Z' witness='com/sun/org/apache/commons/logging/Log' stamp='28.944'/>
<dependency_failed type='unique_concrete_method'
ctxk='com/sun/org/apache/commons/logging/Log'
x='com/sun/org/apache/commons/logging/impl/Jdk14Logger isTraceEnabled
()Z' witness='com/sun/org/apache/commons/logging/Log' stamp='28.944'/>
<dependency_failed type='unique_concrete_method'
ctxk='com/sun/org/apache/commons/logging/Log'
x='com/sun/org/apache/commons/logging/impl/Jdk14Logger warn
(Ljava/lang/Object;Ljava/lang/Throwable;)V'
witness='com/sun/org/apache/commons/logging/Log' stamp='28.944'/>
<writer thread='5856'/>
<dependency_failed type='leaf_type' ctxk='java/util/Date'
witness='java/sql/Date' stamp='30.797'/>
<dependency_failed type='leaf_type' ctxk='java/io/DataOutputStream'
witness='org/hsqldb/DatabaseRowOutput' stamp='45.187'/>
<dependency_failed type='leaf_type' ctxk='java/io/DataOutputStream'
witness='org/hsqldb/DatabaseRowOutput' stamp='45.187'/>
<dependency_failed type='leaf_type' ctxk='java/io/DataOutputStream'
witness='org/hsqldb/DatabaseRowOutput' stamp='45.187'/>
<writer thread='2972'/>
<dependency_failed type='unique_concrete_method'
ctxk='java/util/HashSet' x='java/util/AbstractCollection toArray
([Ljava/lang/Object;)[Ljava/lang/Object;'
witness='com/sun/identity/common/CaseInsensitiveHashSet' stamp='45.278'/>
<dependency_failed type='unique_concrete_method'
ctxk='java/util/HashSet' x='java/util/AbstractCollection toArray
([Ljava/lang/Object;)[Ljava/lang/Object;'
witness='com/sun/identity/common/CaseInsensitiveHashSet' stamp='45.278'/>
<dependency_failed type='unique_concrete_method'
ctxk='java/util/HashSet' x='java/util/AbstractCollection toArray
([Ljava/lang/Object;)[Ljava/lang/Object;'
witness='com/sun/identity/common/CaseInsensitiveHashSet' stamp='45.278'/>
<dependency_failed type='unique_concrete_method'
ctxk='java/util/HashSet' x='java/util/AbstractCollection toArray
([Ljava/lang/Object;)[Ljava/lang/Object;'
witness='com/sun/identity/common/CaseInsensitiveHashSet' stamp='45.278'/>
<dependency_failed type='unique_concrete_method' x='java/util/HashSet
remove (Ljava/lang/Object;)Z'
witness='com/sun/identity/common/CaseInsensitiveHashSet' stamp='45.278'/>
<dependency_failed type='unique_concrete_method' x='java/util/HashSet
remove (Ljava/lang/Object;)Z'
witness='com/sun/identity/common/CaseInsensitiveHashSet' stamp='45.278'/>
<dependency_failed type='unique_concrete_method' x='java/util/HashSet
remove (Ljava/lang/Object;)Z'
witness='com/sun/identity/common/CaseInsensitiveHashSet' stamp='45.278'/>
<dependency_failed type='unique_concrete_method' x='java/util/HashSet
remove (Ljava/lang/Object;)Z'
witness='com/sun/identity/common/CaseInsensitiveHashSet' stamp='45.279'/>
<dependency_failed type='unique_concrete_method' x='java/util/HashSet
add (Ljava/lang/Object;)Z'
witness='com/sun/identity/common/CaseInsensitiveHashSet' stamp='45.279'/>
<dependency_failed type='unique_concrete_method' x='java/util/HashSet
add (Ljava/lang/Object;)Z'
witness='com/sun/identity/common/CaseInsensitiveHashSet' stamp='45.279'/>
<dependency_failed type='unique_concrete_method' x='java/util/Hashtable
containsKey (Ljava/lang/Object;)Z'
witness='com/sun/identity/common/CaseInsensitiveProperties' stamp='45.468'/>
<dependency_failed type='unique_concrete_method' x='java/util/Hashtable
containsKey (Ljava/lang/Object;)Z'
witness='com/sun/identity/common/CaseInsensitiveProperties' stamp='45.468'/>
<dependency_failed type='unique_concrete_method' x='java/util/Hashtable
containsKey (Ljava/lang/Object;)Z'
witness='com/sun/identity/common/CaseInsensitiveProperties' stamp='45.468'/>
<writer thread='5856'/>
<dependency_failed type='leaf_type' ctxk='java/util/TreeMap'
witness='com/sun/xml/bind/v2/schemagen/MultiMap' stamp='51.316'/>
<dependency_failed type='leaf_type' ctxk='java/util/TreeMap'
witness='com/sun/xml/bind/v2/schemagen/MultiMap' stamp='51.316'/>
<dependency_failed type='leaf_type' ctxk='java/util/TreeMap'
witness='com/sun/xml/bind/v2/schemagen/MultiMap' stamp='51.316'/>
<writer thread='2972'/>
<dependency_failed type='leaf_type' ctxk='java/math/BigInteger'
witness='org/apache/axis/types/NonPositiveInteger' stamp='55.516'/>
<dependency_failed type='leaf_type' ctxk='java/math/BigInteger'
witness='org/apache/axis/types/NonPositiveInteger' stamp='55.516'/>
<writer thread='5472'/>
<dependency_failed type='unique_concrete_method' x='java/util/Hashtable
size ()I' witness='org/apache/commons/logging/impl/WeakHashtable'
stamp='57.148'