4 Replies Latest reply on Feb 21, 2013 8:21 AM by Claus Ibsen

    Aspect in Camel: Expecting raw type, not: org.apache.camel.core.xml.Abstrac

    Lekan Omotayo Expert

      I was trying to write an Advice in my camel application, see code below:

       

      @Aspect

      public class SystemAspectAdviceApi {

       

      @Pointcut(value="execution(public * *(..))")

           public void anyPublicMethod() {

           }

            

       

      @Around("anyPublicMethod() && args(exchange,..) && @annotation(logAction)")

           public Object logTransaction(ProceedingJoinPoint pjp, LogAction logAction, Exchange exchange) throws Throwable

           {

                String action = logAction.actionPerformed();

                return pjp.proceed();

           }

      }

       

       

      It however throws the exception shown below:

       

      Caused by: java.lang.IllegalStateException: Expecting raw type, not: org.apache.camel.core.xml.AbstractCamelContextFactoryBean

           at org.aspectj.weaver.TypeFactory.createParameterizedType(TypeFactory.java:37)[395:aspectjtools165:1.6.5]

           at org.aspectj.weaver.reflect.JavaLangTypeToResolvedTypeConverter.fromType(JavaLangTypeToResolvedTypeConverter.java:75)[395:aspectjtools165:1.6.5]

           at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate.getSuperclass(Java15ReflectionBasedReferenceTypeDelegate.java:138)[395:aspectjtools165:1.6.5]

           at org.aspectj.weaver.ReferenceType.getSuperclass(ReferenceType.java:821)[395:aspectjtools165:1.6.5]

           at org.aspectj.weaver.JoinPointSignatureIterator.addSignaturesUpToFirstDefiningMember(JoinPointSignatureIterator.java:109)[395:aspectjtools165:1.6.5]

           at org.aspectj.weaver.JoinPointSignatureIterator.(JoinPointSignatureIterator.java:51)[395:aspectjtools165:1.6.5]

           at org.aspectj.weaver.MemberImpl.getJoinPointSignatures(MemberImpl.java:541)[395:aspectjtools165:1.6.5]

       

       

      Any idea will be apprciated.