You refer to this code :
https://github.com/apache/karaf/blob/karaf-2.x/itests/src/test/java/org/apache/karaf/itests/SpringFeaturesTest.java
?
Why can't we use anymore the features(URL, feature, ...) option of pax-exam
to setup Karaf before to run each uni test ?

On Thu, Dec 11, 2014 at 6:10 PM, Jean-Baptiste Onofré <j...@nanthrax.net>
wrote:

> Take a look on the Karaf itests: we install all features in itests,
> including spring/spring-dm.
>
> Just one think: spring-dm doesn't work with spring 4.
>
> Regards
> JB
>
> On 12/11/2014 06:08 PM, Charles Moulliard wrote:
>
>> Does that means that the feature has to be installed within the unit
>> test and not anymore when we setup the Karaf container like here -
>> https://github.com/opendaylight/controller/blob/
>> master/itests/base-features-it/src/test/java/org/
>> opendaylight/controller/base/BaseFeatureTest.java
>> with "featuresService.installFeature("") ?
>>
>> On Thu, Dec 11, 2014 at 5:57 PM, Jean-Baptiste Onofré <j...@nanthrax.net
>> <mailto:j...@nanthrax.net>> wrote:
>>
>>     You don't have to install the features repository (it's already in
>>     the Karaf distro).
>>
>>     Regards
>>     JB
>>
>>     On 12/11/2014 05:52 PM, Charles Moulliard wrote:
>>
>>         Hi,
>>
>>         When I try a pax-exam 4.3 test using Karaf 2.4, I get this OSGI
>>         Wiring error
>>
>>         2014-12-11 17:43:04,313 | INFO  | FelixStartLevel  | core
>>                         | 34 - org.apache.aries.jmx.core - 1.1.2 |
>>         Unregistering
>>         MBean with ObjectName
>>         [osgi.compendium:service=cm,__version=1.3,framework=org.__
>> apache.felix.framework,uuid=__ef339918-f755-402a-955d-__93182f61a4d5]
>>         for service with service.id <http://service.id>
>>         <http://service.id> [10]
>>
>>         Exception in thread "Thread-41" java.lang.__NoClassDefFoundError:
>>         org/springframework/osgi/__context/support/__
>> AbstractDelegatedExecutionAppl__icationContext$2
>>         at
>>         org.springframework.osgi.__context.support.__
>> AbstractDelegatedExecutionAppl__icationContext.normalClose(__
>> AbstractDelegatedExecutionAppl__icationContext.java:210)
>>         at
>>         org.springframework.osgi.__context.support.__
>> AbstractDelegatedExecutionAppl__icationContext$__
>> NoDependenciesWaitRefreshExecu__tor.close(__
>> AbstractDelegatedExecutionAppl__icationContext.java:93)
>>         at
>>         org.springframework.osgi.__context.support.__
>> AbstractDelegatedExecutionAppl__icationContext.doClose(__
>> AbstractDelegatedExecutionAppl__icationContext.java:236)
>>         at
>>         org.springframework.context.__support.__
>> AbstractApplicationContext$1.__run(__AbstractApplicationContext.__
>> java:980)
>>         Caused by: java.lang.__ClassNotFoundException: Unable to load
>> class
>>         'org.springframework.osgi.__context.support.__
>> AbstractDelegatedExecutionAppl__icationContext$2'
>>         because the bundle wiring for org.springframework.osgi.core is
>>         no longer
>>         valid.
>>         at
>>         org.apache.felix.framework.__BundleWiringImpl.__
>> findClassOrResourceByDelegatio__n(BundleWiringImpl.java:1521)
>>         at
>>         org.apache.felix.framework.__BundleWiringImpl.access$400(__
>> BundleWiringImpl.java:77)
>>         at
>>         org.apache.felix.framework.__BundleWiringImpl$__
>> BundleClassLoader.loadClass(__BundleWiringImpl.java:1993)
>>         at java.lang.ClassLoader.__loadClass(ClassLoader.java:__358)
>>         ... 4 more
>>
>>         Is this error related to the fact that I try to use Spring &
>>         Spring-DM
>>         features part of the Karaf assembly project ?
>>
>>                           features(
>>
>>         maven().groupId("org.apache.__karaf.assemblies.features").__
>> artifactId("standard").type("__xml").classifier("features").
>> __versionAsInProject(),
>>                                   "spring", "spring-dm"
>>                                   ),
>>
>>         Regards,
>>
>>
>>         --
>>         Charles Moulliard
>>         Apache Committer / Architect @RedHat
>>         Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>>         <http://cmoulliard.github.io>
>>
>>
>>     --
>>     Jean-Baptiste Onofré
>>     jbono...@apache.org <mailto:jbono...@apache.org>
>>     http://blog.nanthrax.net
>>     Talend - http://www.talend.com
>>
>>
>>
>>
>> --
>> Charles Moulliard
>> Apache Committer / Architect @RedHat
>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
>> <http://cmoulliard.github.io>
>>
>>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Reply via email to