[jira] [Created] (DOSGI-271) DOSGi will not start with on Felix using provided config.properties

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] [Created] (DOSGI-271) DOSGi will not start with on Felix using provided config.properties

JIRA jira@apache.org
George McCone created DOSGI-271:
-----------------------------------

             Summary: DOSGi will not start with on Felix using provided config.properties
                 Key: DOSGI-271
                 URL: https://issues.apache.org/jira/browse/DOSGI-271
             Project: CXF Distributed OSGi
          Issue Type: Bug
          Components: common
    Affects Versions: 2.1.0
         Environment: Windows 7 x64
Oracle jre1.8.0_66
Felix 5.6.6
            Reporter: George McCone


Encountered errors starting DOSGi in Felix using the cxf-dosgi-multibundle-distribution download.

Setup using the following steps

# Downloaded the main distribution of Felix 5.6.6
# Copied the dosgi_bundles directory into the felix main directory (same level as the bundle directory).
# Copied the contents out of felix.config.properties.append and appended it to the config.properties file found in the felix conf directory.
# Started Felix using >java -jar bin/felix.jar

The log contained the following errors

*Error 1*

ERROR: Bundle org.apache.cxf.cxf-rt-transports-http-jetty [46] Error starting file:dosgi_bundles/cxf-rt-transports-http-jetty-3.1.7.jar (org.osgi.framework.BundleException: Unable to resolve org.apache.cxf.cxf-rt-transports-http-jetty [46](R 46.0): missing requirement [org.apache.cxf.cxf-rt-transports-http-jetty [46](R 46.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.blueprint.reflect)(version>=1.0.0)(!(version>=2.0.0))) Unresolved requirements: [[org.apache.cxf.cxf-rt-transports-http-jetty [46](R 46.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.blueprint.reflect)(version>=1.0.0)(!(version>=2.0.0)))])
[CM Configuration Updater (ManagedService Update: pid=[org.apache.cxf.osgi])] DEBUG org.ops4j.pax.web.service.internal.ServletEventDispatcher - Sending web event ServletEvent [replay=false, type=1, bundle=org.apache.cxf.cxf-rt-transports-http [32], timestamp=1502287697809, alias=/cxf, servletName=cxf-osgi-transport-servlet, urlParameter=[Ljava.lang.String;@2bde3, servlet=org.apache.cxf.transport.servlet.CXFNonSpringServlet@1cefb22, servletClass=null], httpContext=DefaultHttpContext [bundle=org.apache.cxf.cxf-rt-transports-http [32], contextID=default]] for bundle org.apache.cxf.cxf-rt-transports-http
org.osgi.framework.BundleException: Unable to resolve org.apache.cxf.cxf-rt-transports-http-jetty [46](R 46.0): missing requirement [org.apache.cxf.cxf-rt-transports-http-jetty [46](R 46.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.blueprint.reflect)(version>=1.0.0)(!(version>=2.0.0))) Unresolved requirements: [[org.apache.cxf.cxf-rt-transports-http-jetty [46](R 46.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.blueprint.reflect)(version>=1.0.0)(!(version>=2.0.0)))]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4133)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2118)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1372)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
        at java.lang.Thread.run(Unknown Source)
[FelixDispatchQueue] ERROR org.apache.cxf.cxf-rt-transports-http-jetty - FrameworkEvent ERROR - org.apache.cxf.cxf-rt-transports-http-jetty
org.osgi.framework.BundleException: Unable to resolve org.apache.cxf.cxf-rt-transports-http-jetty [46](R 46.0): missing requirement [org.apache.cxf.cxf-rt-transports-http-jetty [46](R 46.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.blueprint.reflect)(version>=1.0.0)(!(version>=2.0.0))) Unresolved requirements: [[org.apache.cxf.cxf-rt-transports-http-jetty [46](R 46.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.blueprint.reflect)(version>=1.0.0)(!(version>=2.0.0)))]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4133)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2118)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1372)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
        at java.lang.Thread.run(Unknown Source)

*Error 2*

ERROR: Bundle org.apache.aries.rsa.discovery.local [75] Error starting file:dosgi_bundles/org.apache.aries.rsa.discovery.local-1.9.0.jar (org.osgi.framework.BundleException: Activator start error in bundle org.apache.aries.rsa.discovery.local [75].)
[CM Configuration Updater (ManagedService Update: pid=[org.apache.cxf.osgi])] DEBUG org.eclipse.jetty.jmx.ObjectMBean - ObjectMbean: mbeanFor org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@1a205bd mClass=class org.eclipse.jetty.jmx.ObjectMBean
java.lang.RuntimeException: ClassCastException: attempting to cast jar:file:/C:/Program%20Files%20(x86)/Java/jre1.8.0_66/lib/rt.jar!/javax/xml/bind/JAXBContext.class to bundle://29.0:1/javax/xml/bind/JAXBContext.class.  Please make sure that you are specifying the proper ClassLoader.    
[CM Configuration Updater (ManagedService Update: pid=[org.apache.cxf.osgi])] DEBUG org.eclipse.jetty.jmx.ObjectMBean - mbeanFor org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@1a205bd is org.eclipse.jetty.jmx.ObjectMBean@10d90e3
        at org.apache.aries.rsa.discovery.endpoint.EndpointDescriptionParser.<init>(EndpointDescriptionParser.java:49)
        at org.apache.aries.rsa.discovery.local.EndpointDescriptionBundleParser.<init>(EndpointDescriptionBundleParser.java:43)
        at org.apache.aries.rsa.discovery.local.LocalDiscovery.<init>(LocalDiscovery.java:56)
        at org.apache.aries.rsa.discovery.local.Activator.start(Activator.java:32)
        at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
        at org.apache.felix.framework.Felix.activateBundle(Felix.java:2239)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2145)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1372)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
        at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.bind.JAXBException: ClassCastException: attempting to cast jar:file:/C:/Program%20Files%20(x86)/Java/jre1.8.0_66/lib/rt.jar!/javax/xml/bind/JAXBContext.class to bundle://29.0:1/javax/xml/bind/JAXBContext.class.  Please make sure that you are specifying the proper ClassLoader.    
        at javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:107)
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:225)

*Error 3*

ERROR: Bundle org.apache.aries.rsa.eapub [87] Error starting file:dosgi_bundles/org.apache.aries.rsa.eapub-1.9.0.jar (org.osgi.framework.BundleException: Unable to resolve org.apache.aries.rsa.eapub [87](R 87.0): missing requirement [org.apache.aries.rsa.eapub [87](R 87.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.event)(version>=1.3.0)(!(version>=2.0.0))) Unresolved requirements: [[org.apache.aries.rsa.eapub [87](R 87.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.event)(version>=1.3.0)(!(version>=2.0.0)))])
org.osgi.framework.BundleException: Unable to resolve org.apache.aries.rsa.eapub [87](R 87.0): missing requirement [org.apache.aries.rsa.eapub [87](R 87.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.event)(version>=1.3.0)(!(version>=2.0.0))) Unresolved requirements: [[org.apache.aries.rsa.eapub [87](R 87.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.event)(version>=1.3.0)(!(version>=2.0.0)))]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4133)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2118)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1372)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
        at java.lang.Thread.run(Unknown Source)

*Error 4*

ERROR: Bundle org.apache.cxf.dosgi.cxf-dosgi-decorator [89] Error starting file:dosgi_bundles/cxf-dosgi-decorator-2.1.0.jar (org.osgi.framework.BundleException: Activator start error in bundle org.apache.cxf.dosgi.cxf-dosgi-decorator [89].)
java.lang.RuntimeException: Error loading decorations schema
        at org.apache.cxf.dosgi.dsw.decorator.DecorationParser.<init>(DecorationParser.java:54)
        at org.apache.cxf.dosgi.dsw.decorator.ServiceDecoratorImpl.<init>(ServiceDecoratorImpl.java:45)
        at org.apache.cxf.dosgi.dsw.decorator.Activator.start(Activator.java:31)
        at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
        at org.apache.felix.framework.Felix.activateBundle(Felix.java:2239)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2145)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1372)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
        at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.ContextFactory not found
 - with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory not found by org.apache.cxf.dosgi.cxf-dosgi-decorator [89]]
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:166)
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:310)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:446)[FelixDispatchQueue]

*Resolution*
The following steps resolved these errors

*Error 1*
# Downloaded org.apache.aries.blueprint.api-1.0.1.jar and added to dosgi_bundles directory
# Added this plugin to config.properties to start prior to cxf-rt-transports-http.

*Error 2*
Included the already delivered org.apache.servicemix.bundles.jaxb-impl in the config.properties prior to org.apache.aries.rsa.discovery.local

*Error 3*
# Downloaded org.apache.felix.eventadmin-1.3.2.jar and added it to the dosgi_bundles directory
# Added this plugin to the config.properties to start prior to org.apache.felix.configadmin is it seemed like a logical location.

*Error 4*
This error seems to be resolved by the addition of org.apache.servicemix.bundles.jaxb-impl  to resolve error 2.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
Loading...