Not really. Have you tried googling for the exception ?
On 6/26/07, oliver kuntze <[EMAIL PROTECTED]> wrote:
Perfect! Thanks a lot, Guillaume! When trying to deploy the advised SU I get the following exception: <code> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.config.internalAutoProxyCreator': Initialization of bean failed; nested exception is java.lang.AbstractMethodError: org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator. findCandidateAdvisors()Ljava/util/List; </code> The POM I am using is: <code> <?xml version="1.0" encoding="ISO-8859-1"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>oliver.playground.sandbox.swifttransformation-service</groupId> <artifactId>swifttransformation-service</artifactId> <version>1.0</version> </parent> <groupId>oliver.playground.sandbox.swifttransformation-service</groupId> <artifactId>swifttransformation-jsr181-su</artifactId> <name>Oliver :: sandbox :: swifttransformation-service :: swifttransformation-jsr181-su :: SU</name> <packaging>jbi-service-unit</packaging> <version>1.0</version> <url>${site.root}//swifttransformation-service/</url> <dependencies> <dependency> <groupId>aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.5.3</version> </dependency> <dependency> <groupId>aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.5.3</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>2.0.1</version> </dependency> <dependency> <groupId>org.apache.servicemix</groupId> <artifactId>servicemix-jsr181</artifactId> <version>${servicemix-version}</version> </dependency> <dependency> <groupId>mycompany.framework</groupId> <artifactId>mycompany-shared</artifactId> <version>${myproject-version}</version> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.servicemix.tooling</groupId> <artifactId>jbi-maven-plugin</artifactId> <version>${servicemix-version}</version> <extensions>true</extensions> <configuration> <type>service-unit</type> <generateJbiDescriptor>false</generateJbiDescriptor> </configuration> </plugin> </plugins> </build> </project> </code> Still trying... Do you have any ideas??? Thanks very much! Cheers, Oliver. gnodet wrote: > > On 6/26/07, oliver kuntze <[EMAIL PROTECTED]> wrote: >> >> >> Ok, I think I got it. >> >> When a SU is deployed to a ServiceMix component, the component creates a >> Spring application context and configures the app according to the >> xbean.xml. I.e. every SU is in fact a Spring application. >> That means out of the box one is able to use Spring AOP aspects per SU. >> If >> one would like to have aspects for his/her "eai application", that is for >> a >> whole bunch of SAs, than one should extend ServiceMix / Xbean somehow so >> that a "global" xbean config containing the aspects is added to the >> ApplicationContext when the XBean SpringLoader has loaded the xbean.xml. >> Correct? > > > Exactly ! > > I tried to deploy a SU with an aspect but received the following > exception: >> BeanDefinitionStoreException: Unrecognized xbean namespace mapping: >> http://www.springframework.org/schema/aop >> >> My xbean.xml looks like this: >> <code> >> <?xml version="1.0" encoding="UTF-8"?> >> <beans xmlns="http://www.springframework.org/schema/beans" >> xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0" >> xmlns:swifttransformation="http://mycompany/swifttransformation" >> xmlns:aop="http://www.springframework.org/schema/aop"> >> >> <aop:aspectj-autoproxy/> >> <bean class=" >> mycompany.playground.swifttransformation.MonitoringAspect" >> id="swiftTransformationMonitoringAspect"/> >> >> <jsr181:endpoint endpoint="swift2xml" >> service="swifttransformation:iso15022-transformation" >> >> serviceInterface=" >> mycompany.playground.swifttransformation.SwiftToXmlTransformer" >> typeMapping="xmlbeans"> >> <jsr181:pojo> >> <bean >> class="mycompany.playground.swifttransformation.SwiftToXmlTransformerImpl" >> /> >> </jsr181:pojo> >> </jsr181:endpoint> >> </beans> >> </code> >> >> The spring.handler file in the spring-beans-2.0.1.jar of my ServiceMix >> distribution contains the following line: >> http\://www.springframework.org/schema/aop= >> org.springframework.aop.config.AopNamespaceHandler >> >> So everything seems to be in place. >> >> Any ideas why I get the exception? > > > I don't know why the handler is defined in spring-beans while the > associated > class is not. > You should put spring-aop in the SU by adding it to your pom.xml. > It should do the trick. > > Thanks a lot for helping a newbie out! >> >> Cheers, >> >> Oliver. >> >> >> gnodet wrote: >> > >> > I'm not sure to understand all the problems. >> > If I had to do AOP inside a SU, I would just consider the SU as a >> spring >> > application (even if it has to contain a JBI endpoint). >> > You can put additional jars needed in the SU and you should be able to >> use >> > AOP. You don't really need to hack the components >> > or the main configuration file. >> > >> > Or maybe you want to do AOP without configuring it explicitely ? This >> is >> > currently not possible. I think it should be doable by extending >> > the components somehow so that they always load other spring >> configuration >> > files: for example when a component creates a spring >> > ApplicationContext when loading a xbean.xml, it could be configured to >> > always load an aop.xml configuration file that you would provide >> > and which would add all the needed definitions. >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Spring-AOP-integration-in-ServiceMix-tf3975690s12049.html#a11303312 >> Sent from the ServiceMix - User mailing list archive at Nabble.com. >> >> > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Principal Engineer, IONA > Blog: http://gnodet.blogspot.com/ > > -- View this message in context: http://www.nabble.com/Spring-AOP-integration-in-ServiceMix-tf3975690s12049.html#a11305922 Sent from the ServiceMix - User mailing list archive at Nabble.com.
-- Cheers, Guillaume Nodet ------------------------ Principal Engineer, IONA Blog: http://gnodet.blogspot.com/
