Configure SSL in blueprint for CXF - https

I have an existing application deployed to Apache Karaf OSGi container.
The application bundles implement SOAP and REST web services using Apache CXF, configured by blueprint.xml files that look like this:
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.2.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.2.0 http://aries.apache.org/schemas/blueprint-ext/blueprint-ext.xsd">
<jaxws:endpoint id="bundle1-server" implementor="com.myapp.Bundle1ServiceImpl" endpointName="s:Bundle1Port"
serviceName="s:Bundle1Service" address="http://0.0.0.0:9080/SoapContext/Bundle1Port" wsdlLocation="wsdl/Bundle1Service.wsdl" xmlns:s="http://com.myapp/services/bundle1service">
</jaxws:endpoint>
</blueprint>
When the endpoint starts, I can see this in the log:
INFO | org.apache.cxf.endpoint.ServerImpl | | org.apache.cxf.endpoint.ServerImpl - initDestination - 85 | 109 - org.apache.cxf.cxf-core - 3.1.9 | Setting the server's publish address to be http://0.0.0.0:9080/SoapContext/Bundle1Port
INFO  | org.eclipse.jetty.server.ServerConnector |  | org.eclipse.jetty.server.AbstractConnector - doStart -  266 | 204 - org.eclipse.jetty.util - 9.2.15.v20160210 | Started ServerConnector#30394ac6{HTTP/1.1}{0.0.0.0:9080}
The CXF uses Jetty to receive the incoming HTTP requests (there is a cxf-rt-transports-http-jetty dependency in the pom.xml).
I want to switch the web services from http to https.
When I change the port number in the blueprint.xml, the web service is indeed reachable at the new port.
However, changing the URL scheme from http to https (http://:9080 to https://:9443) results in an error:
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to initialize bean bundle1-server
...
Caused by: java.io.IOException: Protocol mismatch for port 9443: engine's protocol is http, the url protocol is https
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.createJettyHTTPServerEngine(JettyHTTPServerEngineFactory.java:277)
Obviously, I also need to specify the server certificate and the CA certificate. I have tried to add the following:
<httpj:engine-factory bus="cxf">
<httpj:engine port="9443">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="changeit">
<sec:keyStore type="JKS" password="changeit"
file="/path-to-certificates/keystore.ks"/>
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore type="JKS" password="password"
file="/path-to-certificates/truststore.ks"/>
</sec:trustManagers>
<sec:clientAuthentication want="false" required="false"/>
</httpj:tlsServerParameters>
</httpj:engine>
</httpj:engine-factory>
But now I get:
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to load class org.eclipse.jetty.server.Connector from recipe MapRecipe[name='#recipe-85']
...
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.Connector not found by Bundle1 [255]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)[org.apache.felix.framework-5.4.0.jar:]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)[:1.8.0_262]
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1925)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:978)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.loadClass(BlueprintContainerImpl.java:467)[13:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.BlueprintRepository.loadClass(BlueprintRepository.java:419)[13:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.container.GenericType.parse(GenericType.java:135)[13:org.apache.aries.blueprint.core:1.6.1]
at org.apache.aries.blueprint.di.AbstractRecipe.doLoadType(AbstractRecipe.java:168)[13:org.apache.aries.blueprint.core:1.6.1]
What am I missing here?
Update: I also tried to configure SSL globally for the whole Karaf server by editing etc/org.ops4j.pax.web.cfg to include
org.osgi.service.http.secure.enabled=true
org.ops4j.pax.web.ssl.keystore=/path-to-keystore.ks
org.ops4j.pax.web.ssl.password=changeit
org.ops4j.pax.web.ssl.keypassword=changeit
org.osgi.service.http.port.secure=8443
Then I can see in the logs
INFO | org.ops4j.pax.web.service.jetty.internal.JettyServerImpl | | org.ops4j.pax.web.service.jetty.internal.JettyServerImpl - addConnector - 226 | 222 - org.ops4j.pax.web.pax-web-jetty - 4.2.6 | Pax Web available at [0.0.0.0]:[8443]
INFO | org.eclipse.jetty.server.ServerConnector | | org.eclipse.jetty.server.AbstractConnector - doStart - 266 | 204 - org.eclipse.jetty.util - 9.2.15.v20160210 | Started secureDefault#3bae4ef2{SSL-http/1.1}{0.0.0.0:8443}
..
Caused by: java.io.IOException: Protocol mismatch for port 8443: engine's protocol is http, the url protocol is https
Which is really confusing...

I have fixed the ClassNotFoundException by adding org.eclipse.jetty.server to Import-Package in META-INF/MANIFEST.MF
However, I have read this: "I strongly discourage people from configuring the jetty servers in their blueprint files" http://servicemix.396122.n5.nabble.com/servicemix-5-4-0-cxf-jetty-blueprint-issue-td5722268.html
So maybe I should still try to fix the latter (global) config if possible.

Related

Karaf OSGI Bundles Closing on Startup

I am having issues with karaf/osgi and when i try to start karaf some of my features loop through starting and closing. Here is a log example:
2017-09-05 15:46:03,344 | INFO | rint Extender: 1 | L3vpnProvider | 224 - l3vpn-feature-impl - 0.1.0.SNAPSHOT | L3vpnProvider Session Initiated
2017-09-05 15:46:03,346 | INFO | rint Extender: 2 | L3vpnDataChangeListenerSR | 171 - org.temp.l3vpn-impl - 0.1.0.SNAPSHOT | Service Request Data Listener created
2017-09-05 15:46:03,349 | INFO | ntAdminThread #7 | BlueprintBundleTracker | 144 - org.opendaylight.controller.blueprint - 0.5.3.Boron-SR3 | Blueprint container for bundle org.temp.l3vpn-feature-impl_0.1.0.SNAPSHOT [224] was successfully created
2017-09-05 15:46:03,353 | INFO | Thread-193 | L3vpnProvider | 224 -l3vpn-feature-impl - 0.1.0.SNAPSHOT | L3vpnProvider Closed
And it literally loops and does not stop. The only solution i've found is constant rebuilding until it starts without complications.
Here is the feature in the feature.xml file to show you how its setup.
<feature name='odl-l3vpn-feature-impl' version='${project.version}' description='OpenDaylight :: l3vpn :: Network Model :: Impl'>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
<feature version='${project.version}'>odl-l3vpn-network-model</feature>
<feature version='${project.version}'>odl-l3vpn</feature>
<bundle>mvn:org.temp/l3vpn-nc-impl/{{VERSION}}</bundle>
<lots of other bundles being wrapped>
</feature>
There is an additional feature but it has a very similiar structure so i will not put that up unless it is needed.
I am just a loss for what could be causing this to occur. Are there any ideas?
What i've already tried to do is make the odl-mdsal-broker have a prerequisite or dependency element set as true to make sure there wasn't problems starting the bundle too early but there was no luck with that. Any help would be appreciated.
For anyone that may be having the same issue. This was because of a startup error where both features in the blueprint xml had the same config file, so on startup they were getting confused which caused a loop of booting. After renaming one of the config files and updating that in the blueprint.xml this solved the issue.

STS / Grails, Error initializing resources: The alias mapping '/plugins/famfamfam-1.0.1

I am working with my colleagues on our first Grails web app project. From the begining I am struggling with some strange issue. I am using Spring Tool Suite, Java JDK 1.7.0_45 and grails 2.2.4.
I simply import existing project to STS and then Run-As -> Grails Command (run-app) and I got this error instead of working app(my colleagues doesnt have this error but use the same existing project):
| Loading Grails 2.2.4
| Configuring classpath.
| Environment set to development.....
| Packaging Grails application.....
| Running Grails application
| Error 2013-11-18 12:03:39,505 [localhost-startStop-1] ERROR core.StandardContext - Error initializing resources: The alias mapping '/plugins/famfamfam-1.0.1=C:\Users\Sebastian\(some path)\ProjectName\target\plugins\famfamfam-1.0.1\.\web-app' is not valid
| Error 2013-11-18 12:03:39,585 [localhost-startStop-1] ERROR core.StandardContext - Error getConfigured
| Error 2013-11-18 12:03:39,586 [localhost-startStop-1] ERROR core.StandardContext - Context [/ProjectName] startup failed due to previous errors
| Server running. Browse to http://localhost:8080/ProjectName
Looking forward for any help!

NO JSP Support for /, did not find

I'm using sonar 3.4.1, I've done jdbc configuration on sonar.properties, but when I want to start the server, I'm having this error :
| 2013-10-07 15:30:24.061:INFO::Logging to org.sonar.application.FilteredLogger#4ee1d5ea via org.sonar.application.FilteredLogger
| 2013-10-07 15:30:24.146:INFO::jetty-6.1.25
| 2013-10-07 15:30:24.448:INFO::NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
| JRuby limited openssl loaded. http://jruby.org/openssl
| gem install jruby-openssl for full support.
| 2013-10-07 15:30:45.912:INFO::Started SelectChannelConnector#0.0.0.0:9000
In the sonar log i have this exception :
2013.10.07 14:21:23 ERROR o.s.c.p.Database Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429) ~[commons-dbcp-1.3.jar:1.3]
at

Sonar starts w/o errors, but I can't access it via web browser

I've installed Sonar on an Ubuntu host using 'apt-get install sonar'. Since this is just a demo instance of Sonar for me to play with, I'm using the embedded H2 database.
Sonar seems to start up fine, and I don't have any errors or warnings in my sonar.log. However, when I try to hit it through my web browser, I get the ol' "Oops! Google Chrome could not connect to... blahblahblah".
The host is actually an EC2 instance - not sure if that makes a difference. It has the private IP assigned by Amazon, a URL (ie, ec2-xx-xx...amazonaws.com), and a vanity URL so I don't have to remember that monstrous underlying URL.
Right now, Sonar's properties looks like this. (I've intentionally X'd out the IP address where-ever it appears.)
sonar.web.host: 10.xxx.xx.xxx
sonar.web.port: 9000
sonar.web.context: /
...
sonar.jdbc.url: jdbc:h2:tcp://10.xxx.xx.xxx:9092/sonar
sonar.jdbc.driverClassName: org.h2.Driver
sonar.embeddedDatabase.port: 9092
And I'm unable to access it by pointing my browser to ${monstrous_URL}:9000 or ${vanity URL}:9000. I've also tried setting sonar.web.host to 0.0.0.0, and to ${monstrous_URL} - both to no avail, sadly.
For reference, this is what my sonar.log looks like:
STATUS | wrapper | 2013/03/13 20:21:42 | --> Wrapper Started as Daemon
STATUS | wrapper | 2013/03/13 20:21:43 | Launching a JVM...
INFO | jvm 1 | 2013/03/13 20:21:43 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2013/03/13 20:21:43 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2013/03/13 20:21:43 |
INFO | jvm 1 | 2013/03/13 20:21:43 | 2013-03-13 20:21:43.422:INFO::Logging to org.sonar.application.FilteredLogger#7dc6a657 via org.sonar.application.FilteredLogger
INFO | jvm 1 | 2013/03/13 20:21:43 | 2013-03-13 20:21:43.484:INFO::jetty-6.1.25
INFO | jvm 1 | 2013/03/13 20:21:43 | 2013-03-13 20:21:43.756:INFO::NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
2013.03.13 20:21:44 INFO o.s.s.p.ServerImpl Sonar Server / 3.4.1 / 2f6a7f38e57ec8e9a7bedc81b3260ae735d2a8c8
2013.03.13 20:21:45 INFO o.s.s.d.EmbeddedDatabase Starting embedded database on port 9092 with url jdbc:h2:tcp://10.xxx.xx.xxx:9092/sonar
2013.03.13 20:21:45 INFO o.s.s.d.EmbeddedDatabase Embedded database started. Data stored in: /opt/sonar/data
2013.03.13 20:21:45 WARN o.s.c.p.DefaultDatabase H2 database should be used for evaluation purpose only
2013.03.13 20:21:45 INFO o.s.c.p.Database Create JDBC datasource for jdbc:h2:tcp://10.xxx.xx.xxx:9092/sonar
2013.03.13 20:21:47 INFO o.s.s.p.DefaultServerFileSystem Sonar home: /opt/sonar
2013.03.13 20:21:47 INFO o.s.s.p.DefaultServerFileSystem Deploy dir: /opt/sonar/war/sonar-server/deploy
2013.03.13 20:21:47 INFO org.sonar.INFO Install plugins...
2013.03.13 20:21:47 INFO o.s.s.p.PluginDeployer Deploy plugin Findbugs / 1.1 / 4785d335df6bd0e662d636a6fb03d79fbdda8c5a
2013.03.13 20:21:47 INFO o.s.s.p.PluginDeployer Deploy plugin JaCoCo / 1.1 / 4785d335df6bd0e662d636a6fb03d79fbdda8c5a
Does anyone have experience running Sonar on an EC2 instance, or have any tips for me? I'm stumped!
And I'm unable to access it by pointing my browser to ${monstrous_URL}:9000 or ${vanity URL}:9000.
Change the security group attached to the EC2 instance to allow incoming connections to TCP port 9000.
change H2 database to mysql with following enteries as
sonar.
jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
sonar.jdbc.driverClassName= com.mysql.jdbc.Driver
sonar.jdbc.validationQuery= select 1
and also make following changes in sonar.properties :
sonar.web.host: 0.0.0.0
sonar.web.context: /sonar

Deploying WAR to Fuse ESB get 'FileNotFoundException: URL [bundle://248.0:1/com/bookstore/app/]'

Any help would be gratefully received...
Maven Spring Roo project, JPA2 combined with CXF archetype simple Web Service application.
After deploying to Fuse (Servicemix 4.4.1) as a WAR (Fuse converts this into a bundle), when activating (osgi:start nnn) get the following error..
java.io.FileNotFoundException: URL [bundle://248.0:1/com/bookstore/app/] cannot be resolved to absolute file path because it does not reside in the file system: bundle://248.0:1/com/bookstore/app/
Seems to be when Springs component scan starts..
app-context.xml contains
<context:component-scan base-package="com.bookstore.app" />
Apologies for the extended stack trace, but thought it may prove useful...
21:28:07,365 | INFO | l Console Thread | XmlBeanDefinitionReader | 248 - mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war - 0.0.0 | Loading XML bean definitions from class path resource [META-INF/spring/app-context.xml]
21:28:07,457 | WARN | l Console Thread | hMatchingResourcePatternResolver | 248 - mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war - 0.0.0 | Cannot search for matching files underneath URL [bundle://248.0:1/com/bookstore/app/] because it does not correspond to a directory in the file system
java.io.FileNotFoundException: URL [bundle://248.0:1/com/bookstore/app/] cannot be resolved to absolute file path because it does not reside in the file system: bundle://248.0:1/com/bookstore/app/
at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:204)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:52)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.core.io.UrlResource.getFile(UrlResource.java:168)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(PathMatchingResourcePatternResolver.java:528)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.web.context.support.ServletContextResourcePatternResolver.doFindPathMatchingFileResources(ServletContextResourcePatternResolver.java:92)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:349)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:267)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1227)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:204)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:204)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:186)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:147)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)[248:mvn_com.bookstore_bookstore-ws_1.0-SNAPSHOT_war:0]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext$1.call(HttpServiceContext.java:168)[160:org.ops4j.pax.web.pax-web-jetty:1.0.3]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext$1.call(HttpServiceContext.java:164)[160:org.ops4j.pax.web.pax-web-jetty:1.0.3]
at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60)[160:org.ops4j.pax.web.pax-web-jetty:1.0.3]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.addEventListener(HttpServiceContext.java:161)[160:org.ops4j.pax.web.pax-web-jetty:1.0.3]
at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addEventListener(JettyServerImpl.java:235)[160:org.ops4j.pax.web.pax-web-jetty:1.0.3]
at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addEventListener(ServerControllerImpl.java:276)[160:org.ops4j.pax.web.pax-web-jetty:1.0.3]
at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addEventListener(ServerControllerImpl.java:127)[160:org.ops4j.pax.web.pax-web-jetty:1.0.3]
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerEventListener(HttpServiceStarted.java:286)[158:org.ops4j.pax.web.pax-web-runtime:1.0.3]
at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerEventListener(HttpServiceProxy.java:133)[158:org.ops4j.pax.web.pax-web-runtime:1.0.3]
at org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit(RegisterWebAppVisitorWC.java:276)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:561)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.register(WebAppPublisher.java:170)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:155)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:119)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.tracker.ReplaceableService.setService(ReplaceableService.java:114)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.tracker.ReplaceableService.access$100(ReplaceableService.java:28)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.tracker.ReplaceableService$CollectionListener.serviceAdded(ReplaceableService.java:183)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.tracker.ServiceCollection$Tracker.addingService(ServiceCollection.java:181)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)[karaf.jar:2.2.2-fuse-04-06]
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)[karaf.jar:2.2.2-fuse-04-06]
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184)[karaf.jar:2.2.2-fuse-04-06]
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:339)[karaf.jar:2.2.2-fuse-04-06]
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:273)[karaf.jar:2.2.2-fuse-04-06]
at org.ops4j.pax.swissbox.tracker.ServiceCollection.onStart(ServiceCollection.java:139)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle$Stopped.start(AbstractLifecycle.java:121)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle.start(AbstractLifecycle.java:49)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.tracker.ReplaceableService.onStart(ReplaceableService.java:146)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle$Stopped.start(AbstractLifecycle.java:121)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle.start(AbstractLifecycle.java:49)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAppPublisher.java:81)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.web.extender.war.internal.WebXmlObserver.doPublish(WebXmlObserver.java:304)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.web.extender.war.internal.WebXmlObserver.addingEntries(WebXmlObserver.java:153)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.extender.BundleWatcher.register(BundleWatcher.java:186)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.extender.BundleWatcher.access$000(BundleWatcher.java:45)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.ops4j.pax.swissbox.extender.BundleWatcher$1.bundleChanged(BundleWatcher.java:127)[163:org.ops4j.pax.web.pax-web-extender-war:1.0.3]
at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:795)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]
at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:717)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]
at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:597)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3781)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]
at org.apache.felix.framework.Felix.startBundle(Felix.java:1792)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:914)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]
at org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:29)[19:org.apache.karaf.shell.osgi:2.2.2.fuse-04-06]
at org.apache.karaf.shell.osgi.BundlesCommand.doExecute(BundlesCommand.java:37)[19:org.apache.karaf.shell.osgi:2.2.2.fuse-04-06]
at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]
at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]
at org.apache.karaf.shell.console.jline.Console.run(Console.java:240)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]
at java.lang.Thread.run(Thread.java:680)[:1.6.0_29]
Long shot - but it looks like some Spring is trying to scan for the bundle cache but has got confused as to the bundle's original location.
In your Fuse configuration, try switching from Felix to Equinox, in Karaf it's in etc/config.properties and the property is karaf.framework - should be virtually the same in Fuse ESB.
Have a look at this page,
https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+War+-+Examples
<context:component-scan base-package="*" /> is currently not supported by OSGI environment. Make sure that you make use of <context:annotation-config /> and define all your components as beans in your application context.

Resources