0

I have developed camel osgi bundle which uses spring style camel configuration and aspectj aop features. When I deployed it into karaf 3.0.1, it gives java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around exception. I have following dependencies in my pom.xml

<dependency>
  <groupId>org.apache.servicemix.bundles</groupId>
  <artifactId>org.apache.servicemix.bundles.aspectj</artifactId>
  <version>1.6.8_2</version>
</dependency>
 <dependency>
    <groupId>org.springframework.osgi</groupId>
    <artifactId>spring-osgi-core</artifactId>
     <version>1.2.1</version>
  </dependency>

And also it contains given class. I have installed aspectj into my karaf console as it shows,

206 | Resolved  |  80 | 1.6.8.2 | Apache ServiceMix :: Bundles :: aspectj

I am using felix as karaf container.

My AOP config in camle-context.xml is follows.

<aop:aspectj-autoproxy />

<bean id="aspectProcess" class="com.intel.isf.samplesims.soap.core.ResponseBuilderAspect"/>

I have following simple aspect

@Aspect public class ResponseBuilderAspect {

@Before("execution(* com.intel.isf.samplesims.soap.builder.AuthorizeProcessor.process(..))")
public void methodExecuteAdvice(JoinPoint joinPoint) throws Throwable {
    Object[] args = joinPoint.getArgs();
    System.out.println("*****************" + " inside aspect"+"*************");
}

How should I get resolved this exception ?

рüффп
  • 5,172
  • 34
  • 67
  • 113
user2307172
  • 141
  • 1
  • 9

1 Answers1

0

Did you try to start the bundle 206? When its state is "Started" do you still get the exception?

stefan.itu
  • 41
  • 5