Hi Sergey,
I uploaded to CXF 2.7.7, but I'm having problems to install
org.apache.cxf.bundle-minimal. At the end of the email you can find the
stacktrace I receive. It seems like class loader can not find
org.osgi.framework.BundleActivator class, even thought it's exported by the
system bundle (org.apache.felix.framework) :
Export-Package =
org.osgi.framework;version=1.5.0,
...
Inside the org.apache.felix.framework jar, the class exists as well. Taking
a look into the bundle-minimal header, I saw that the problem might be that
this package is not defined inside the "import-package" clause. Could it be
the reason?
Import-Package =
repackage;resolution:=optional,
org.apache.lucene.search;resolution:=optional,
org.apache.lucene.index;resolution:=optional,
org.apache.lucene.document;resolution:=optional,
javax.xml.soap,
javax.activation;version="[0.0,2)",
javax.jms;resolution:=optional;version="[0.0,2)",
javax.annotation;version="[0.0,2)"
Thanks!
Cheers,
Adrián Roselló
StackTrace:
java.lang.Exception: Could not start bundle
mvn:org.apache.cxf/cxf-bundle-minimal/2.7.7 in feature(s)
cxf-minimal-0.24-SNAPSHOT, opennaas-router-driver-opener-0.24-SNAPSHOT:
Activator start error in bundle org.ap
ache.cxf.bundle-minimal [173].
at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:356)
at
org.apache.karaf.features.internal.FeaturesServiceImpl$1.run(FeaturesServiceImpl.java:1024)
Caused by: org.osgi.framework.BundleException: Activator start error in
bundle org.apache.cxf.bundle-minimal [173].
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1951)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1822)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:914)
at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:353)
... 1 more
Caused by: java.lang.NoClassDefFoundError:
org/osgi/framework/BundleActivator
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1947)
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:752)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1807)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:670)
at
org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3808)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1899)
... 5 more
Caused by: java.lang.ClassNotFoundException:
org.osgi.framework.BundleActivator not found by
org.apache.cxf.bundle-minimal [173]
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:812)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1807)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 16 more
2013/10/17 Adrián Roselló Rey <[email protected]>
> Thanks Sergey, will check it right now :)
>
>
> Cheers,
>
> Adrián Roselló
>
>
> 2013/10/17 Sergey Beryozkin <[email protected]>
>
>> Hi
>>
>> I think Dan did some work in CXF 2.7.7 to handle some concurrency issues
>> when two or more Blueprint endpoints are published.
>> Can you please experiment with CXF 2.7.7 (already released) ?
>>
>> Cheers, Sergey
>>
>>
>> On 17/10/13 15:37, Adrián Roselló Rey wrote:
>>
>>> Hi all!
>>>
>>> I have an OSGI application, which publish some services through a
>>> RESTful WS using CXF DOSGI, and using Jetty as the Web server. The
>>> current versions we are using are:
>>>
>>> CXF: 2.7.4
>>> DOSGI: 1.5.0
>>> Jetty: 7.5.4
>>>
>>> To explain our problem I will take two services as example. Service "A"
>>> is successfully published and its interface is exported by DOSGI without
>>> problem. We can remotely access to it by the
>>> URLhttp://myserver/myapp/**serviceA/ and we do publish it via BluePrint.
>>>
>>>
>>> https://github.com/dana-i2cat/**opennaas/blob/master/core/**
>>> resources/src/main/resources/**OSGI-INF/blueprint/core.xml#**L16<https://github.com/dana-i2cat/opennaas/blob/master/core/resources/src/main/resources/OSGI-INF/blueprint/core.xml#L16>
>>>
>>> Service "B" is successfully published as an OSGI service, but we can not
>>> access to the URL http://myserver/myapp/serviceB**. We publish it
>>> manually
>>> from code.
>>>
>>> https://github.com/dana-i2cat/**opennaas/blob/master/core/**
>>> security/src/main/java/org/**opennaas/core/security/acl/**
>>> ACLManager.java#L174<https://github.com/dana-i2cat/opennaas/blob/master/core/security/src/main/java/org/opennaas/core/security/acl/ACLManager.java#L174>
>>>
>>> The strange thing is that, after rebooting our platform, sometimes both
>>> services are published, but sometimes only one of them.
>>>
>>> Does anyone have any idea on what could be happening? We changed CXF
>>> version to 2.7.6, but we noticed the same behaviour. I attached logs of
>>> both services booting process, but they look very similar.
>>>
>>> Thanks a lot!
>>>
>>> Best regards,
>>>
>>> Adrián Roselló
>>>
>>
>>
>>
>