You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Richard Katz <py...@gmail.com> on 2011/06/04 02:24:21 UTC

How can I get a compatible version syntax in Manifest.MF from the maven-bundle-plugin Plugin? The new one generates new syntax that can't be read by ServiceMix

I am having a problem where the org.apache.felix  maven-bundle-plugin which
generates version syntax that is not compatible with the Apache ServiceMix
OSGI container.   It won't deploy.



A previous version of the plug-in generated the version syntax as "X.Y" in
MANIFEST.MF


Import-Package: edu.berkeley.ist.sws.common.dbcp;resolution:=optional,
 edu.berkeley.sws.common.domain;resolution:=optional,edu.berkeley.sws.
 coursebf;resolution:=optional,edu.berkeley.sws.coursebf.domain;resolu
 tion:=optional,javax.sql;resolution:=optional,javax.xml.bind.annotati
 on;resolution:=optional,org.apache.commons.lang.builder;resolution:=o
 ptional;version="2.4",org.springframework.beans.factory;resolution:=o
 ptional;version="2.5",org.springframework.beans.factory.config;resolu
 tion:=optional;version="2.5",org.springframework.jdbc.core;resolution
 :=optional;version="3.0"

A new version of the plug-in generates the version syntax "[X.Y,Z)" in
MANIFEST.MF

Import-Package: edu.berkeley.ist.sws.common.dbcp;resolution:=optional,
 edu.berkeley.sws.common.domain;resolution:=optional,edu.berkeley.sws.
 coursebf.domain;resolution:=optional,javax.sql;resolution:=optional,j
 avax.xml.bind.annotation;resolution:=optional,org.apache.commons.lang
 .builder;resolution:=optional;version="[2.4,3)",org.springframework.b
 eans.factory;resolution:=optional;version="[2.5,3)",org.springframewo
 rk.beans.factory.config;resolution:=optional;version="[2.5,3)",org.sp
 ringframework.jdbc.core;resolution:=optional;version="[3.0,4)"

This syntax can not be read by Apache ServiceMix 4.3 and the jar will not
deploy successfully.  Instead it gets a class not found because one of the
packages is not successfully exported or imported.

What does open-bracket X dot Y comma Z close-paren actually mean?

Questions:
1. Is there a way to force the plugin to use the older version="X.Y" syntax?
2. Is there a way to specify a version of the plug into generate the older
syntax?
3. Is there a way to specify an older version of bndlib?
I have bndlib 0.0.357 in my repository but the install insists on picking up
version 1.15.0 instead.

If there is another forum I should try also, let me know.

We are deploying into apache-servicemix-4.3.0-fuse-03-00
I have also tried apache-servicemix-4.3.1-fuse-01-09
and apache-servicemix-4.3.0


Thanks!

Regards,

Richard Katz

Re: How can I get a compatible version syntax in Manifest.MF from the maven-bundle-plugin Plugin? The new one generates new syntax that can't be read by ServiceMix

Posted by Peter Kriens <pe...@aqute.biz>.
Sorry for the late reply, I missed it.

It seems it works for you which is good. Though I cannot oversee all the details my guess is that if you do not explicitly specify the Spring version your classpath shows a hodge podge of Spring versions. bnd now picks up the differences and assumes version 2 is not compatible with 3. This causes the resolver to create different class spaces.

The only right solution is to not mix and Spring versions and make sure you got the right versions during compile and runtime. 

Another, not nearly as good, solution is to set the version policy to the old bnd style:

	-version-policy: @

I would call this the ostrich policy :-)

Kind regards,

	Peter Kriens


On 7 jun 2011, at 20:04, Richard Katz wrote:

> Hi Peter,
> 
> Thanks very much for writing back
>>> 3. Is there a way to specify an older version of bndlib?
>> I think you can change the maven plugin dependency but I would have no idea
> how to do that
> 
> I found that we can specify the maven plugin and that it pulls in the
> earlier bndlib 0.0.357.  And this works with SMX. It fixes the manifest and
> the SMX deployment issue.
> 
> Note that not all of our jars exhibit the problem.  Only those that use JDBC
> calls (via Spring-JDBC I believe).
> 
> But the incompatibility in Bnd-1.15.0 causes issues for these jars for
> on-boarding developers since they automatically get a more recent version of
> the plugin in their Maven repository and have no idea that they're supposed
> to use an earlier version unless you fully specify this.  Maybe something
> *like* that is a decent solution.
> 
>>> So I am actually puzzled about your mail. If there is an import problem it
> is reported at resolve time, long before you get a Class Not Found
> exception. So what is the error?
> 
>>>      1) a deploy error which would indicate a syntax error (not likely),
>>>      2) a resolve error which would indicate a missing dependency, or
>>>      3) a runtime Class Not Found Exception?
> 
> You're sort of right.  First, we get 3
> org.springframework.beans.factory.CannotLoadBeanClassException: Error
> loading class
> nested exception is java.lang.NoClassDefFoundError:
> edu.berkeley.sws.coursebf.CourseServiceImpl not found from bundle
> 
> This class is in the jar. However, it never makes it to the list of imports.
> I can ensure that it gets to the import list by specifying it more precisely
> in the POM.   I don't know if that should be necessary or not as it is
> listed in exports in the pom.  And under the old bndlib, it automatically
> gets included in imports.
> 
> I have second build where I explicitly set the package into
> <Import-Package>.
> 
> I change the plugin spec  adding an explicit import:
>  edu.berkeley.sws.coursebf;resolution:=optional,
> as follows:
> 
>    <build>
>        <plugins>
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
> 
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
>                        <Export-Package>
>                            edu.berkeley.sws.coursebf,
>                            edu.berkeley.sws.coursebf.domain
>                        </Export-Package>
>                        <Import-Package>
>                            edu.berkeley.sws.coursebf;resolution:=optional,
>                            *;resolution:=optional
>                        </Import-Package>
>                        <DynamicImport-Package>
> 
>                        </DynamicImport-Package>
>                    </instructions>
>                </configuration>
>            </plugin>
> 
>            <!-- generate manifest automatically once the classes are
> processed -->
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <executions>
>                    <execution>
>                        <id>bundle-manifest</id>
>                        <phase>process-classes</phase>
>                        <goals>
>                            <goal>manifest</goal>
>                        </goals>
>                    </execution>
>                </executions>
>            </plugin>
>        </plugins>
>    </build>
> 
> Then I get the following exception from SMX:
> 
> 10:52:25,281 | ERROR | xtenderThread-26 | ContextLoaderListener            |
> BundleApplicationContextListener   50 | 76 -
> org.springframework.osgi.extender - 1.2.0 | Application context refresh
> failed (OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.CannotLoadBeanClassException: Error
> loading class [edu.berkeley.sws.coursebf.CourseServiceImpl] for bean with
> name 'courseService' defined in URL
> [bundleentry://220.fwk696318316/META-INF/spring/beans.xml]: problem with
> class file or dependent class; nested exception is
> java.lang.NoClassDefFoundError: edu.berkeley.sws.coursebf.CourseServiceImpl
> not found from bundle [Course Service :: BearFacts Data
> (edu.berkeley.sws.course-bf)]
> 
> This is shown in the second exception listing below.
> 
> The manifest created using this slight POM modification is:
> 
> Manifest-Version: 1.0
> Export-Package: edu.berkeley.sws.coursebf;uses:="edu.berkeley.sws.cour
> sebf.domain,org.springframework.beans.factory",edu.berkeley.sws.cours
> ebf.domain;uses:="org.apache.commons.lang.builder,javax.xml.bind.anno
> tation,edu.berkeley.sws.common.domain"
> Bundle-Version: 1.0.0.SNAPSHOT
> Build-Jdk: 1.6.0_25
> Built-By: richkatz
> Tool: Bnd-1.15.0
> Bnd-LastModified: 1307468955009
> Bundle-Name: Course Service :: BearFacts Data
> Bundle-ManifestVersion: 2
> Created-By: Apache Maven Bundle Plugin
> Import-Package: edu.berkeley.ist.sws.common.dbcp;resolution:=optional,
> edu.berkeley.sws.common.domain;resolution:=optional,edu.berkeley.sws.
> coursebf;resolution:=optional,edu.berkeley.sws.coursebf.domain;resolu
> tion:=optional,javax.sql;resolution:=optional,javax.xml.bind.annotati
> on;resolution:=optional,org.apache.commons.lang.builder;resolution:=o
> ptional;version="[2.4,3)",org.springframework.beans.factory;resolutio
> n:=optional;version="[2.5,3)",org.springframework.beans.factory.confi
> g;resolution:=optional;version="[2.5,3)",org.springframework.jdbc.cor
> e;resolution:=optional;version="[3.0,4)"
> Bundle-SymbolicName: edu.berkeley.sws.course-bf
> 
> Note in the above, that the package edu.berkeley.coursebf does get included
> this time.
> 
> 
>>> Only 2 can be related to the range syntax because exports do not match
> imports. So I am actually figuring that you have a very
>>> different problem ...
> 
> It seems there are 2 issues. First, that bndlib 0.0.357 creates import
> packages in the manifest automaticlaly where s bndlib 1.15.0 does not. And
> that even when you explicitly import SMX still gets an exception using the
> expansive version="[X.Y,Z)" syntax.
> 
>>> It is kind of surprising that you have version 2 and version 3 Spring
> frameworks in your imports. It almost seems >> you're mixing versions of
> Spring during compile time?
> 
> There is no attempt in the pom to mix versions of Spring. I'm sending the
> POM and parent below the exception. The original spec for the
> maven-bundle-plugin (minus the modification) is near the end of the main
> pom.
> 
> When I add <version>2.1.0</version> to the maven-bundle-plugin spec it
> works.  When I don't specify a version, it defaults to the latest in my
> Maven repository at the time I on-boarded to the project which is 2.3.4.
> When I specify 2.1.0, the versions all go to the specific format:
> version="X.Y" format and the jar deploys.
> 
> Thank you for checking into this.
> 
> 
> Regards,
> 
> 
> Rich Katz
> 
> 
> The exception thrown by SMX when using this version is shown below:
> 
> ====================================================
> Log from SMX during deploy sequence (using
> apache-servicemix-4.3.0-fuse-03-00)
> =====================================================
> 10:01:58,284 | INFO  | use-03-00/deploy | ultOsgiApplicationContextCreator |
> ultOsgiApplicationContextCreator   67 | 76 -
> org.springframework.osgi.extender - 1.2.0 | Discovered configurations
> {osgibundle:/META-INF/spring/*.xml} in bundle [C
> ourse Service :: BearFacts Data (edu.berkeley.sws.course-bf)]
> 10:01:58,286 | INFO  | xtenderThread-21 | OsgiBundleXmlApplicationContext  |
> pport.AbstractApplicationContext  456 | 65 - org.springframework.context -
> 3.0.3.RELEASE | Refreshing
> OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.cours
> e-bf, config=osgibundle:/META-INF/spring/*.xml): startup date [Tue Jun 07
> 10:01:58 PDT 2011]; root of context hierarchy
> 10:01:58,286 | INFO  | xtenderThread-21 | OsgiBundleXmlApplicationContext  |
> ractOsgiBundleApplicationContext  359 | 65 - org.springframework.context -
> 3.0.3.RELEASE | Unpublishing application context OSGi service for bundle
> Course Service
> :: BearFacts Data (edu.berkeley.sws.course-bf)
> 10:01:58,288 | INFO  | xtenderThread-21 | XmlBeanDefinitionReader          |
> tory.xml.XmlBeanDefinitionReader  315 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Loading XML bean definitions from URL
> [bundleentry://218.fwk696318316/META
> -INF/spring/beans-test.xml]
> 10:01:58,299 | INFO  | xtenderThread-21 | XmlBeanDefinitionReader          |
> tory.xml.XmlBeanDefinitionReader  315 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Loading XML bean definitions from URL
> [bundleentry://218.fwk696318316/META
> -INF/spring/beans.xml]
> 10:01:58,312 | INFO  | xtenderThread-21 | DefaultListableBeanFactory       |
> pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Overriding bean definition for bean 'courseService':
> replacing [Generic be
> an: class [edu.berkeley.sws.coursebf.CourseServiceImpl]; scope=;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; de
> stroyMethodName=null; defined in URL
> [bundleentry://218.fwk696318316/META-INF/spring/beans-test.xml]] with
> [Generic bean: class [edu.berkeley.sws.coursebf.CourseServiceImpl]; scope=;
> abstract=false; lazyInit=false; autowireMode=0; dependenc
> yCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
> in URL [bundleentry://218.fwk696318316/META-INF/spring/beans.xml]]
> 10:01:58,313 | INFO  | xtenderThread-21 | DefaultListableBeanFactory       |
> pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Overriding bean definition for bean 'propertyConfigurer':
> replacing [Gener
> ic bean: class
> [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer];
> scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodNa
> me=null; initMethodName=null; destroyMethodName=null; defined in URL
> [bundleentry://218.fwk696318316/META-INF/spring/beans-test.xml]] with
> [Generic bean: class
> [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer];
> scope=
> ; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
> in URL [bundleentry://218.fwk696318316/META-INF/spring/beans.xml]]
> 10:01:58,313 | INFO  | xtenderThread-21 | DefaultListableBeanFactory       |
> pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Overriding bean definition for bean 'courseAccessor':
> replacing [Generic bean: class
> [edu.berkeley.ist.course.spring.dao.CourseCatalogDaoImpl]; scope=;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
> in URL [bundleentry://218.fwk696318316/META-INF/spring/beans-test.xml]] with
> [Generic bean: class
> [edu.berkeley.ist.course.spring.dao.CourseCatalogDaoImpl]; scope=;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
> in URL [bundleentry://218.fwk696318316/META-INF/spring/beans.xml]]
> 10:01:58,313 | INFO  | xtenderThread-21 | DefaultListableBeanFactory       |
> pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Overriding bean definition for bean 'dataSource': replacing
> [Generic bean: class [edu.berkeley.ist.sws.common.dbcp.BasicDataSource];
> scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=close;
> defined in URL
> [bundleentry://218.fwk696318316/META-INF/spring/beans-test.xml]] with
> [Generic bean: class [edu.berkeley.ist.sws.common.dbcp.BasicDataSource];
> scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=close;
> defined in URL [bundleentry://218.fwk696318316/META-INF/spring/beans.xml]]
> 10:01:58,321 | INFO  | xtenderThread-21 | WaiterApplicationContextExecutor |
> WaiterApplicationContextExecutor  252 | 76 -
> org.springframework.osgi.extender - 1.2.0 | No outstanding OSGi service
> dependencies, completing initialization for
> OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
> config=osgibundle:/META-INF/spring/*.xml)
> 10:01:58,327 | INFO  | xtenderThread-22 | DefaultListableBeanFactory       |
> pport.DefaultListableBeanFactory  549 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@7624a2c8:
> defining beans
> [courseService,propertyConfigurer,courseAccessor,dataSource,org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0];
> root of factory hierarchy
> 10:01:58,328 | INFO  | xtenderThread-22 | DefaultListableBeanFactory       |
> ort.DefaultSingletonBeanRegistry  422 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Destroying singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@7624a2c8:
> defining beans
> [courseService,propertyConfigurer,courseAccessor,dataSource,org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0];
> root of factory hierarchy
> *10:01:58,328 | ERROR | xtenderThread-22 | ContextLoaderListener
> | BundleApplicationContextListener   50 | 76 -
> org.springframework.osgi.extender - 1.2.0 | Application context refresh
> failed (OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.CannotLoadBeanClassException: Error
> loading class [edu.berkeley.sws.coursebf.CourseServiceImpl] for bean with
> name 'courseService' defined in URL
> [bundleentry://218.fwk696318316/META-INF/spring/beans.xml]: problem with
> class file or dependent class; nested exception is
> java.lang.NoClassDefFoundError: edu.berkeley.sws.coursebf.CourseServiceImpl
> not found from bundle [Course Service :: BearFacts Data
> (edu.berkeley.sws.course-bf)]*
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1238)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1304)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:870)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:556)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)[65:org.springframework.context:3.0.3.RELEASE]
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[75:org.springframework.osgi.core:1.2.0]
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[75:org.springframework.osgi.core:1.2.0]
>        at
> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[75:org.springframework.osgi.core:1.2.0]
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[75:org.springframework.osgi.core:1.2.0]
>        at
> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)[76:org.springframework.osgi.extender:1.2.0]
>        at java.lang.Thread.run(Thread.java:662)[:1.6.0_25]
> Caused by: java.lang.NoClassDefFoundError:
> edu.berkeley.sws.coursebf.CourseServiceImpl not found from bundle [Course
> Service :: BearFacts Data (edu.berkeley.sws.course-bf)]
>        at
> org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:112)
>        at
> org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
>        at
> org.springframework.util.ClassUtils.forName(ClassUtils.java:257)[59:org.springframework.core:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1256)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1227)[63:org.springframework.beans:3.0.3.RELEASE]
>        ... 11 more
> Caused by: java.lang.NoClassDefFoundError:
> org/springframework/beans/factory/InitializingBean
>        at java.lang.ClassLoader.defineClass1(Native Method)[:1.6.0_25]
>        at
> java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)[:1.6.0_25]
>        at
> java.lang.ClassLoader.defineClass(ClassLoader.java:615)[:1.6.0_25]
>        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.6.0.v20100517.jar:]
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:338)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:232)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1197)[osgi-3.6.0.v20100517.jar:]
>        at
> org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
>        ... 17 more
> Caused by: java.lang.ClassNotFoundException:
> org.springframework.beans.factory.InitializingBean
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.6.0.v20100517.jar:]
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
>        ... 37 more
> 
> 
> 
> ====================================================
> Log of SMX when deploying with modified Manifest with explicit
> Import-Package.
> ====================================================
> 10:52:25,221 | INFO  | use-03-00/deploy | ultOsgiApplicationContextCreator |
> ultOsgiApplicationContextCreator   67 | 76 -
> org.springframework.osgi.extender - 1.2.0 | Discovered configurations
> {osgibundle:/META-INF/spring/*.xml} in bundle [Course Service :: BearFacts
> Data (edu.berkeley.sws.course-bf)]
> 10:52:25,224 | INFO  | xtenderThread-25 | OsgiBundleXmlApplicationContext  |
> pport.AbstractApplicationContext  456 | 65 - org.springframework.context -
> 3.0.3.RELEASE | Refreshing
> OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
> config=osgibundle:/META-INF/spring/*.xml): startup date [Tue Jun 07 10:52:25
> PDT 2011]; root of context hierarchy
> 10:52:25,224 | INFO  | xtenderThread-25 | OsgiBundleXmlApplicationContext  |
> ractOsgiBundleApplicationContext  359 | 65 - org.springframework.context -
> 3.0.3.RELEASE | Unpublishing application context OSGi service for bundle
> Course Service :: BearFacts Data (edu.berkeley.sws.course-bf)
> 10:52:25,227 | INFO  | xtenderThread-25 | XmlBeanDefinitionReader          |
> tory.xml.XmlBeanDefinitionReader  315 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Loading XML bean definitions from URL
> [bundleentry://220.fwk696318316/META-INF/spring/beans-test.xml]
> 10:52:25,251 | INFO  | xtenderThread-25 | XmlBeanDefinitionReader          |
> tory.xml.XmlBeanDefinitionReader  315 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Loading XML bean definitions from URL
> [bundleentry://220.fwk696318316/META-INF/spring/beans.xml]
> 10:52:25,265 | INFO  | xtenderThread-25 | DefaultListableBeanFactory       |
> pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Overriding bean definition for bean 'courseService':
> replacing [Generic bean: class
> [edu.berkeley.sws.coursebf.CourseServiceImpl]; scope=; abstract=false;
> lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
> primary=false; factoryBeanName=null; factoryMethodName=null;
> initMethodName=null; destroyMethodName=null; defined in URL
> [bundleentry://220.fwk696318316/META-INF/spring/beans-test.xml]] with
> [Generic bean: class [edu.berkeley.sws.coursebf.CourseServiceImpl]; scope=;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
> in URL [bundleentry://220.fwk696318316/META-INF/spring/beans.xml]]
> 10:52:25,266 | INFO  | xtenderThread-25 | DefaultListableBeanFactory       |
> pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Overriding bean definition for bean 'propertyConfigurer':
> replacing [Generic bean: class
> [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer];
> scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
> in URL [bundleentry://220.fwk696318316/META-INF/spring/beans-test.xml]] with
> [Generic bean: class
> [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer];
> scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
> in URL [bundleentry://220.fwk696318316/META-INF/spring/beans.xml]]
> 10:52:25,266 | INFO  | xtenderThread-25 | DefaultListableBeanFactory       |
> pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Overriding bean definition for bean 'courseAccessor':
> replacing [Generic bean: class
> [edu.berkeley.ist.course.spring.dao.CourseCatalogDaoImpl]; scope=;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
> in URL [bundleentry://220.fwk696318316/META-INF/spring/beans-test.xml]] with
> [Generic bean: class
> [edu.berkeley.ist.course.spring.dao.CourseCatalogDaoImpl]; scope=;
> abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
> in URL [bundleentry://220.fwk696318316/META-INF/spring/beans.xml]]
> 10:52:25,267 | INFO  | xtenderThread-25 | DefaultListableBeanFactory       |
> pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Overriding bean definition for bean 'dataSource': replacing
> [Generic bean: class [edu.berkeley.ist.sws.common.dbcp.BasicDataSource];
> scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=close;
> defined in URL
> [bundleentry://220.fwk696318316/META-INF/spring/beans-test.xml]] with
> [Generic bean: class [edu.berkeley.ist.sws.common.dbcp.BasicDataSource];
> scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
> autowireCandidate=true; primary=false; factoryBeanName=null;
> factoryMethodName=null; initMethodName=null; destroyMethodName=close;
> defined in URL [bundleentry://220.fwk696318316/META-INF/spring/beans.xml]]
> 10:52:25,275 | INFO  | xtenderThread-25 | WaiterApplicationContextExecutor |
> WaiterApplicationContextExecutor  252 | 76 -
> org.springframework.osgi.extender - 1.2.0 | No outstanding OSGi service
> dependencies, completing initialization for
> OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
> config=osgibundle:/META-INF/spring/*.xml)
> 10:52:25,280 | INFO  | xtenderThread-26 | DefaultListableBeanFactory       |
> pport.DefaultListableBeanFactory  549 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@462f4ae2:
> defining beans
> [courseService,propertyConfigurer,courseAccessor,dataSource,org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0];
> root of factory hierarchy
> 10:52:25,281 | INFO  | xtenderThread-26 | DefaultListableBeanFactory       |
> ort.DefaultSingletonBeanRegistry  422 | 63 - org.springframework.beans -
> 3.0.3.RELEASE | Destroying singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@462f4ae2:
> defining beans
> [courseService,propertyConfigurer,courseAccessor,dataSource,org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0];
> root of factory hierarchy
> 10:52:25,281 | ERROR | xtenderThread-26 | ContextLoaderListener            |
> BundleApplicationContextListener   50 | 76 -
> org.springframework.osgi.extender - 1.2.0 | Application context refresh
> failed (OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.CannotLoadBeanClassException: Error
> loading class [edu.berkeley.sws.coursebf.CourseServiceImpl] for bean with
> name 'courseService' defined in URL
> [bundleentry://220.fwk696318316/META-INF/spring/beans.xml]: problem with
> class file or dependent class; nested exception is
> java.lang.NoClassDefFoundError: edu.berkeley.sws.coursebf.CourseServiceImpl
> not found from bundle [Course Service :: BearFacts Data
> (edu.berkeley.sws.course-bf)]
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1238)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1304)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:870)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:556)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)[65:org.springframework.context:3.0.3.RELEASE]
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[75:org.springframework.osgi.core:1.2.0]
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[75:org.springframework.osgi.core:1.2.0]
>        at
> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[75:org.springframework.osgi.core:1.2.0]
>        at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[75:org.springframework.osgi.core:1.2.0]
>        at
> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)[76:org.springframework.osgi.extender:1.2.0]
>        at java.lang.Thread.run(Thread.java:662)[:1.6.0_25]
> Caused by: java.lang.NoClassDefFoundError:
> edu.berkeley.sws.coursebf.CourseServiceImpl not found from bundle [Course
> Service :: BearFacts Data (edu.berkeley.sws.course-bf)]
>        at
> org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:112)
>        at
> org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
>        at
> org.springframework.util.ClassUtils.forName(ClassUtils.java:257)[59:org.springframework.core:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1256)[63:org.springframework.beans:3.0.3.RELEASE]
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1227)[63:org.springframework.beans:3.0.3.RELEASE]
>        ... 11 more
> Caused by: java.lang.NoClassDefFoundError:
> org/springframework/beans/factory/InitializingBean
>        at java.lang.ClassLoader.defineClass1(Native Method)[:1.6.0_25]
>        at
> java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)[:1.6.0_25]
>        at
> java.lang.ClassLoader.defineClass(ClassLoader.java:615)[:1.6.0_25]
>        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.6.0.v20100517.jar:]
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:338)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:232)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1197)[osgi-3.6.0.v20100517.jar:]
>        at
> org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
>        ... 17 more
> Caused by: java.lang.ClassNotFoundException:
> org.springframework.beans.factory.InitializingBean
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)[osgi-3.6.0.v20100517.jar:]
>        at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.6.0.v20100517.jar:]
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
>        ... 37 more
> 
> ====================================================
> Main POM (parent is below)
> ====================================================
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> 
>    <modelVersion>4.0.0</modelVersion>
> 
>    <parent>
>        <artifactId>parent</artifactId>
>        <groupId>edu.berkeley.sws</groupId>
>        <version>1.0-SNAPSHOT</version>
>    </parent>
> 
>    <groupId>edu.berkeley.sws</groupId>
>    <artifactId>course-bf</artifactId>
>    <packaging>bundle</packaging>
>    <name>Course Service :: BearFacts Data</name>
>    <version>1.0-SNAPSHOT</version>
> 
>    <properties>
>        <slf4j.version>1.5.0</slf4j.version>
>        <spring.osgi.version>1.2.0</spring.osgi.version>
>        <equinox.ver>3.2.2</equinox.ver>
>    </properties>
> 
>    <dependencies>
> 
>        <dependency>
>            <groupId>commons-logging</groupId>
>            <artifactId>commons-logging</artifactId>
>        </dependency>
>        <dependency>
>            <groupId>org.apache.cxf</groupId>
>            <artifactId>cxf-bundle</artifactId>
>        </dependency>
> 
>        <dependency>
>            <groupId>org.springframework.osgi</groupId>
>            <artifactId>spring-osgi-core</artifactId>
>        </dependency>
> 
>        <dependency>
>            <groupId>edu.berkeley.sws</groupId>
>            <artifactId>sws-common</artifactId>
>            <version>1.0-SNAPSHOT</version>
>            <type>bundle</type>
>        </dependency>
> 
> 
>        <dependency>
>            <groupId>org.springframework</groupId>
>            <artifactId>spring-jdbc</artifactId>
>            <version>3.0.3.RELEASE</version>
>        </dependency>
>        <dependency>
>            <groupId>junit</groupId>
>            <artifactId>junit</artifactId>
>            <scope>test</scope>
>        </dependency>
> 
>        <dependency>
>            <groupId>org.springframework</groupId>
>            <artifactId>spring-test</artifactId>
>            <scope>test</scope>
>        </dependency>
> 
>        <dependency>
>            <groupId>org.springframework</groupId>
>            <artifactId>spring-beans</artifactId>
>            <scope>test</scope>
>        </dependency>
> 
>        <dependency>
>            <groupId>org.springframework</groupId>
>            <artifactId>spring-core</artifactId>
>            <version>3.0.3.RELEASE</version>
>        </dependency>
> 
>        <dependency>
>            <groupId>org.jasypt</groupId>
>            <artifactId>jasypt</artifactId>
>            <version>1.7</version>
>            <scope>compile</scope>
>        </dependency>
> 
>        <dependency>
>            <groupId>com.oracle</groupId>
>            <artifactId>ojdbc14</artifactId>
>            <version>${oracle.version}</version>
>            <scope>test</scope>
>        </dependency>
> 
> 
>    </dependencies>
> 
>    <build>
> *        <plugins>*
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
> 
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
>                        <Export-Package>
>                            edu.berkeley.sws.coursebf,
>                            edu.berkeley.sws.coursebf.domain
>                        </Export-Package>
>                        <Import-Package>
> 
>                            *;resolution:=optional
>                        </Import-Package>
>                        <DynamicImport-Package>
> 
>                        </DynamicImport-Package>
>                    </instructions>
>                </configuration>
>            </plugin>
> 
>            <!-- generate manifest automatically once the classes are
> processed -->
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <executions>
>                    <execution>
>                        <id>bundle-manifest</id>
>                        <phase>process-classes</phase>
>                        <goals>
>                            <goal>manifest</goal>
>                        </goals>
>                    </execution>
>                </executions>
>            </plugin>
>        </plugins>
>    </build>
> 
>    <!-- ================================================ -->
>    <!-- Repository Configuration -->
>    <!-- ================================================ -->
> 
>    <repositories>
> 
>        <repository>
>            <id>i21-s3-osgi-repo</id>
>            <name>i21 osgi artifacts repo</name>
>            <snapshots>
>                <enabled>true</enabled>
>            </snapshots>
>            <url>http://maven.springframework.org/osgi</url>
>        </repository>
> 
>        <repository>
>            <id>i21-s3-maven-repo</id>
>            <name>i21 S3 milestone repo</name>
>            <url>http://maven.springframework.org/milestone</url>
>        </repository>
> 
>        <repository>
>            <id>com.springsource.repository.bundles.external</id>
>            <name>SpringSource Enterprise Bundle Repository - External
> Bundle Releases</name>
>            <url>http://repository.springsource.com/maven/bundles/external
> </url>
>        </repository>
> 
>        <repository>
>            <id>eclipse-repository</id>
>            <name>Eclipse Repository</name>
>            <url>http://repo1.maven.org/eclipse/</url>
>        </repository>
> 
>        <repository>
>            <id>spring-ext</id>
>            <name>Spring External Dependencies Repository</name>
>            <url>
> https://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo-ext/
> </url>
>        </repository>
> 
>        <!-- Spring-DM snapshot repository - disabled by default <repository
> <snapshots>
>            <enabled>true</enabled> </snapshots> <id>springframework.org</id>
> <name>Springframework
>            Maven SNAPSHOT Repository</name> <url>
> http://s3.amazonaws.com/maven.springframework.org/snapshot</url>
>            </repository> -->
>    </repositories>
> 
> </project>
> 
> 
> ====================================================
> POM Parent
> ====================================================
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> 
>    <modelVersion>4.0.0</modelVersion>
> 
>    <groupId>edu.berkeley.sws</groupId>
>    <artifactId>parent</artifactId>
>    <packaging>pom</packaging>
>    <version>1.0-SNAPSHOT</version>
>    <name> Student Web Services :: Parent</name>
> 
>    <!-- refer to versions in the latest Fuse ESB POMs, currently at:
> 
> http://repo.fusesource.com/nexus/content/groups/public/org/apache/servicemix/features/features/4.3.0-fuse-03-00/features-4.3.0-fuse-03-00.pom
> 
> http://repo.fusesource.com/maven2/org/apache/servicemix/apache-servicemix/4.3.0-fuse-03-00/apache-servicemix-4.3.0-fuse-03-00.pom
> 
>        For the latest versions of various Fuse releases, see the main repo
> at: http://repo.fusesource.com/maven2/org/apache/
> 
>        For a full list of commonly-used SMX bundles:
> http://repo.fusesource.com/maven2/org/apache/servicemix/bundles/ -->
> 
>    <properties>
>        <activemq.version>5.4.1-fuse-01-00</activemq.version>
>        <camel.version>2.4.0-fuse-02-00</camel.version>
> 
>        <commons-beanutils.version>1.8.2</commons-beanutils.version>
> 
> <commons-beanutils.bundle.version>1.8.2_1-fuse</commons-beanutils.bundle.version>
> 
>        <commons-collections.version>3.2.1</commons-collections.version>
> 
> <commons-collections.bundle.version>3.2.1_1-fuse</commons-collections.bundle.version>
> 
> 
> <commons-codec.bundle.version>1.3_1-fuse</commons-codec.bundle.version>
>        <commons-csv.bundle.version>1.0_1-fuse</commons-csv.bundle.version>
> 
>        <commons-dbcp.version>1.2.2</commons-dbcp.version>
> 
> <commons-dbcp.bundle.version>1.2.2_2-fuse</commons-dbcp.bundle.version>
> 
>        <commons-httpclient.version>3.1</commons-httpclient.version>
> 
> <commons-httpclient.bundle.version>3.1_2-fuse</commons-httpclient.bundle.version>
> 
>        <commons-io.bundle.version>1.4_1-fuse</commons-io.bundle.version>
> 
> <commons-jxpath.bundle.version>1.2_2-fuse</commons-jxpath.bundle.version>
> 
>        <commons-lang.version>2.4</commons-lang.version>
> 
> <commons-lang.bundle.version>2.4_2-fuse</commons-lang.bundle.version>
> 
>        <commons-logging.version>1.1.1</commons-logging.version>
> 
> <commons-net.bundle.version>1.4.1_2-fuse</commons-net.bundle.version>
> 
>        <commons-pool.version>1.5.4</commons-pool.version>
>        <commons-pool.bundle.version>1.5.4_2</commons-pool.bundle.version>
> 
> 
> <commons-jexl.bundle.version>1.1_2-fuse</commons-jexl.bundle.version>
>        <cxf.version>2.2.6</cxf.version>
>        <geronimo.wsmetadata.version>1.1.2</geronimo.wsmetadata.version>
>        <jaxb.api.version>2.1</jaxb.api.version>
>        <jaxb.impl.version>2.1.12_1</jaxb.impl.version>
>        <junit.version>4.7</junit.version>
>        <maven.compiler.version>2.3.2</maven.compiler.version>
>        <junit.bundle.version>4.7_2</junit.bundle.version>
>                <oracle.version>10.2.0.5</oracle.version>
>        <servicemix.specs.version>1.3.0</servicemix.specs.version>
> 
> <servicemix-utils.version>1.3.0-fuse-01-00</servicemix-utils.version>
>        <spring.osgi.version>1.2.1</spring.osgi.version>
>        <spring.version>3.0.3.RELEASE</spring.version>
>    </properties>
>    <distributionManagement>
>        <repository>
>            <uniqueVersion>false</uniqueVersion>
>            <id>sws-releases</id>
>            <name>Student Web Services Releases</name>
>            <url>
> http://maven.1918.berkeley.edu:8081/nexus/content/repositories/releases
> </url>
>        </repository>
>        <snapshotRepository>
>            <uniqueVersion>false</uniqueVersion>
>            <id>snapshots</id>
>            <name>Student Web Services Snapshots</name>
>            <url>
> http://maven.1918.berkeley.edu:8081/nexus/content/repositories/snapshots
> </url>
>        </snapshotRepository>
>    </distributionManagement>
>    <repositories>
>        <!--
>        <repository>
>            <releases />
>            <snapshots>
>                <enabled>false</enabled>
>            </snapshots>
>            <id>open.iona.m2</id>
>            <name>IONA Open Source Community Release Repository</name>
>            <url>http://repo.open.iona.com/maven2</url>
>        </repository>
>        <repository>
>            <releases>
>                <enabled>false</enabled>
>            </releases>
>            <snapshots />
>            <id>open.iona.m2-snapshot</id>
>            <name>IONA Open Source Community Snapshot Repository</name>
>            <url>http://repo.open.iona.com/maven2-snapshot</url>
>        </repository>
>        -->
>        <repository>
>            <id>apache-incubating</id>
>            <name>Apache Incubating Repository</name>
>            <url>http://people.apache.org/repo/m2-incubating-repository/
> </url>
>        </repository>
>        <repository>
>            <id>spring-milestone</id>
>            <name>Spring Portfolio Milestone Repository</name>
>            <url>http://s3.amazonaws.com/maven.springframework.org/milestone
> </url>
>            <releases>
>                <enabled>true</enabled>
>            </releases>
>            <snapshots>
>                <enabled>false</enabled>
>            </snapshots>
>        </repository>
>        <repository>
>            <id>com.springsource.repository.bundles.release</id>
>            <name>SpringSource Enterprise Bundle Repository - SpringSource
> Bundle
>                Releases</name>
>            <url>http://repository.springsource.com/maven/bundles/release
> </url>
>        </repository>
>        <repository>
>            <id>com.springsource.repository.bundles.external</id>
>            <name>SpringSource Enterprise Bundle Repository - External
> Bundle
>                Releases</name>
>            <url>http://repository.springsource.com/maven/bundles/external
> </url>
>        </repository>
>        <repository>
>            <id>glassfish-repository</id>
>            <name>Java.net Repository for Glassfish</name>
>            <url>http://download.java.net/maven/glassfish</url>
>        </repository>
>        <repository>
>            <id>maven2-repository.dev.java.net</id>
>            <name>Java.net Repository for Maven</name>
>            <url>http://download.java.net/maven/2/</url>
>            <layout>default</layout>
>        </repository>
>        <repository>
>            <id>snapshots</id>
>            <name>Student WebServices Snapshots Repository</name>
>            <url>http://174.129.32.246:8080/archiva/repository/snapshots
> </url>
>        </repository>
>    </repositories>
>        <!--
>    <pluginRepositories>
>        <pluginRepository>
>            <releases />
>            <snapshots>
>                <enabled>false</enabled>
>            </snapshots>
>            <id>open.iona.m2</id>
>            <name>IONA Open Source Community Release Repository</name>
>            <url>http://repo.open.iona.com/maven2</url>
>        </pluginRepository>
>        <pluginRepository>
>            <releases>
>                <enabled>false</enabled>
>            </releases>
>            <snapshots />
>            <id>open.iona.m2-snapshot</id>
>            <name>IONA Open Source Community Snapshot Repository</name>
>            <url>http://repo.open.iona.com/maven2-snapshot</url>
>        </pluginRepository>
>    </pluginRepositories>
>        -->
> 
>    <dependencyManagement>
>        <dependencies>
> 
>            <!-- Usual dependencies -->
>            <dependency>
>                <groupId>commons-logging</groupId>
>                <artifactId>commons-logging</artifactId>
>                <version>${commons-logging.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.camel</groupId>
>                <artifactId>camel-core</artifactId>
>                <version>${camel.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.camel</groupId>
>                <artifactId>camel-jms</artifactId>
>                <version>${camel.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.camel</groupId>
>                <artifactId>camel-spring</artifactId>
>                <version>${camel.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.camel</groupId>
>                <artifactId>camel-osgi</artifactId>
>                <version>${camel.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.cxf</groupId>
>                <artifactId>cxf-bundle</artifactId>
>                <version>${cxf.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.geronimo.specs</groupId>
>                <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
>                <version>${geronimo.wsmetadata.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.springframework</groupId>
>                <artifactId>spring-beans</artifactId>
>                <version>${spring.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.springframework</groupId>
>                <artifactId>spring-core</artifactId>
>                <version>${spring.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.springframework</groupId>
>                <artifactId>org.springframework.jdbc</artifactId>
>                <version>${spring.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.springframework.osgi</groupId>
>                <artifactId>spring-osgi-core</artifactId>
>                <version>${spring.osgi.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.servicemix.specs</groupId>
> 
> <artifactId>org.apache.servicemix.specs.jsr311-api-1.0</artifactId>
>                <version>${servicemix.specs.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.servicemix</groupId>
>                <artifactId>servicemix-utils</artifactId>
>                <version>${servicemix.utils.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.servicemix.bundles</groupId>
> 
> <artifactId>org.apache.servicemix.bundles.commons-httpclient</artifactId>
>                <version>${commons-httpclient.bundle.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.servicemix.bundles</groupId>
> 
> <artifactId>org.apache.servicemix.bundles.commons-lang</artifactId>
>                <version>${commons-lang.bundle.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.servicemix.bundles</groupId>
> 
> <artifactId>org.apache.servicemix.bundles.commons-collections
>                </artifactId>
>                <version>${commons-collections.bundle.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.servicemix.bundles</groupId>
> 
> <artifactId>org.apache.servicemix.bundles.commons-net</artifactId>
>                <version>${commons-net.bundle.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.apache.servicemix.specs</groupId>
> 
> <artifactId>org.apache.servicemix.specs.jaxb-api-${jaxb.api.version}
>                </artifactId>
>                <version>${servicemix.specs.version}</version>
>            </dependency>
> 
>            <!-- Testing dependencies -->
>            <dependency>
>                <groupId>junit</groupId>
>                <artifactId>junit</artifactId>
>                <version>${junit.version}</version>
>            </dependency>
>            <dependency>
>                <groupId>org.springframework</groupId>
>                <artifactId>spring-test</artifactId>
>                <version>${spring.version}</version>
>            </dependency>
> 
>        </dependencies>
>    </dependencyManagement>
>    <build>
>        <plugins>
>            <plugin>
>                <artifactId>maven-compiler-plugin</artifactId>
>                <version>${maven.compiler.version}</version>
>                <configuration>
>                    <source>1.6</source>
>                    <target>1.6</target>
>                </configuration>
>            </plugin>
>        </plugins>
>    </build>
>    <modules>
>        <!-- <module>course-bf</module> -->
> 
> 
>    </modules>
> </project>
> 
> 
> 
> On Tue, Jun 7, 2011 at 2:54 AM, Peter Kriens <pe...@aqute.biz> wrote:
> 
>>> What does open-bracket X dot Y comma Z close-paren actually mean?
>> This is the standard syntax for specifying a range of versions. Bracket
>> means inclusive and parenthesis means exclusive. So [2.1,3) means at least
>> version 2.1.0 and at most version 3.0.0. The old bnd just import 2.1 or any
>> later version. This means you can never make breaking changes so we decided
>> to change it into a proper range. Any OSGi framework must understand this so
>> it surprises me that there is a problem.  So I am actually puzzled about
>> your mail. If there is an import problem it is reported at resolve time,
>> long before you get a Class Not Found exception. So what is the error?
>> 
>>       1) a deploy error which would indicate a syntax error (not likely),
>>       2) a resolve error which would indicate a missing dependency, or
>>       3) a runtime Class Not Found Exception?
>> 
>> Only 2 can be related to the range syntax because exports do not match
>> imports. So I am actually figuring that you have a very different problem
>> ... It is kind of surprising that you have version 2 and version 3 Spring
>> frameworks in your imports. It almost seems you're mixing versions of Spring
>> during compile time?
>> 
>> Kind regards,
>> 
>>       Peter Kriens
>> 
>> 
>> 
>> 
>>> Questions:
>>> 1. Is there a way to force the plugin to use the older version="X.Y"
>> syntax?
>> -version-policy=${version;==}
>> 
>>> 2. Is there a way to specify a version of the plug into generate the
>> older
>>> syntax?
>> -version-policy=${version;==}
>> 
>>> 3. Is there a way to specify an older version of bndlib?
>> I think you can change the maven plugin dependency but I would have no idea
>> how to do that
>> 
>> 
>>> I have bndlib 0.0.357 in my repository but the install insists on picking
>> up
>>> version 1.15.0 instead.
>> 
>> On 4 jun 2011, at 02:24, Richard Katz wrote:
>> 
>>> I am having a problem where the org.apache.felix  maven-bundle-plugin
>> which
>>> generates version syntax that is not compatible with the Apache
>> ServiceMix
>>> OSGI container.   It won't deploy.
>>> 
>>> 
>>> 
>>> A previous version of the plug-in generated the version syntax as "X.Y"
>> in
>>> MANIFEST.MF
>>> 
>>> 
>>> Import-Package: edu.berkeley.ist.sws.common.dbcp;resolution:=optional,
>>> edu.berkeley.sws.common.domain;resolution:=optional,edu.berkeley.sws.
>>> coursebf;resolution:=optional,edu.berkeley.sws.coursebf.domain;resolu
>>> tion:=optional,javax.sql;resolution:=optional,javax.xml.bind.annotati
>>> on;resolution:=optional,org.apache.commons.lang.builder;resolution:=o
>>> ptional;version="2.4",org.springframework.beans.factory;resolution:=o
>>> ptional;version="2.5",org.springframework.beans.factory.config;resolu
>>> tion:=optional;version="2.5",org.springframework.jdbc.core;resolution
>>> :=optional;version="3.0"
>>> 
>>> A new version of the plug-in generates the version syntax "[X.Y,Z)" in
>>> MANIFEST.MF
>>> 
>>> Import-Package: edu.berkeley.ist.sws.common.dbcp;resolution:=optional,
>>> edu.berkeley.sws.common.domain;resolution:=optional,edu.berkeley.sws.
>>> coursebf.domain;resolution:=optional,javax.sql;resolution:=optional,j
>>> avax.xml.bind.annotation;resolution:=optional,org.apache.commons.lang
>>> .builder;resolution:=optional;version="[2.4,3)",org.springframework.b
>>> eans.factory;resolution:=optional;version="[2.5,3)",org.springframewo
>>> rk.beans.factory.config;resolution:=optional;version="[2.5,3)",org.sp
>>> ringframework.jdbc.core;resolution:=optional;version="[3.0,4)"
>>> 
>>> This syntax can not be read by Apache ServiceMix 4.3 and the jar will not
>>> deploy successfully.  Instead it gets a class not found because one of
>> the
>>> packages is not successfully exported or imported.
>>> 
>>> What does open-bracket X dot Y comma Z close-paren actually mean?
>>> 
>>> Questions:
>>> 1. Is there a way to force the plugin to use the older version="X.Y"
>> syntax?
>>> 2. Is there a way to specify a version of the plug into generate the
>> older
>>> syntax?
>>> 3. Is there a way to specify an older version of bndlib?
>>> I have bndlib 0.0.357 in my repository but the install insists on picking
>> up
>>> version 1.15.0 instead.
>>> 
>>> If there is another forum I should try also, let me know.
>>> 
>>> We are deploying into apache-servicemix-4.3.0-fuse-03-00
>>> I have also tried apache-servicemix-4.3.1-fuse-01-09
>>> and apache-servicemix-4.3.0
>>> 
>>> 
>>> Thanks!
>>> 
>>> Regards,
>>> 
>>> Richard Katz
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: How can I get a compatible version syntax in Manifest.MF from the maven-bundle-plugin Plugin? The new one generates new syntax that can't be read by ServiceMix

Posted by Richard Katz <py...@gmail.com>.
Hi Peter,

Thanks very much for writing back
>> 3. Is there a way to specify an older version of bndlib?
>I think you can change the maven plugin dependency but I would have no idea
how to do that

I found that we can specify the maven plugin and that it pulls in the
earlier bndlib 0.0.357.  And this works with SMX. It fixes the manifest and
the SMX deployment issue.

Note that not all of our jars exhibit the problem.  Only those that use JDBC
calls (via Spring-JDBC I believe).

But the incompatibility in Bnd-1.15.0 causes issues for these jars for
on-boarding developers since they automatically get a more recent version of
the plugin in their Maven repository and have no idea that they're supposed
to use an earlier version unless you fully specify this.  Maybe something
*like* that is a decent solution.

>>So I am actually puzzled about your mail. If there is an import problem it
is reported at resolve time, long before you get a Class Not Found
exception. So what is the error?

>>       1) a deploy error which would indicate a syntax error (not likely),
>>       2) a resolve error which would indicate a missing dependency, or
>>       3) a runtime Class Not Found Exception?

You're sort of right.  First, we get 3
org.springframework.beans.factory.CannotLoadBeanClassException: Error
loading class
nested exception is java.lang.NoClassDefFoundError:
edu.berkeley.sws.coursebf.CourseServiceImpl not found from bundle

This class is in the jar. However, it never makes it to the list of imports.
I can ensure that it gets to the import list by specifying it more precisely
in the POM.   I don't know if that should be necessary or not as it is
listed in exports in the pom.  And under the old bndlib, it automatically
gets included in imports.

I have second build where I explicitly set the package into
<Import-Package>.

I change the plugin spec  adding an explicit import:
  edu.berkeley.sws.coursebf;resolution:=optional,
as follows:

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>

                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>
                            edu.berkeley.sws.coursebf,
                            edu.berkeley.sws.coursebf.domain
                        </Export-Package>
                        <Import-Package>
                            edu.berkeley.sws.coursebf;resolution:=optional,
                            *;resolution:=optional
                        </Import-Package>
                        <DynamicImport-Package>

                        </DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>

            <!-- generate manifest automatically once the classes are
processed -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Then I get the following exception from SMX:

10:52:25,281 | ERROR | xtenderThread-26 | ContextLoaderListener            |
BundleApplicationContextListener   50 | 76 -
org.springframework.osgi.extender - 1.2.0 | Application context refresh
failed (OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.CannotLoadBeanClassException: Error
loading class [edu.berkeley.sws.coursebf.CourseServiceImpl] for bean with
name 'courseService' defined in URL
[bundleentry://220.fwk696318316/META-INF/spring/beans.xml]: problem with
class file or dependent class; nested exception is
java.lang.NoClassDefFoundError: edu.berkeley.sws.coursebf.CourseServiceImpl
not found from bundle [Course Service :: BearFacts Data
(edu.berkeley.sws.course-bf)]

This is shown in the second exception listing below.

The manifest created using this slight POM modification is:

Manifest-Version: 1.0
Export-Package: edu.berkeley.sws.coursebf;uses:="edu.berkeley.sws.cour
 sebf.domain,org.springframework.beans.factory",edu.berkeley.sws.cours
 ebf.domain;uses:="org.apache.commons.lang.builder,javax.xml.bind.anno
 tation,edu.berkeley.sws.common.domain"
Bundle-Version: 1.0.0.SNAPSHOT
Build-Jdk: 1.6.0_25
Built-By: richkatz
Tool: Bnd-1.15.0
Bnd-LastModified: 1307468955009
Bundle-Name: Course Service :: BearFacts Data
Bundle-ManifestVersion: 2
Created-By: Apache Maven Bundle Plugin
Import-Package: edu.berkeley.ist.sws.common.dbcp;resolution:=optional,
 edu.berkeley.sws.common.domain;resolution:=optional,edu.berkeley.sws.
 coursebf;resolution:=optional,edu.berkeley.sws.coursebf.domain;resolu
 tion:=optional,javax.sql;resolution:=optional,javax.xml.bind.annotati
 on;resolution:=optional,org.apache.commons.lang.builder;resolution:=o
 ptional;version="[2.4,3)",org.springframework.beans.factory;resolutio
 n:=optional;version="[2.5,3)",org.springframework.beans.factory.confi
 g;resolution:=optional;version="[2.5,3)",org.springframework.jdbc.cor
 e;resolution:=optional;version="[3.0,4)"
Bundle-SymbolicName: edu.berkeley.sws.course-bf

Note in the above, that the package edu.berkeley.coursebf does get included
this time.


>> Only 2 can be related to the range syntax because exports do not match
imports. So I am actually figuring that you have a very
 >> different problem ...

It seems there are 2 issues. First, that bndlib 0.0.357 creates import
packages in the manifest automaticlaly where s bndlib 1.15.0 does not. And
that even when you explicitly import SMX still gets an exception using the
expansive version="[X.Y,Z)" syntax.

>>It is kind of surprising that you have version 2 and version 3 Spring
frameworks in your imports. It almost seems >> you're mixing versions of
Spring during compile time?

There is no attempt in the pom to mix versions of Spring. I'm sending the
POM and parent below the exception. The original spec for the
maven-bundle-plugin (minus the modification) is near the end of the main
pom.

When I add <version>2.1.0</version> to the maven-bundle-plugin spec it
works.  When I don't specify a version, it defaults to the latest in my
Maven repository at the time I on-boarded to the project which is 2.3.4.
When I specify 2.1.0, the versions all go to the specific format:
version="X.Y" format and the jar deploys.

Thank you for checking into this.


Regards,


Rich Katz


The exception thrown by SMX when using this version is shown below:

====================================================
Log from SMX during deploy sequence (using
apache-servicemix-4.3.0-fuse-03-00)
=====================================================
10:01:58,284 | INFO  | use-03-00/deploy | ultOsgiApplicationContextCreator |
ultOsgiApplicationContextCreator   67 | 76 -
org.springframework.osgi.extender - 1.2.0 | Discovered configurations
{osgibundle:/META-INF/spring/*.xml} in bundle [C
ourse Service :: BearFacts Data (edu.berkeley.sws.course-bf)]
10:01:58,286 | INFO  | xtenderThread-21 | OsgiBundleXmlApplicationContext  |
pport.AbstractApplicationContext  456 | 65 - org.springframework.context -
3.0.3.RELEASE | Refreshing
OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.cours
e-bf, config=osgibundle:/META-INF/spring/*.xml): startup date [Tue Jun 07
10:01:58 PDT 2011]; root of context hierarchy
10:01:58,286 | INFO  | xtenderThread-21 | OsgiBundleXmlApplicationContext  |
ractOsgiBundleApplicationContext  359 | 65 - org.springframework.context -
3.0.3.RELEASE | Unpublishing application context OSGi service for bundle
Course Service
:: BearFacts Data (edu.berkeley.sws.course-bf)
10:01:58,288 | INFO  | xtenderThread-21 | XmlBeanDefinitionReader          |
tory.xml.XmlBeanDefinitionReader  315 | 63 - org.springframework.beans -
3.0.3.RELEASE | Loading XML bean definitions from URL
[bundleentry://218.fwk696318316/META
-INF/spring/beans-test.xml]
10:01:58,299 | INFO  | xtenderThread-21 | XmlBeanDefinitionReader          |
tory.xml.XmlBeanDefinitionReader  315 | 63 - org.springframework.beans -
3.0.3.RELEASE | Loading XML bean definitions from URL
[bundleentry://218.fwk696318316/META
-INF/spring/beans.xml]
10:01:58,312 | INFO  | xtenderThread-21 | DefaultListableBeanFactory       |
pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
3.0.3.RELEASE | Overriding bean definition for bean 'courseService':
replacing [Generic be
an: class [edu.berkeley.sws.coursebf.CourseServiceImpl]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; de
stroyMethodName=null; defined in URL
[bundleentry://218.fwk696318316/META-INF/spring/beans-test.xml]] with
[Generic bean: class [edu.berkeley.sws.coursebf.CourseServiceImpl]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependenc
yCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL [bundleentry://218.fwk696318316/META-INF/spring/beans.xml]]
10:01:58,313 | INFO  | xtenderThread-21 | DefaultListableBeanFactory       |
pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
3.0.3.RELEASE | Overriding bean definition for bean 'propertyConfigurer':
replacing [Gener
ic bean: class
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer];
scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodNa
me=null; initMethodName=null; destroyMethodName=null; defined in URL
[bundleentry://218.fwk696318316/META-INF/spring/beans-test.xml]] with
[Generic bean: class
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer];
scope=
; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL [bundleentry://218.fwk696318316/META-INF/spring/beans.xml]]
10:01:58,313 | INFO  | xtenderThread-21 | DefaultListableBeanFactory       |
pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
3.0.3.RELEASE | Overriding bean definition for bean 'courseAccessor':
replacing [Generic bean: class
[edu.berkeley.ist.course.spring.dao.CourseCatalogDaoImpl]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL [bundleentry://218.fwk696318316/META-INF/spring/beans-test.xml]] with
[Generic bean: class
[edu.berkeley.ist.course.spring.dao.CourseCatalogDaoImpl]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL [bundleentry://218.fwk696318316/META-INF/spring/beans.xml]]
10:01:58,313 | INFO  | xtenderThread-21 | DefaultListableBeanFactory       |
pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
3.0.3.RELEASE | Overriding bean definition for bean 'dataSource': replacing
[Generic bean: class [edu.berkeley.ist.sws.common.dbcp.BasicDataSource];
scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=close;
defined in URL
[bundleentry://218.fwk696318316/META-INF/spring/beans-test.xml]] with
[Generic bean: class [edu.berkeley.ist.sws.common.dbcp.BasicDataSource];
scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=close;
defined in URL [bundleentry://218.fwk696318316/META-INF/spring/beans.xml]]
10:01:58,321 | INFO  | xtenderThread-21 | WaiterApplicationContextExecutor |
WaiterApplicationContextExecutor  252 | 76 -
org.springframework.osgi.extender - 1.2.0 | No outstanding OSGi service
dependencies, completing initialization for
OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
config=osgibundle:/META-INF/spring/*.xml)
10:01:58,327 | INFO  | xtenderThread-22 | DefaultListableBeanFactory       |
pport.DefaultListableBeanFactory  549 | 63 - org.springframework.beans -
3.0.3.RELEASE | Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@7624a2c8:
defining beans
[courseService,propertyConfigurer,courseAccessor,dataSource,org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0];
root of factory hierarchy
10:01:58,328 | INFO  | xtenderThread-22 | DefaultListableBeanFactory       |
ort.DefaultSingletonBeanRegistry  422 | 63 - org.springframework.beans -
3.0.3.RELEASE | Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@7624a2c8:
defining beans
[courseService,propertyConfigurer,courseAccessor,dataSource,org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0];
root of factory hierarchy
*10:01:58,328 | ERROR | xtenderThread-22 | ContextLoaderListener
| BundleApplicationContextListener   50 | 76 -
org.springframework.osgi.extender - 1.2.0 | Application context refresh
failed (OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.CannotLoadBeanClassException: Error
loading class [edu.berkeley.sws.coursebf.CourseServiceImpl] for bean with
name 'courseService' defined in URL
[bundleentry://218.fwk696318316/META-INF/spring/beans.xml]: problem with
class file or dependent class; nested exception is
java.lang.NoClassDefFoundError: edu.berkeley.sws.coursebf.CourseServiceImpl
not found from bundle [Course Service :: BearFacts Data
(edu.berkeley.sws.course-bf)]*
        at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1238)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1304)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:870)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:556)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)[65:org.springframework.context:3.0.3.RELEASE]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[75:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[75:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[75:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[75:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)[76:org.springframework.osgi.extender:1.2.0]
        at java.lang.Thread.run(Thread.java:662)[:1.6.0_25]
Caused by: java.lang.NoClassDefFoundError:
edu.berkeley.sws.coursebf.CourseServiceImpl not found from bundle [Course
Service :: BearFacts Data (edu.berkeley.sws.course-bf)]
        at
org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:112)
        at
org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
        at
org.springframework.util.ClassUtils.forName(ClassUtils.java:257)[59:org.springframework.core:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1256)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1227)[63:org.springframework.beans:3.0.3.RELEASE]
        ... 11 more
Caused by: java.lang.NoClassDefFoundError:
org/springframework/beans/factory/InitializingBean
        at java.lang.ClassLoader.defineClass1(Native Method)[:1.6.0_25]
        at
java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)[:1.6.0_25]
        at
java.lang.ClassLoader.defineClass(ClassLoader.java:615)[:1.6.0_25]
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.6.0.v20100517.jar:]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
        at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:338)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:232)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1197)[osgi-3.6.0.v20100517.jar:]
        at
org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
        ... 17 more
Caused by: java.lang.ClassNotFoundException:
org.springframework.beans.factory.InitializingBean
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.6.0.v20100517.jar:]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
        ... 37 more



====================================================
Log of SMX when deploying with modified Manifest with explicit
Import-Package.
====================================================
10:52:25,221 | INFO  | use-03-00/deploy | ultOsgiApplicationContextCreator |
ultOsgiApplicationContextCreator   67 | 76 -
org.springframework.osgi.extender - 1.2.0 | Discovered configurations
{osgibundle:/META-INF/spring/*.xml} in bundle [Course Service :: BearFacts
Data (edu.berkeley.sws.course-bf)]
10:52:25,224 | INFO  | xtenderThread-25 | OsgiBundleXmlApplicationContext  |
pport.AbstractApplicationContext  456 | 65 - org.springframework.context -
3.0.3.RELEASE | Refreshing
OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
config=osgibundle:/META-INF/spring/*.xml): startup date [Tue Jun 07 10:52:25
PDT 2011]; root of context hierarchy
10:52:25,224 | INFO  | xtenderThread-25 | OsgiBundleXmlApplicationContext  |
ractOsgiBundleApplicationContext  359 | 65 - org.springframework.context -
3.0.3.RELEASE | Unpublishing application context OSGi service for bundle
Course Service :: BearFacts Data (edu.berkeley.sws.course-bf)
10:52:25,227 | INFO  | xtenderThread-25 | XmlBeanDefinitionReader          |
tory.xml.XmlBeanDefinitionReader  315 | 63 - org.springframework.beans -
3.0.3.RELEASE | Loading XML bean definitions from URL
[bundleentry://220.fwk696318316/META-INF/spring/beans-test.xml]
10:52:25,251 | INFO  | xtenderThread-25 | XmlBeanDefinitionReader          |
tory.xml.XmlBeanDefinitionReader  315 | 63 - org.springframework.beans -
3.0.3.RELEASE | Loading XML bean definitions from URL
[bundleentry://220.fwk696318316/META-INF/spring/beans.xml]
10:52:25,265 | INFO  | xtenderThread-25 | DefaultListableBeanFactory       |
pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
3.0.3.RELEASE | Overriding bean definition for bean 'courseService':
replacing [Generic bean: class
[edu.berkeley.sws.coursebf.CourseServiceImpl]; scope=; abstract=false;
lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodName=null; defined in URL
[bundleentry://220.fwk696318316/META-INF/spring/beans-test.xml]] with
[Generic bean: class [edu.berkeley.sws.coursebf.CourseServiceImpl]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL [bundleentry://220.fwk696318316/META-INF/spring/beans.xml]]
10:52:25,266 | INFO  | xtenderThread-25 | DefaultListableBeanFactory       |
pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
3.0.3.RELEASE | Overriding bean definition for bean 'propertyConfigurer':
replacing [Generic bean: class
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer];
scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL [bundleentry://220.fwk696318316/META-INF/spring/beans-test.xml]] with
[Generic bean: class
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer];
scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL [bundleentry://220.fwk696318316/META-INF/spring/beans.xml]]
10:52:25,266 | INFO  | xtenderThread-25 | DefaultListableBeanFactory       |
pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
3.0.3.RELEASE | Overriding bean definition for bean 'courseAccessor':
replacing [Generic bean: class
[edu.berkeley.ist.course.spring.dao.CourseCatalogDaoImpl]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL [bundleentry://220.fwk696318316/META-INF/spring/beans-test.xml]] with
[Generic bean: class
[edu.berkeley.ist.course.spring.dao.CourseCatalogDaoImpl]; scope=;
abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL [bundleentry://220.fwk696318316/META-INF/spring/beans.xml]]
10:52:25,267 | INFO  | xtenderThread-25 | DefaultListableBeanFactory       |
pport.DefaultListableBeanFactory  612 | 63 - org.springframework.beans -
3.0.3.RELEASE | Overriding bean definition for bean 'dataSource': replacing
[Generic bean: class [edu.berkeley.ist.sws.common.dbcp.BasicDataSource];
scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=close;
defined in URL
[bundleentry://220.fwk696318316/META-INF/spring/beans-test.xml]] with
[Generic bean: class [edu.berkeley.ist.sws.common.dbcp.BasicDataSource];
scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
autowireCandidate=true; primary=false; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=close;
defined in URL [bundleentry://220.fwk696318316/META-INF/spring/beans.xml]]
10:52:25,275 | INFO  | xtenderThread-25 | WaiterApplicationContextExecutor |
WaiterApplicationContextExecutor  252 | 76 -
org.springframework.osgi.extender - 1.2.0 | No outstanding OSGi service
dependencies, completing initialization for
OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
config=osgibundle:/META-INF/spring/*.xml)
10:52:25,280 | INFO  | xtenderThread-26 | DefaultListableBeanFactory       |
pport.DefaultListableBeanFactory  549 | 63 - org.springframework.beans -
3.0.3.RELEASE | Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@462f4ae2:
defining beans
[courseService,propertyConfigurer,courseAccessor,dataSource,org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0];
root of factory hierarchy
10:52:25,281 | INFO  | xtenderThread-26 | DefaultListableBeanFactory       |
ort.DefaultSingletonBeanRegistry  422 | 63 - org.springframework.beans -
3.0.3.RELEASE | Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@462f4ae2:
defining beans
[courseService,propertyConfigurer,courseAccessor,dataSource,org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0];
root of factory hierarchy
10:52:25,281 | ERROR | xtenderThread-26 | ContextLoaderListener            |
BundleApplicationContextListener   50 | 76 -
org.springframework.osgi.extender - 1.2.0 | Application context refresh
failed (OsgiBundleXmlApplicationContext(bundle=edu.berkeley.sws.course-bf,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.CannotLoadBeanClassException: Error
loading class [edu.berkeley.sws.coursebf.CourseServiceImpl] for bean with
name 'courseService' defined in URL
[bundleentry://220.fwk696318316/META-INF/spring/beans.xml]: problem with
class file or dependent class; nested exception is
java.lang.NoClassDefFoundError: edu.berkeley.sws.coursebf.CourseServiceImpl
not found from bundle [Course Service :: BearFacts Data
(edu.berkeley.sws.course-bf)]
        at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1238)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1304)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:870)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:556)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)[65:org.springframework.context:3.0.3.RELEASE]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[75:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[75:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[75:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[75:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)[76:org.springframework.osgi.extender:1.2.0]
        at java.lang.Thread.run(Thread.java:662)[:1.6.0_25]
Caused by: java.lang.NoClassDefFoundError:
edu.berkeley.sws.coursebf.CourseServiceImpl not found from bundle [Course
Service :: BearFacts Data (edu.berkeley.sws.course-bf)]
        at
org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:112)
        at
org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
        at
org.springframework.util.ClassUtils.forName(ClassUtils.java:257)[59:org.springframework.core:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1256)[63:org.springframework.beans:3.0.3.RELEASE]
        at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1227)[63:org.springframework.beans:3.0.3.RELEASE]
        ... 11 more
Caused by: java.lang.NoClassDefFoundError:
org/springframework/beans/factory/InitializingBean
        at java.lang.ClassLoader.defineClass1(Native Method)[:1.6.0_25]
        at
java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)[:1.6.0_25]
        at
java.lang.ClassLoader.defineClass(ClassLoader.java:615)[:1.6.0_25]
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.6.0.v20100517.jar:]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
        at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:338)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:232)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1197)[osgi-3.6.0.v20100517.jar:]
        at
org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
        ... 17 more
Caused by: java.lang.ClassNotFoundException:
org.springframework.beans.factory.InitializingBean
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)[osgi-3.6.0.v20100517.jar:]
        at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)[osgi-3.6.0.v20100517.jar:]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_25]
        ... 37 more

====================================================
Main POM (parent is below)
====================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <artifactId>parent</artifactId>
        <groupId>edu.berkeley.sws</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <groupId>edu.berkeley.sws</groupId>
    <artifactId>course-bf</artifactId>
    <packaging>bundle</packaging>
    <name>Course Service :: BearFacts Data</name>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <slf4j.version>1.5.0</slf4j.version>
        <spring.osgi.version>1.2.0</spring.osgi.version>
        <equinox.ver>3.2.2</equinox.ver>
    </properties>

    <dependencies>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-bundle</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-core</artifactId>
        </dependency>

        <dependency>
            <groupId>edu.berkeley.sws</groupId>
            <artifactId>sws-common</artifactId>
            <version>1.0-SNAPSHOT</version>
            <type>bundle</type>
        </dependency>


        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>3.0.3.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>3.0.3.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt</artifactId>
            <version>1.7</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc14</artifactId>
            <version>${oracle.version}</version>
            <scope>test</scope>
        </dependency>


    </dependencies>

    <build>
*        <plugins>*
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>

                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>
                            edu.berkeley.sws.coursebf,
                            edu.berkeley.sws.coursebf.domain
                        </Export-Package>
                        <Import-Package>

                            *;resolution:=optional
                        </Import-Package>
                        <DynamicImport-Package>

                        </DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>

            <!-- generate manifest automatically once the classes are
processed -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <!-- ================================================ -->
    <!-- Repository Configuration -->
    <!-- ================================================ -->

    <repositories>

        <repository>
            <id>i21-s3-osgi-repo</id>
            <name>i21 osgi artifacts repo</name>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <url>http://maven.springframework.org/osgi</url>
        </repository>

        <repository>
            <id>i21-s3-maven-repo</id>
            <name>i21 S3 milestone repo</name>
            <url>http://maven.springframework.org/milestone</url>
        </repository>

        <repository>
            <id>com.springsource.repository.bundles.external</id>
            <name>SpringSource Enterprise Bundle Repository - External
Bundle Releases</name>
            <url>http://repository.springsource.com/maven/bundles/external
</url>
        </repository>

        <repository>
            <id>eclipse-repository</id>
            <name>Eclipse Repository</name>
            <url>http://repo1.maven.org/eclipse/</url>
        </repository>

        <repository>
            <id>spring-ext</id>
            <name>Spring External Dependencies Repository</name>
            <url>
https://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo-ext/
</url>
        </repository>

        <!-- Spring-DM snapshot repository - disabled by default <repository
<snapshots>
            <enabled>true</enabled> </snapshots> <id>springframework.org</id>
<name>Springframework
            Maven SNAPSHOT Repository</name> <url>
http://s3.amazonaws.com/maven.springframework.org/snapshot</url>
            </repository> -->
    </repositories>

</project>


====================================================
POM Parent
====================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>edu.berkeley.sws</groupId>
    <artifactId>parent</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>
    <name> Student Web Services :: Parent</name>

    <!-- refer to versions in the latest Fuse ESB POMs, currently at:

http://repo.fusesource.com/nexus/content/groups/public/org/apache/servicemix/features/features/4.3.0-fuse-03-00/features-4.3.0-fuse-03-00.pom

http://repo.fusesource.com/maven2/org/apache/servicemix/apache-servicemix/4.3.0-fuse-03-00/apache-servicemix-4.3.0-fuse-03-00.pom

        For the latest versions of various Fuse releases, see the main repo
at: http://repo.fusesource.com/maven2/org/apache/

        For a full list of commonly-used SMX bundles:
http://repo.fusesource.com/maven2/org/apache/servicemix/bundles/ -->

    <properties>
        <activemq.version>5.4.1-fuse-01-00</activemq.version>
        <camel.version>2.4.0-fuse-02-00</camel.version>

        <commons-beanutils.version>1.8.2</commons-beanutils.version>

<commons-beanutils.bundle.version>1.8.2_1-fuse</commons-beanutils.bundle.version>

        <commons-collections.version>3.2.1</commons-collections.version>

<commons-collections.bundle.version>3.2.1_1-fuse</commons-collections.bundle.version>


<commons-codec.bundle.version>1.3_1-fuse</commons-codec.bundle.version>
        <commons-csv.bundle.version>1.0_1-fuse</commons-csv.bundle.version>

        <commons-dbcp.version>1.2.2</commons-dbcp.version>

<commons-dbcp.bundle.version>1.2.2_2-fuse</commons-dbcp.bundle.version>

        <commons-httpclient.version>3.1</commons-httpclient.version>

<commons-httpclient.bundle.version>3.1_2-fuse</commons-httpclient.bundle.version>

        <commons-io.bundle.version>1.4_1-fuse</commons-io.bundle.version>

<commons-jxpath.bundle.version>1.2_2-fuse</commons-jxpath.bundle.version>

        <commons-lang.version>2.4</commons-lang.version>

<commons-lang.bundle.version>2.4_2-fuse</commons-lang.bundle.version>

        <commons-logging.version>1.1.1</commons-logging.version>

<commons-net.bundle.version>1.4.1_2-fuse</commons-net.bundle.version>

        <commons-pool.version>1.5.4</commons-pool.version>
        <commons-pool.bundle.version>1.5.4_2</commons-pool.bundle.version>


<commons-jexl.bundle.version>1.1_2-fuse</commons-jexl.bundle.version>
        <cxf.version>2.2.6</cxf.version>
        <geronimo.wsmetadata.version>1.1.2</geronimo.wsmetadata.version>
        <jaxb.api.version>2.1</jaxb.api.version>
        <jaxb.impl.version>2.1.12_1</jaxb.impl.version>
        <junit.version>4.7</junit.version>
        <maven.compiler.version>2.3.2</maven.compiler.version>
        <junit.bundle.version>4.7_2</junit.bundle.version>
                <oracle.version>10.2.0.5</oracle.version>
        <servicemix.specs.version>1.3.0</servicemix.specs.version>

<servicemix-utils.version>1.3.0-fuse-01-00</servicemix-utils.version>
        <spring.osgi.version>1.2.1</spring.osgi.version>
        <spring.version>3.0.3.RELEASE</spring.version>
    </properties>
    <distributionManagement>
        <repository>
            <uniqueVersion>false</uniqueVersion>
            <id>sws-releases</id>
            <name>Student Web Services Releases</name>
            <url>
http://maven.1918.berkeley.edu:8081/nexus/content/repositories/releases
</url>
        </repository>
        <snapshotRepository>
            <uniqueVersion>false</uniqueVersion>
            <id>snapshots</id>
            <name>Student Web Services Snapshots</name>
            <url>
http://maven.1918.berkeley.edu:8081/nexus/content/repositories/snapshots
</url>
        </snapshotRepository>
    </distributionManagement>
    <repositories>
        <!--
        <repository>
            <releases />
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>open.iona.m2</id>
            <name>IONA Open Source Community Release Repository</name>
            <url>http://repo.open.iona.com/maven2</url>
        </repository>
        <repository>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots />
            <id>open.iona.m2-snapshot</id>
            <name>IONA Open Source Community Snapshot Repository</name>
            <url>http://repo.open.iona.com/maven2-snapshot</url>
        </repository>
        -->
        <repository>
            <id>apache-incubating</id>
            <name>Apache Incubating Repository</name>
            <url>http://people.apache.org/repo/m2-incubating-repository/
</url>
        </repository>
        <repository>
            <id>spring-milestone</id>
            <name>Spring Portfolio Milestone Repository</name>
            <url>http://s3.amazonaws.com/maven.springframework.org/milestone
</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>com.springsource.repository.bundles.release</id>
            <name>SpringSource Enterprise Bundle Repository - SpringSource
Bundle
                Releases</name>
            <url>http://repository.springsource.com/maven/bundles/release
</url>
        </repository>
        <repository>
            <id>com.springsource.repository.bundles.external</id>
            <name>SpringSource Enterprise Bundle Repository - External
Bundle
                Releases</name>
            <url>http://repository.springsource.com/maven/bundles/external
</url>
        </repository>
        <repository>
            <id>glassfish-repository</id>
            <name>Java.net Repository for Glassfish</name>
            <url>http://download.java.net/maven/glassfish</url>
        </repository>
        <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven</name>
            <url>http://download.java.net/maven/2/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>snapshots</id>
            <name>Student WebServices Snapshots Repository</name>
            <url>http://174.129.32.246:8080/archiva/repository/snapshots
</url>
        </repository>
    </repositories>
        <!--
    <pluginRepositories>
        <pluginRepository>
            <releases />
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>open.iona.m2</id>
            <name>IONA Open Source Community Release Repository</name>
            <url>http://repo.open.iona.com/maven2</url>
        </pluginRepository>
        <pluginRepository>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots />
            <id>open.iona.m2-snapshot</id>
            <name>IONA Open Source Community Snapshot Repository</name>
            <url>http://repo.open.iona.com/maven2-snapshot</url>
        </pluginRepository>
    </pluginRepositories>
        -->

    <dependencyManagement>
        <dependencies>

            <!-- Usual dependencies -->
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>${commons-logging.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-core</artifactId>
                <version>${camel.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-jms</artifactId>
                <version>${camel.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-spring</artifactId>
                <version>${camel.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-osgi</artifactId>
                <version>${camel.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-bundle</artifactId>
                <version>${cxf.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
                <version>${geronimo.wsmetadata.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.jdbc</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.osgi</groupId>
                <artifactId>spring-osgi-core</artifactId>
                <version>${spring.osgi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.specs</groupId>

<artifactId>org.apache.servicemix.specs.jsr311-api-1.0</artifactId>
                <version>${servicemix.specs.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix</groupId>
                <artifactId>servicemix-utils</artifactId>
                <version>${servicemix.utils.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>

<artifactId>org.apache.servicemix.bundles.commons-httpclient</artifactId>
                <version>${commons-httpclient.bundle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>

<artifactId>org.apache.servicemix.bundles.commons-lang</artifactId>
                <version>${commons-lang.bundle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>

<artifactId>org.apache.servicemix.bundles.commons-collections
                </artifactId>
                <version>${commons-collections.bundle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.bundles</groupId>

<artifactId>org.apache.servicemix.bundles.commons-net</artifactId>
                <version>${commons-net.bundle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.servicemix.specs</groupId>

<artifactId>org.apache.servicemix.specs.jaxb-api-${jaxb.api.version}
                </artifactId>
                <version>${servicemix.specs.version}</version>
            </dependency>

            <!-- Testing dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.version}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <modules>
        <!-- <module>course-bf</module> -->


    </modules>
</project>



On Tue, Jun 7, 2011 at 2:54 AM, Peter Kriens <pe...@aqute.biz> wrote:

> > What does open-bracket X dot Y comma Z close-paren actually mean?
> This is the standard syntax for specifying a range of versions. Bracket
> means inclusive and parenthesis means exclusive. So [2.1,3) means at least
> version 2.1.0 and at most version 3.0.0. The old bnd just import 2.1 or any
> later version. This means you can never make breaking changes so we decided
> to change it into a proper range. Any OSGi framework must understand this so
> it surprises me that there is a problem.  So I am actually puzzled about
> your mail. If there is an import problem it is reported at resolve time,
> long before you get a Class Not Found exception. So what is the error?
>
>        1) a deploy error which would indicate a syntax error (not likely),
>        2) a resolve error which would indicate a missing dependency, or
>        3) a runtime Class Not Found Exception?
>
> Only 2 can be related to the range syntax because exports do not match
> imports. So I am actually figuring that you have a very different problem
> ... It is kind of surprising that you have version 2 and version 3 Spring
> frameworks in your imports. It almost seems you're mixing versions of Spring
> during compile time?
>
> Kind regards,
>
>        Peter Kriens
>
>
>
>
> > Questions:
> > 1. Is there a way to force the plugin to use the older version="X.Y"
> syntax?
> -version-policy=${version;==}
>
> > 2. Is there a way to specify a version of the plug into generate the
> older
> > syntax?
> -version-policy=${version;==}
>
> > 3. Is there a way to specify an older version of bndlib?
> I think you can change the maven plugin dependency but I would have no idea
> how to do that
>
>
> > I have bndlib 0.0.357 in my repository but the install insists on picking
> up
> > version 1.15.0 instead.
>
> On 4 jun 2011, at 02:24, Richard Katz wrote:
>
> > I am having a problem where the org.apache.felix  maven-bundle-plugin
> which
> > generates version syntax that is not compatible with the Apache
> ServiceMix
> > OSGI container.   It won't deploy.
> >
> >
> >
> > A previous version of the plug-in generated the version syntax as "X.Y"
> in
> > MANIFEST.MF
> >
> >
> > Import-Package: edu.berkeley.ist.sws.common.dbcp;resolution:=optional,
> > edu.berkeley.sws.common.domain;resolution:=optional,edu.berkeley.sws.
> > coursebf;resolution:=optional,edu.berkeley.sws.coursebf.domain;resolu
> > tion:=optional,javax.sql;resolution:=optional,javax.xml.bind.annotati
> > on;resolution:=optional,org.apache.commons.lang.builder;resolution:=o
> > ptional;version="2.4",org.springframework.beans.factory;resolution:=o
> > ptional;version="2.5",org.springframework.beans.factory.config;resolu
> > tion:=optional;version="2.5",org.springframework.jdbc.core;resolution
> > :=optional;version="3.0"
> >
> > A new version of the plug-in generates the version syntax "[X.Y,Z)" in
> > MANIFEST.MF
> >
> > Import-Package: edu.berkeley.ist.sws.common.dbcp;resolution:=optional,
> > edu.berkeley.sws.common.domain;resolution:=optional,edu.berkeley.sws.
> > coursebf.domain;resolution:=optional,javax.sql;resolution:=optional,j
> > avax.xml.bind.annotation;resolution:=optional,org.apache.commons.lang
> > .builder;resolution:=optional;version="[2.4,3)",org.springframework.b
> > eans.factory;resolution:=optional;version="[2.5,3)",org.springframewo
> > rk.beans.factory.config;resolution:=optional;version="[2.5,3)",org.sp
> > ringframework.jdbc.core;resolution:=optional;version="[3.0,4)"
> >
> > This syntax can not be read by Apache ServiceMix 4.3 and the jar will not
> > deploy successfully.  Instead it gets a class not found because one of
> the
> > packages is not successfully exported or imported.
> >
> > What does open-bracket X dot Y comma Z close-paren actually mean?
> >
> > Questions:
> > 1. Is there a way to force the plugin to use the older version="X.Y"
> syntax?
> > 2. Is there a way to specify a version of the plug into generate the
> older
> > syntax?
> > 3. Is there a way to specify an older version of bndlib?
> > I have bndlib 0.0.357 in my repository but the install insists on picking
> up
> > version 1.15.0 instead.
> >
> > If there is another forum I should try also, let me know.
> >
> > We are deploying into apache-servicemix-4.3.0-fuse-03-00
> > I have also tried apache-servicemix-4.3.1-fuse-01-09
> > and apache-servicemix-4.3.0
> >
> >
> > Thanks!
> >
> > Regards,
> >
> > Richard Katz
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: How can I get a compatible version syntax in Manifest.MF from the maven-bundle-plugin Plugin? The new one generates new syntax that can't be read by ServiceMix

Posted by Peter Kriens <pe...@aqute.biz>.
> What does open-bracket X dot Y comma Z close-paren actually mean?
This is the standard syntax for specifying a range of versions. Bracket means inclusive and parenthesis means exclusive. So [2.1,3) means at least version 2.1.0 and at most version 3.0.0. The old bnd just import 2.1 or any later version. This means you can never make breaking changes so we decided to change it into a proper range. Any OSGi framework must understand this so it surprises me that there is a problem.  So I am actually puzzled about your mail. If there is an import problem it is reported at resolve time, long before you get a Class Not Found exception. So what is the error? 

	1) a deploy error which would indicate a syntax error (not likely), 
	2) a resolve error which would indicate a missing dependency, or 
	3) a runtime Class Not Found Exception?

Only 2 can be related to the range syntax because exports do not match imports. So I am actually figuring that you have a very different problem ... It is kind of surprising that you have version 2 and version 3 Spring frameworks in your imports. It almost seems you're mixing versions of Spring during compile time?

Kind regards,

	Peter Kriens




> Questions:
> 1. Is there a way to force the plugin to use the older version="X.Y" syntax?
-version-policy=${version;==}

> 2. Is there a way to specify a version of the plug into generate the older
> syntax?
-version-policy=${version;==}

> 3. Is there a way to specify an older version of bndlib?
I think you can change the maven plugin dependency but I would have no idea how to do that


> I have bndlib 0.0.357 in my repository but the install insists on picking up
> version 1.15.0 instead.

On 4 jun 2011, at 02:24, Richard Katz wrote:

> I am having a problem where the org.apache.felix  maven-bundle-plugin which
> generates version syntax that is not compatible with the Apache ServiceMix
> OSGI container.   It won't deploy.
> 
> 
> 
> A previous version of the plug-in generated the version syntax as "X.Y" in
> MANIFEST.MF
> 
> 
> Import-Package: edu.berkeley.ist.sws.common.dbcp;resolution:=optional,
> edu.berkeley.sws.common.domain;resolution:=optional,edu.berkeley.sws.
> coursebf;resolution:=optional,edu.berkeley.sws.coursebf.domain;resolu
> tion:=optional,javax.sql;resolution:=optional,javax.xml.bind.annotati
> on;resolution:=optional,org.apache.commons.lang.builder;resolution:=o
> ptional;version="2.4",org.springframework.beans.factory;resolution:=o
> ptional;version="2.5",org.springframework.beans.factory.config;resolu
> tion:=optional;version="2.5",org.springframework.jdbc.core;resolution
> :=optional;version="3.0"
> 
> A new version of the plug-in generates the version syntax "[X.Y,Z)" in
> MANIFEST.MF
> 
> Import-Package: edu.berkeley.ist.sws.common.dbcp;resolution:=optional,
> edu.berkeley.sws.common.domain;resolution:=optional,edu.berkeley.sws.
> coursebf.domain;resolution:=optional,javax.sql;resolution:=optional,j
> avax.xml.bind.annotation;resolution:=optional,org.apache.commons.lang
> .builder;resolution:=optional;version="[2.4,3)",org.springframework.b
> eans.factory;resolution:=optional;version="[2.5,3)",org.springframewo
> rk.beans.factory.config;resolution:=optional;version="[2.5,3)",org.sp
> ringframework.jdbc.core;resolution:=optional;version="[3.0,4)"
> 
> This syntax can not be read by Apache ServiceMix 4.3 and the jar will not
> deploy successfully.  Instead it gets a class not found because one of the
> packages is not successfully exported or imported.
> 
> What does open-bracket X dot Y comma Z close-paren actually mean?
> 
> Questions:
> 1. Is there a way to force the plugin to use the older version="X.Y" syntax?
> 2. Is there a way to specify a version of the plug into generate the older
> syntax?
> 3. Is there a way to specify an older version of bndlib?
> I have bndlib 0.0.357 in my repository but the install insists on picking up
> version 1.15.0 instead.
> 
> If there is another forum I should try also, let me know.
> 
> We are deploying into apache-servicemix-4.3.0-fuse-03-00
> I have also tried apache-servicemix-4.3.1-fuse-01-09
> and apache-servicemix-4.3.0
> 
> 
> Thanks!
> 
> Regards,
> 
> Richard Katz


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org