If you read the Spring manual, you'll notice that the @Transactional
annotations are supported by Spring-AOP.
See the following section in the spring 3.x doc, I'm sure Spring 2.5.x is
the same.10.5.1 Understanding the Spring Framework's declarative transaction
implementation
So you would need spring-aop also.

Allen

On Thu, Jun 16, 2011 at 12:28 PM, Shamik Bandopadhyay <[email protected]>wrote:

> Hi,
>
> I've run into the following exception when I try to start the bundle.
>
> *Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'taxonomyDaoLoadImpl' defined in URL
> [bundle://350.0:0/META-INF/spring/applicationContext.xml]: Initialization
> of
> bean failed; nested exception is java.lang.IllegalArgumentException:
> interface org.springframework.aop.SpringProxy is not visible from class
> loader*
>
> I'm not referring to spring aop package and it doen't reflect in my
> import-package as well. Here's my manifest
>
> Manifest-Version: 1.0
> Export-Package: com.test.taxonomy.dao.api;uses:="com.autodesk.taxo
>  nomy.message,com.test.taxonomy.model";version="1.0.0"
> Bundle-ClassPath: .
> Built-By: bandops
> Tool: Bnd-0.0.357
> Bundle-Name: Taxonomy Dao Impl Bundle
> Created-By: Apache Maven Bundle Plugin
> Build-Jdk: 1.6.0_21
> Bundle-Version: 1.0.0
> Bnd-LastModified: 1308246096716
> Embed-Transitive: true
> Bundle-ManifestVersion: 2
> Embed-Dependency:
>
> *;scope=compile|runtime;inline=true;artifactId=!spring|commons-collections|commons-logging|org.apache.felix.framework|tax
>
>  onomymessagebundle|taxonomymodelbundle
> Import-Package: com.test.taxonomy.dao.api;resolution:=optional;ver
>  sion="1.0",com.test.taxonomy.message;version="1.0.0",com.test
>  .taxonomy.model;version="1.0.0",javax.management;resolution:=optional
>  ,javax.net;resolution:=optional,javax.net.ssl;resolution:=optional,or
>  g.apache.commons.collections;resolution:=optional;version="3.2",org.a
>  pache.commons.logging;resolution:=optional,org.apache.tools.ant;resol
>  ution:=optional,org.apache.tools.ant.types;resolution:=optional,org.a
>  pache.tools.ant.types.resources;resolution:=optional,org.apache.tools
>  .ant.util.regexp;resolution:=optional,org.osgi.framework;resolution:=
>  optional;version="1.5",org.springframework.beans.factory;resolution:=
>  optional;version="2.5",org.springframework.core;resolution:=optional;
>  version="2.5",org.springframework.core.io;resolution:=optional;versio
>  n="2.5",org.springframework.dao;resolution:=optional;version="2.5",or
>  g.springframework.dao.support;resolution:=optional;version="2.5",org.
>  springframework.transaction;resolution:=optional;version="2.5",org.sp
>  ringframework.transaction.annotation;resolution:=optional;version="2.
>  5",org.springframework.transaction.support;resolution:=optional;versi
>  on="2.5",org.springframework.util;resolution:=optional;version="2.5"
> Bundle-SymbolicName: taxonomydaoimplbundle
>
>
> Here's a snippet from my pom entry :
>
> <dependency>
>   <groupId>org.springframework</groupId>
>   <artifactId>spring</artifactId>
>   <version>2.5.5</version>
> </dependency>
>
> <configuration>
>        <instructions>
>
>
> <Export-Package>com.autodesk.taxonomy.dao.api;version=1.0.0</Export-Package>
>        <Import-Package>com.autodesk.taxonomy.model.*;version=1.0.0,
> com.autodesk.taxonomy.message.*;version=1.0.0,
>                        *;resolution:=optional
>        </Import-Package>
>
>
> <Embed-Dependency>*;scope=compile|runtime;inline=true;artifactId=!spring|commons-collections|commons-logging|org.apache.felix.framework|taxonomymessagebundle|taxonomymodelbundle</Embed-Dependency>
>        <Embed-Transitive>true</Embed-Transitive>
>        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>             <Bundle-Version>${pom.version}</Bundle-Version>
>        <Bundle-ClassPath>.,{maven-dependencies}</Bundle-ClassPath>
>        <Include-Resource>
>                {maven-resources}, {maven-dependencies </Include-Resource>
>        </instructions>
> </configuration>
>
>
> Not sure why I'm getting this exception since I'm not using aop anywhere in
> my application. I'm using @Transactional annotation in the service code
> inside my bundle which is part of Spring-tx and not aop.
>
> Since the container have spring-aop bundle, why the classloader is not able
> to resolve it ?
> Any pointers will be highly appreciated.
>
> -Thanks
>

Reply via email to