You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Pablo Gomez <pa...@faw.jku.at> on 2016/03/02 10:19:56 UTC

Namespacehandler

Hi All,

        I'm contacting you again for the following issue while using 
apache cxf, while booting in an osgi-equinox container, no karaf. It 
usually happens the following exception

java.lang.NoClassDefFoundError: org/apache/aries/blueprint/NamespaceHandler
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(Unknown Source)
     at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
     at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
     at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
     at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
     at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
     at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
     at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at 
org.apache.cxf.jaxrs.client.blueprint.Activator$1.createNamespaceHandler(Activator.java:37)
     at 
org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer.register(NamespaceHandlerRegisterer.java:39)
     at 
org.apache.cxf.jaxrs.client.blueprint.Activator.start(Activator.java:40)
     at 
org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
     at 
org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
     at java.security.AccessController.doPrivileged(Native Method)
     at 
org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
     at 
org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
     at 
org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
     at 
org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
     at org.eclipse.osgi.container.Module.doStart(Module.java:571)
     at org.eclipse.osgi.container.Module.start(Module.java:439)
     at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
     at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
     at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
     at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
     at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
     at 
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
     at 
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.ClassNotFoundException: 
org.apache.aries.blueprint.NamespaceHandler cannot be found by 
org.apache.cxf.cxf-rt-rs-client_3.1.1
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
     at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     ... 33 more
and in the other cxf libraries the same
java.lang.NoClassDefFoundError: org/apache/aries/blueprint/NamespaceHandler
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(Unknown Source)
     at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
     at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
     at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
     at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
     at 
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
     at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
     at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at 
org.apache.cxf.bus.osgi.CXFActivator$1.createNamespaceHandler(CXFActivator.java:79)
     at 
org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer.register(NamespaceHandlerRegisterer.java:39)
     at org.apache.cxf.bus.osgi.CXFActivator.start(CXFActivator.java:82)
     at 
org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
     at 
org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
     at java.security.AccessController.doPrivileged(Native Method)
     at 
org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
     at 
org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
     at 
org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
     at 
org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
     at org.eclipse.osgi.container.Module.doStart(Module.java:571)
     at org.eclipse.osgi.container.Module.start(Module.java:439)
     at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
     at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
     at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
     at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
     at 
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
     at 
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
     at 
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.ClassNotFoundException: 
org.apache.aries.blueprint.NamespaceHandler cannot be found by 
org.apache.cxf.cxf-core_3.1.1
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
     at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
     at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     ... 33 more



Sometimes it works and no exceptions at all and then may be after 
cleaning workspace or updating the eclipse target platform, it starts to 
happen again. I can't see what might be the reason as blueprint is active

    ID|State      |Level|Name
     2|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
    24|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
    25|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
    35|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
    37|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
    43|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
    54|Active     |    2|Aries JPA Container blueprint integration for 
Aries blueprint (1.0.4)|1.0.4
    57|Active     |    2|Apache Aries Whiteboard support for JMX 
DynamicMBean services (1.1.5)|1.1.5
    58|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
    62|Active     |    2|Apache Aries Blueprint API (1.0.1)|1.0.1
    63|Active     |    2|Apache Aries Blueprint Annotation API (1.0.1)|1.0.1
    71|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
    72|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
    78|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
    79|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
    85|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes 
(1.0.0)|1.0.0
    86|Resolved   |    4|Apache Aries Blueprint Core Compatiblity 
Fragment Bundle (1.0.0)|1.0.0
    93|Active     |    2|Apache Aries Blueprint Annotation Impl 
(1.0.1)|1.0.1
    94|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
   100|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
   109|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
   119|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
   128|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
   137|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle 
(1.0.8)|1.0.8
   148|Active     |    2|Aries JPA Container Managed Contexts (1.0.4)|1.0.4
   154|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
   162|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1


In the past I've tried a pom first approach and deploying to Karaf by 
using the dosgi cxf default karaf feature. There I've never seen that 
exception. However that's unfortunately not a solution for us. So now my 
question is what can lead apache cxf to complain about blueprint 
namespace handlers.


This is the list of cxf bundles I have running:

START LEVEL 6
    ID|State      |Level|Name
     5|Active     |    4|CXF Local Discovery Service Bundle (1.7.0)|1.7.0
     7|Active     |    4|Apache CXF Runtime Management (3.1.1)|3.1.1
    12|Active     |    4|Apache CXF Runtime JAX-RS Frontend (3.1.1)|3.1.1
    22|Active     |    4|CXF DOSGi ZooKeeper-based Discovery Service 
Bundle (1.7.0)|1.7.0
    40|Active     |    4|Apache CXF Runtime Core for WSDL (3.1.1)|3.1.1
    41|Active     |    4|CXF DOSGi ZooKeeper Server Control Bundle 
(1.7.0)|1.7.0
    42|Active     |    4|CXF dOSGi Remote Service Admin Implementation 
(1.7.0)|1.7.0
    64|Active     |    4|Apache CXF Runtime HTTP Transport (3.1.1)|3.1.1
    68|Active     |    4|Apache CXF Runtime SOAP Binding (3.1.1)|3.1.1
    70|Active     |    4|Apache CXF JAX-RS Extensions: Search (3.1.1)|3.1.1
    84|Active     |    4|Apache CXF Runtime HTTP Jetty Transport 
(3.1.1)|3.1.1
    91|Active     |    4|Apache CXF Runtime JAXB DataBinding (3.1.1)|3.1.1
   101|Active     |    4|CXF dOSGi Required OSGi Compendium APIs 
(1.7.0)|1.7.0
   114|Active     |    4|Apache CXF JAX-RS Client (3.1.1)|3.1.1
   124|Active     |    4|Apache CXF Core (3.1.1)|3.1.1
   129|Active     |    4|Apache CXF Runtime Aegis Databinding (3.1.1)|3.1.1
   142|Active     |    4|Apache CXF Runtime XML Binding (3.1.1)|3.1.1
   156|Active     |    4|Apache CXF Runtime JAX-WS Frontend (3.1.1)|3.1.1
   157|Active     |    4|Apache CXF Runtime Simple Frontend (3.1.1)|3.1.1
   158|Active     |    4|Apache CXF JAX-RS Extensions: Providers 
(3.1.1)|3.1.1
   159|Active     |    4|Apache CXF JAX-RS Service Description (3.1.1)|3.1.1
   160|Active     |    4|CXF dOSGi Topology Manager (1.7.0)|1.7.0

And again, there were several times were actually it worked with no 
exception and thats the most confusing part, so might it be a bundle 
start level issue perhaps? or threading?
I'm only having  problems with cxf...

Thanks
regards


-- 
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.

Re: Namespacehandler

Posted by Pablo Gomez <pa...@faw.jku.at>.
autoanswering myself, it comes out that we were using this library: 
org.apache.aries.blueprint.api-1.0.1
that seems to be old, perhaps not used any longer in newer blueprint 
configurations and somehow  was generating these namespace conflicts 
while booting cxf. I've just removed it and everything boots nicely



On 02/03/2016 10:27 AM, Pablo Gomez wrote:
> one thing more I see in the log just before the xception:
>
> WARNING: Aries Blueprint packages not available. So namespaces will 
> not be registered
>
>
> which would explain the exceptions afterwards... blueprint is indeed 
> available, and I've tried to set the bundle-start level of cxf before 
> blueprint bundles but it doesn't seem to help
>
> On 02/03/2016 10:19 AM, Pablo Gomez wrote:
>> Hi All,
>>
>>        I'm contacting you again for the following issue while using 
>> apache cxf, while booting in an osgi-equinox container, no karaf. It 
>> usually happens the following exception
>>
>> java.lang.NoClassDefFoundError: 
>> org/apache/aries/blueprint/NamespaceHandler
>>     at java.lang.ClassLoader.defineClass1(Native Method)
>>     at java.lang.ClassLoader.defineClass(Unknown Source)
>>     at 
>> org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
>>     at 
>> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
>>     at 
>> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
>>     at 
>> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
>>     at 
>> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
>>     at 
>> org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>>     at 
>> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>>     at java.lang.ClassLoader.loadClass(Unknown Source)
>>     at 
>> org.apache.cxf.jaxrs.client.blueprint.Activator$1.createNamespaceHandler(Activator.java:37)
>>     at 
>> org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer.register(NamespaceHandlerRegisterer.java:39)
>>     at 
>> org.apache.cxf.jaxrs.client.blueprint.Activator.start(Activator.java:40)
>>     at 
>> org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
>>     at 
>> org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
>>     at java.security.AccessController.doPrivileged(Native Method)
>>     at 
>> org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
>>     at 
>> org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
>>     at 
>> org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
>>     at 
>> org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
>>     at org.eclipse.osgi.container.Module.doStart(Module.java:571)
>>     at org.eclipse.osgi.container.Module.start(Module.java:439)
>>     at 
>> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
>>     at 
>> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
>>     at 
>> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
>>     at 
>> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
>>     at 
>> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
>>     at 
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>     at 
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
>> Caused by: java.lang.ClassNotFoundException: 
>> org.apache.aries.blueprint.NamespaceHandler cannot be found by 
>> org.apache.cxf.cxf-rt-rs-client_3.1.1
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>>     at 
>> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>>     at java.lang.ClassLoader.loadClass(Unknown Source)
>>     ... 33 more
>> and in the other cxf libraries the same
>> java.lang.NoClassDefFoundError: 
>> org/apache/aries/blueprint/NamespaceHandler
>>     at java.lang.ClassLoader.defineClass1(Native Method)
>>     at java.lang.ClassLoader.defineClass(Unknown Source)
>>     at 
>> org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
>>     at 
>> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
>>     at 
>> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
>>     at 
>> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
>>     at 
>> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
>>     at 
>> org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>>     at 
>> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>>     at java.lang.ClassLoader.loadClass(Unknown Source)
>>     at 
>> org.apache.cxf.bus.osgi.CXFActivator$1.createNamespaceHandler(CXFActivator.java:79)
>>     at 
>> org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer.register(NamespaceHandlerRegisterer.java:39)
>>     at org.apache.cxf.bus.osgi.CXFActivator.start(CXFActivator.java:82)
>>     at 
>> org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
>>     at 
>> org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
>>     at java.security.AccessController.doPrivileged(Native Method)
>>     at 
>> org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
>>     at 
>> org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
>>     at 
>> org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
>>     at 
>> org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
>>     at org.eclipse.osgi.container.Module.doStart(Module.java:571)
>>     at org.eclipse.osgi.container.Module.start(Module.java:439)
>>     at 
>> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
>>     at 
>> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
>>     at 
>> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
>>     at 
>> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
>>     at 
>> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
>>     at 
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>     at 
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
>> Caused by: java.lang.ClassNotFoundException: 
>> org.apache.aries.blueprint.NamespaceHandler cannot be found by 
>> org.apache.cxf.cxf-core_3.1.1
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>>     at 
>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>>     at 
>> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>>     at java.lang.ClassLoader.loadClass(Unknown Source)
>>     ... 33 more
>>
>>
>>
>> Sometimes it works and no exceptions at all and then may be after 
>> cleaning workspace or updating the eclipse target platform, it starts 
>> to happen again. I can't see what might be the reason as blueprint is 
>> active
>>
>>    ID|State      |Level|Name
>>     2|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
>>    24|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
>>    25|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
>>    35|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
>>    37|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
>>    43|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
>>    54|Active     |    2|Aries JPA Container blueprint integration for 
>> Aries blueprint (1.0.4)|1.0.4
>>    57|Active     |    2|Apache Aries Whiteboard support for JMX 
>> DynamicMBean services (1.1.5)|1.1.5
>>    58|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
>>    62|Active     |    2|Apache Aries Blueprint API (1.0.1)|1.0.1
>>    63|Active     |    2|Apache Aries Blueprint Annotation API 
>> (1.0.1)|1.0.1
>>    71|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
>>    72|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
>>    78|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
>>    79|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
>>    85|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes 
>> (1.0.0)|1.0.0
>>    86|Resolved   |    4|Apache Aries Blueprint Core Compatiblity 
>> Fragment Bundle (1.0.0)|1.0.0
>>    93|Active     |    2|Apache Aries Blueprint Annotation Impl 
>> (1.0.1)|1.0.1
>>    94|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
>>   100|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
>>   109|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
>>   119|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
>>   128|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
>>   137|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle 
>> (1.0.8)|1.0.8
>>   148|Active     |    2|Aries JPA Container Managed Contexts 
>> (1.0.4)|1.0.4
>>   154|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
>>   162|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
>>
>>
>> In the past I've tried a pom first approach and deploying to Karaf by 
>> using the dosgi cxf default karaf feature. There I've never seen that 
>> exception. However that's unfortunately not a solution for us. So now 
>> my question is what can lead apache cxf to complain about blueprint 
>> namespace handlers.
>>
>>
>> This is the list of cxf bundles I have running:
>>
>> START LEVEL 6
>>    ID|State      |Level|Name
>>     5|Active     |    4|CXF Local Discovery Service Bundle (1.7.0)|1.7.0
>>     7|Active     |    4|Apache CXF Runtime Management (3.1.1)|3.1.1
>>    12|Active     |    4|Apache CXF Runtime JAX-RS Frontend (3.1.1)|3.1.1
>>    22|Active     |    4|CXF DOSGi ZooKeeper-based Discovery Service 
>> Bundle (1.7.0)|1.7.0
>>    40|Active     |    4|Apache CXF Runtime Core for WSDL (3.1.1)|3.1.1
>>    41|Active     |    4|CXF DOSGi ZooKeeper Server Control Bundle 
>> (1.7.0)|1.7.0
>>    42|Active     |    4|CXF dOSGi Remote Service Admin Implementation 
>> (1.7.0)|1.7.0
>>    64|Active     |    4|Apache CXF Runtime HTTP Transport (3.1.1)|3.1.1
>>    68|Active     |    4|Apache CXF Runtime SOAP Binding (3.1.1)|3.1.1
>>    70|Active     |    4|Apache CXF JAX-RS Extensions: Search 
>> (3.1.1)|3.1.1
>>    84|Active     |    4|Apache CXF Runtime HTTP Jetty Transport 
>> (3.1.1)|3.1.1
>>    91|Active     |    4|Apache CXF Runtime JAXB DataBinding 
>> (3.1.1)|3.1.1
>>   101|Active     |    4|CXF dOSGi Required OSGi Compendium APIs 
>> (1.7.0)|1.7.0
>>   114|Active     |    4|Apache CXF JAX-RS Client (3.1.1)|3.1.1
>>   124|Active     |    4|Apache CXF Core (3.1.1)|3.1.1
>>   129|Active     |    4|Apache CXF Runtime Aegis Databinding 
>> (3.1.1)|3.1.1
>>   142|Active     |    4|Apache CXF Runtime XML Binding (3.1.1)|3.1.1
>>   156|Active     |    4|Apache CXF Runtime JAX-WS Frontend (3.1.1)|3.1.1
>>   157|Active     |    4|Apache CXF Runtime Simple Frontend (3.1.1)|3.1.1
>>   158|Active     |    4|Apache CXF JAX-RS Extensions: Providers 
>> (3.1.1)|3.1.1
>>   159|Active     |    4|Apache CXF JAX-RS Service Description 
>> (3.1.1)|3.1.1
>>   160|Active     |    4|CXF dOSGi Topology Manager (1.7.0)|1.7.0
>>
>> And again, there were several times were actually it worked with no 
>> exception and thats the most confusing part, so might it be a bundle 
>> start level issue perhaps? or threading?
>> I'm only having  problems with cxf...
>>
>> Thanks
>> regards
>>
>

Re: Namespacehandler

Posted by Pablo Gomez <pa...@faw.jku.at>.
one thing more I see in the log just before the xception:

WARNING: Aries Blueprint packages not available. So namespaces will not 
be registered


which would explain the exceptions afterwards... blueprint is indeed 
available, and I've tried to set the bundle-start level of cxf before 
blueprint bundles but it doesn't seem to help

On 02/03/2016 10:19 AM, Pablo Gomez wrote:
> Hi All,
>
>        I'm contacting you again for the following issue while using 
> apache cxf, while booting in an osgi-equinox container, no karaf. It 
> usually happens the following exception
>
> java.lang.NoClassDefFoundError: 
> org/apache/aries/blueprint/NamespaceHandler
>     at java.lang.ClassLoader.defineClass1(Native Method)
>     at java.lang.ClassLoader.defineClass(Unknown Source)
>     at 
> org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
>     at 
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
>     at 
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
>     at 
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
>     at 
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
>     at 
> org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>     at 
> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>     at java.lang.ClassLoader.loadClass(Unknown Source)
>     at 
> org.apache.cxf.jaxrs.client.blueprint.Activator$1.createNamespaceHandler(Activator.java:37)
>     at 
> org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer.register(NamespaceHandlerRegisterer.java:39)
>     at 
> org.apache.cxf.jaxrs.client.blueprint.Activator.start(Activator.java:40)
>     at 
> org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
>     at 
> org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at 
> org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
>     at 
> org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
>     at 
> org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
>     at 
> org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
>     at org.eclipse.osgi.container.Module.doStart(Module.java:571)
>     at org.eclipse.osgi.container.Module.start(Module.java:439)
>     at 
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
>     at 
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
>     at 
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
>     at 
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
>     at 
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
>     at 
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>     at 
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.aries.blueprint.NamespaceHandler cannot be found by 
> org.apache.cxf.cxf-rt-rs-client_3.1.1
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>     at 
> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>     at java.lang.ClassLoader.loadClass(Unknown Source)
>     ... 33 more
> and in the other cxf libraries the same
> java.lang.NoClassDefFoundError: 
> org/apache/aries/blueprint/NamespaceHandler
>     at java.lang.ClassLoader.defineClass1(Native Method)
>     at java.lang.ClassLoader.defineClass(Unknown Source)
>     at 
> org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
>     at 
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
>     at 
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
>     at 
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
>     at 
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
>     at 
> org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>     at 
> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>     at java.lang.ClassLoader.loadClass(Unknown Source)
>     at 
> org.apache.cxf.bus.osgi.CXFActivator$1.createNamespaceHandler(CXFActivator.java:79)
>     at 
> org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer.register(NamespaceHandlerRegisterer.java:39)
>     at org.apache.cxf.bus.osgi.CXFActivator.start(CXFActivator.java:82)
>     at 
> org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
>     at 
> org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at 
> org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
>     at 
> org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
>     at 
> org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
>     at 
> org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
>     at org.eclipse.osgi.container.Module.doStart(Module.java:571)
>     at org.eclipse.osgi.container.Module.start(Module.java:439)
>     at 
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
>     at 
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
>     at 
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
>     at 
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
>     at 
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
>     at 
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>     at 
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.aries.blueprint.NamespaceHandler cannot be found by 
> org.apache.cxf.cxf-core_3.1.1
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>     at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>     at 
> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>     at java.lang.ClassLoader.loadClass(Unknown Source)
>     ... 33 more
>
>
>
> Sometimes it works and no exceptions at all and then may be after 
> cleaning workspace or updating the eclipse target platform, it starts 
> to happen again. I can't see what might be the reason as blueprint is 
> active
>
>    ID|State      |Level|Name
>     2|Active     |    2|Apache Aries JNDI URL Handler (1.1.0)|1.1.0
>    24|Active     |    2|Apache Aries JMX Blueprint API (1.1.5)|1.1.5
>    25|Active     |    2|Apache Aries JNDI Core (1.0.2)|1.0.2
>    35|Active     |    2|Apache Aries JMX Core (1.1.5)|1.1.5
>    37|Active     |    2|Aries JPA Container (1.0.2)|1.0.2
>    43|Active     |    2|Apache Aries JMX API (1.1.5)|1.1.5
>    54|Active     |    2|Aries JPA Container blueprint integration for 
> Aries blueprint (1.0.4)|1.0.4
>    57|Active     |    2|Apache Aries Whiteboard support for JMX 
> DynamicMBean services (1.1.5)|1.1.5
>    58|Active     |    2|Apache Aries Transaction Manager (1.3.0)|1.3.0
>    62|Active     |    2|Apache Aries Blueprint API (1.0.1)|1.0.1
>    63|Active     |    2|Apache Aries Blueprint Annotation API 
> (1.0.1)|1.0.1
>    71|Active     |    2|Apache Aries JNDI RMI Handler (1.0.0)|1.0.0
>    72|Active     |    2|Apache Aries Transaction Blueprint (1.1.1)|1.1.1
>    78|Active     |    2|Aries JPA Container API (1.0.2)|1.0.2
>    79|Active     |    2|Apache Aries Util (1.1.1)|1.1.1
>    85|Active     |    2|Apache Aries JNDI Support for Legacy Runtimes 
> (1.0.0)|1.0.0
>    86|Resolved   |    4|Apache Aries Blueprint Core Compatiblity 
> Fragment Bundle (1.0.0)|1.0.0
>    93|Active     |    2|Apache Aries Blueprint Annotation Impl 
> (1.0.1)|1.0.1
>    94|Active     |    2|Apache Aries Blueprint CM (1.0.7)|1.0.7
>   100|Active     |    2|Apache Aries JNDI API (1.1.0)|1.1.0
>   109|Active     |    2|Apache Aries Transaction Blueprint (2.1.0)|2.1.0
>   119|Active     |    2|Apache Aries Blueprint Core (1.5.0)|1.5.0
>   128|Active     |    2|Apache Aries Proxy Service (1.0.4)|1.0.4
>   137|Active     |    2|Apache Aries SPI Fly Dynamic Weaving Bundle 
> (1.0.8)|1.0.8
>   148|Active     |    2|Aries JPA Container Managed Contexts 
> (1.0.4)|1.0.4
>   154|Active     |    2|Apache Aries JMX Blueprint Core (1.1.5)|1.1.5
>   162|Active     |    2|Apache Aries Proxy API (1.0.1)|1.0.1
>
>
> In the past I've tried a pom first approach and deploying to Karaf by 
> using the dosgi cxf default karaf feature. There I've never seen that 
> exception. However that's unfortunately not a solution for us. So now 
> my question is what can lead apache cxf to complain about blueprint 
> namespace handlers.
>
>
> This is the list of cxf bundles I have running:
>
> START LEVEL 6
>    ID|State      |Level|Name
>     5|Active     |    4|CXF Local Discovery Service Bundle (1.7.0)|1.7.0
>     7|Active     |    4|Apache CXF Runtime Management (3.1.1)|3.1.1
>    12|Active     |    4|Apache CXF Runtime JAX-RS Frontend (3.1.1)|3.1.1
>    22|Active     |    4|CXF DOSGi ZooKeeper-based Discovery Service 
> Bundle (1.7.0)|1.7.0
>    40|Active     |    4|Apache CXF Runtime Core for WSDL (3.1.1)|3.1.1
>    41|Active     |    4|CXF DOSGi ZooKeeper Server Control Bundle 
> (1.7.0)|1.7.0
>    42|Active     |    4|CXF dOSGi Remote Service Admin Implementation 
> (1.7.0)|1.7.0
>    64|Active     |    4|Apache CXF Runtime HTTP Transport (3.1.1)|3.1.1
>    68|Active     |    4|Apache CXF Runtime SOAP Binding (3.1.1)|3.1.1
>    70|Active     |    4|Apache CXF JAX-RS Extensions: Search 
> (3.1.1)|3.1.1
>    84|Active     |    4|Apache CXF Runtime HTTP Jetty Transport 
> (3.1.1)|3.1.1
>    91|Active     |    4|Apache CXF Runtime JAXB DataBinding (3.1.1)|3.1.1
>   101|Active     |    4|CXF dOSGi Required OSGi Compendium APIs 
> (1.7.0)|1.7.0
>   114|Active     |    4|Apache CXF JAX-RS Client (3.1.1)|3.1.1
>   124|Active     |    4|Apache CXF Core (3.1.1)|3.1.1
>   129|Active     |    4|Apache CXF Runtime Aegis Databinding 
> (3.1.1)|3.1.1
>   142|Active     |    4|Apache CXF Runtime XML Binding (3.1.1)|3.1.1
>   156|Active     |    4|Apache CXF Runtime JAX-WS Frontend (3.1.1)|3.1.1
>   157|Active     |    4|Apache CXF Runtime Simple Frontend (3.1.1)|3.1.1
>   158|Active     |    4|Apache CXF JAX-RS Extensions: Providers 
> (3.1.1)|3.1.1
>   159|Active     |    4|Apache CXF JAX-RS Service Description 
> (3.1.1)|3.1.1
>   160|Active     |    4|CXF dOSGi Topology Manager (1.7.0)|1.7.0
>
> And again, there were several times were actually it worked with no 
> exception and thats the most confusing part, so might it be a bundle 
> start level issue perhaps? or threading?
> I'm only having  problems with cxf...
>
> Thanks
> regards
>

-- 
Pablo Gómez Pérez, M.Sc.
Senior Scientist

Johannes Kepler University Linz
Institute for Application Oriented Knowledge Processing
Altenberger Straße 69
4040 Linz, Austria
Phone: +43 732 2468 4193
Fax: +43 732 2468 4200
pablo.gomez_perez@jku.at