spring xd Required module artifacts are either missing or invalid - hadoop

I just started with spring xd and wanted to test out a simple hadoop job that I already have with single node config. I mostly followed (http://docs.spring.io/spring-xd/docs/1.2.1.RELEASE/reference/html)
the module jar file that I upload does not contain anything else just this file resources\config\spring-module.xml:
<!-- required since Hadoop Job is a class not an interface and we need to
use a Job with step scope to access #{jobParameters['...']} -->
<bean class="org.springframework.batch.core.scope.StepScope">
<property name="proxyTargetClass" value="true" />
</bean>
<batch:job id="testetl">
<batch:step id="testetl1">
<batch:tasklet ref="testjob" />
</batch:step>
</batch:job>
<hdp:jar-tasklet id="testjob"
jar="/home/hduser/libs/abhishek.jar">
</hdp:jar-tasklet>
On xd shell:
xd:>module upload --type job --name test_job --file /home/hduser/springxd/test-job-module-0.0.1-SNAPSHOT.jar --force
Successfully uploaded module 'job:test_job'
xd:>job create --name test_elt --definition "test_job" --deploy
Successfully created and deployed job 'test_elt'
But on server instance getting below exception and unable to start the job.
I tried bit different xml also but same error.
Not sure what is going wrong?
2015-09-22T21:49:24+0530 1.2.1.RELEASE INFO DeploymentsPathChildrenCache-0 container.DeploymentListener - Deploying module [ModuleDescriptor#1280cb40 moduleName = 'test_job', moduleLabel = 'test_job', group = 'test_elt', sourceChannelName = [null], sinkChannelName = [null], index = 0, type = job, parameters = map[[empty]], children = list[[empty]]]
2015-09-22T21:49:24+0530 1.2.1.RELEASE ERROR DeploymentsPathChildrenCache-0 container.DeploymentListener - **Exception deploying module
java.lang.IllegalArgumentException: Required module artifacts are either missing or invalid. Unable to determine module type for module definition**: 'job:test_job'.
at org.springframework.util.Assert.notNull(Assert.java:112) ~[spring-core-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.xd.module.core.ModuleFactory.createSimpleModule(ModuleFactory.java:122) ~[spring-xd-module-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.xd.module.core.ModuleFactory.createAndConfigureModuleInstance(ModuleFactory.java:98) ~[spring-xd-module-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.xd.module.core.ModuleFactory.createModule(ModuleFactory.java:81) ~[spring-xd-module-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.xd.dirt.module.ModuleDeployer.createModule(ModuleDeployer.java:181) ~[spring-xd-dirt-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.xd.dirt.server.container.DeploymentListener.deployModule(DeploymentListener.java:363) [spring-xd-dirt-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.xd.dirt.server.container.DeploymentListener.deployJobModule(DeploymentListener.java:291) [spring-xd-dirt-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.xd.dirt.server.container.DeploymentListener.onChildAdded(DeploymentListener.java:181) [spring-xd-dirt-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.springframework.xd.dirt.server.container.DeploymentListener.childEvent(DeploymentListener.java:149) [spring-xd-dirt-1.2.1.RELEASE.jar:1.2.1.RELEASE]
at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:509) [curator-recipes-2.6.0.jar:na]

the module jar file that I upload does not contain anything else just this file resources\config\spring-module.xml:
To clarify, in the resulting .jar file, the xml file must be at
config\spring-module.xml
and not at
resources\config\spring-module.xml
(This resources bit is part of the canonical maven location where source files are usually put, as in src/main/resources)
jar tvf your-module.jar should read config/spring-module.xml and not resources/...

Related

SonarCloud: Getting error when running ant and sonar connecting to sonar cloud

We have a setup where we use SonarQube with Ant and connect to SonarCloud (https://sonarcloud.io). This setup was always working from local developer machine and also from bitbucket pipelines. Since two days, we have been getting below error on local and bitbucket pipelines. Below is the stacktrace:
Project.sonar:
[sonar:sonar] Apache Ant(TM) version 1.10.5 compiled on July 10 2018
[sonar:sonar] SonarQube Ant Task version: 2.5
[sonar:sonar] Loaded from: file:<redacted_path>/sonarqube-ant-task-2.5.jar
[sonar:sonar] User cache: /Users/<user>/.sonar/cache
BUILD FAILED
<redacted_path>/build-sonar.xml:120: java.lang.IllegalStateException: not started
at org.sonarsource.scanner.api.EmbeddedScanner.checkLauncherExists(EmbeddedScanner.java:244)
at org.sonarsource.scanner.api.EmbeddedScanner.stop(EmbeddedScanner.java:164)
at org.sonarsource.scanner.ant.SonarQubeTask.launchAnalysis(SonarQubeTask.java:101)
at org.sonarsource.scanner.ant.SonarQubeTask.execute(SonarQubeTask.java:81)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:834)
at org.apache.tools.ant.Main.startAnt(Main.java:223)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Below is the command that we use for running sonar:
ant compile Project.sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=<org_name> -Dsonar.login=<token_which_has_all_privs>
We have tried changing the sonar.login token with a new one (thinking that old might have expired) but it didn't work with new one also.
I am not able to find any help anywhere else regarding this error since it does not say much. I see other errors like "WebApp did not start" but that seems to be related to the use case where SonarQube is running on local. But in our case we are connecting to https://sonarcloud.io host. We have also tried with sonar.login and sonar.password and it still fails.
Any help would be appreciated.
Update 1 for mc1arke question Is this sufficient? I can create a new basic build-sonar.xml and provide it but it will only have below content and some properties/variables specific for our environment.
Extract from build-sonar.xml looks as below:
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<classpath>
<pathelement location="${lib.dir}/sonarqube-ant-task-2.5.jar"/>
</classpath>
</taskdef>
<target name="Project.sonar">
<property name="sonar.projectKey" value="ProjectKey" />
<property name="sonar.projectName" value="ProjectName" />
<property name="sonar.projectVersion" value="1.0" />
<property name="sonar.sources" value="${src.dir}" />
<property name="sonar.binaries" value="${build.dir}" />
<property name="sonar.java.binaries" value="${build.dir}" />
<property name="sonar.java.libraries" value="${lib.dir}/*.jar"/>
<property name="sonar.java.test.libraries" value="${lib.dir}/*.jar"/>
<property name="sonar.java.source" value="1.8" />
<property name="sonar.exclusions" value="<some modules>"/>
<property name="sonar.jacoco.reportPath" value="${junit.reports}/coverage/jacoco.exec"/>
<property name="sonar.junit.reportsPath" value="${junit.reports}" />
<property name="sonar.jacoco.itReportPath" value="${junit.reports}/coverage/jacoco-it.exec"/>
<property name="sonar.coverage.exclusions" value="<some modules>"/>
<sonar:sonar/>
</target>
Update 2: I looked at the sonar code in EmbeddedScanner.java, IsolatedLauncherFactory.java, and IsolatedLauncherProxy.java which actually should be throwing the error. I also ran the ant command in -v mode and below is the output of it:
Project.sonar:
[antlib:org.sonar.ant] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
[sonar:sonar] Apache Ant(TM) version 1.10.5 compiled on July 10 2018
[sonar:sonar] SonarQube Ant Task version: 2.5
[sonar:sonar] Loaded from: file:<redacted_path>/sonarqube-ant-task-2.5.jar
[sonar:sonar] keyStore is :
[sonar:sonar] keyStore type is : jks
[sonar:sonar] keyStore provider is :
[sonar:sonar] init keystore
[sonar:sonar] init keymanager of type SunX509
[sonar:sonar] User cache: /Users/<user.name>/.sonar/cache
[sonar:sonar] Extract sonar-scanner-api-batch in temp...
[sonar:sonar] Get bootstrap index...
[sonar:sonar] Download: https://sonarcloud.io/batch_bootstrap/index
[sonar:sonar] Get bootstrap completed
So looking at the code and its output I think below is the code flow:
EmbeddedScanner.checkLauncherExists() --> IsolatedLauncherFactory.createLauncher() --> JarDownloader.download() --> JarDownloader.getScannerEngineFiles() --> BootstrapIndexDownloader.getIndex()
From the log, it seems that the index was returned successfully. But either the JarDownloader.getScannerEngineFiles() or JarDownloader.download() failed because the log statement logger.debug("Create isolated classloader..."); right after List<File> jarFiles = jarDownloader.download() in IsolatedLauncherFactory.createLauncher() is not printed.
Reference: Sonar source code available here
Your issue is that sonar-ant-plugin does not seem to support SonarCloud. The plugin depends on an old version of sonar-scanner-api which attempts to retrieve a list of Jars to download by retrieving /batch_bootstrap/index from the remote SonarQube server. SonarCloud doesn't provide such a URL, but does have /bootstrap/index which newer versions of sonar-scanner-api do use.
Update: version 2.6.0.1426 of the scanner for Ant has been released to fix the issue.

spring integration ftp inbound adapter in distributed mode

I am using Spring Integration: FTP Inbound Channel Adapter to read files from remote FTP server. My problem is, will it able to handle around 5 millions files per day?
If I deploy my project war on 2 different servers in an distributed mode, then will it problematic? Because on both the servers FTP Inbound Channel Adapter will be running. Then both the adapters will read same file twice.
Please help me setting up this system in distributed mode.
EDIT:
I have set up my Spring Integration project war on 2 servers. It is using FTP Inbound Channel Adapter. Both servers' adapter remote-location is pointing to same ftp file location. When I start both the servers, then both the servers starts transferring same files and generates messages multiple times. I am using Redis MetaData Store as per Gary's suggestion.
My Ftp Inbound Channel Adapter on both the servers looks like this:
<bean id="redisMessageStore" class="org.springframework.integration.redis.store.RedisMessageStore">
<constructor-arg ref="redisConnectionFactory"/>
</bean>
<bean name="metadataStore" class="org.springframework.integration.redis.metadata.RedisMetadataStore">
<constructor-arg name="connectionFactory" ref="redisConnectionFactory"/>
</bean>
<bean id="fileSystemPersistantFilter" class="org.springframework.integration.file.filters.FileSystemPersistentAcceptOnceFileListFilter">
<constructor-arg name="store" ref="metadataStore"/> <constructor-arg name="prefix" value="" />
</bean>
<bean id="ftpPersistantFilter" class="org.springframework.integration.ftp.filters.FtpPersistentAcceptOnceFileListFilter">
<constructor-arg name="store" ref="metadataStore"/> <constructor-arg name="prefix" value="" />
</bean>
<int-ftp:inbound-channel-adapter id="ftpInboundAdapter"
session-factory="ftpClientFactory" channel="ftpChannel"
filter="ftpPersistantFilter"
local-filter="fileSystemPersistantFilter" delete-remote-files="false"
remote-directory="${ftp.remote_directory}/test/" local-directory="${ftp.local_directory}/test/"
temporary-file-suffix=".writing" auto-create-local-directory="true">
<int:poller fixed-rate="1000" max-messages-per-poll="-1" />
</int-ftp:inbound-channel-adapter>
The output log of 1st server is:
19-Feb-2016 10:34:41.634 INFO [task-scheduler-1] org.springframework.integration.file.FileReadingMessageSource.receive Created message: [GenericMessage [payload=/home/harsh/test/test_input_file1.txt, headers={id=1793c207-2d8a-542c-c5a7-eac9165e4cc5, timestamp=1455858281634}]]
19-Feb-2016 10:34:42.886 INFO [task-scheduler-4] org.springframework.integration.file.FileReadingMessageSource.receive Created message: [GenericMessage [payload=/home/harsh/test/test_input_file1.txt, headers={id=c909b6cc-9f78-2f6f-2a27-036f0186b959, timestamp=1455858282886}]]
File /home/harsh/test/test_input_file1.txt transformed by 1st war 1793c207-2d8a-542c-c5a7-eac9165e4cc5
File /home/harsh/test/test_input_file1.txt transformed by 1st war c909b6cc-9f78-2f6f-2a27-036f0186b959
19-Feb-2016 10:34:47.892 INFO [task-scheduler-4] org.springframework.integration.file.FileReadingMessageSource.receive Created message: [GenericMessage [payload=/home/harsh/test/test_input_file1.txt, headers={id=8c5c8941-fbfd-91d8-9a25-75d46e450930, timestamp=1455858287892}]]
19-Feb-2016 10:34:49.325 INFO [task-scheduler-2] org.springframework.integration.file.FileReadingMessageSource.receive Created message: [GenericMessage [payload=/home/harsh/test/test_input_file1.txt, headers={id=dbdddd0f-1ac5-0753-8873-f0f9c77cb48b, timestamp=1455858289325}]]
Service Activator /home/harsh/test/test_input_file1.txt 1st war 24632436-d297-db0c-c9ea-ac596c57a91e
19-Feb-2016 10:34:50.372 INFO [task-scheduler-2] org.springframework.integration.file.FileReadingMessageSource.receive Created message: [GenericMessage [payload=/home/harsh/test/test_input_file1.txt, headers={id=5cc843ae-c1d7-814f-b9fd-a7c5c2515674, timestamp=1455858290372}]]
19-Feb-2016 10:34:51.759 INFO [task-scheduler-2] org.springframework.integration.file.FileReadingMessageSource.receive Created message: [GenericMessage [payload=/home/harsh/test/test_input_file1.txt, headers={id=428ba015-e2f3-6948-fc13-ca0df31ee9c0, timestamp=1455858291759}]]
19-Feb-2016 10:34:53.670 INFO [task-scheduler-2] org.springframework.integration.file.FileReadingMessageSource.receive Created message: [GenericMessage [payload=/home/harsh/test/test_input_file1.txt, headers={id=ac1fca37-838f-39fc-f9ed-cc373f8f8b12, timestamp=1455858293670}]]
19-Feb-2016 10:34:55.648 INFO [task-scheduler-8] org.springframework.integration.file.FileReadingMessageSource.receive Created message: [GenericMessage [payload=/home/harsh/test/test_input_file1.txt, headers={id=f9197ec2-e73a-19be-e94b-94bffe515569, timestamp=1455858295647}]]
File /home/harsh/test/test_input_file1.txt transformed by 1st war 45718961-2a99-d368-d88a-9bc2ceb955cd
The 2nd server is generating the same log with different message ids.
Am I missing something in this?
Do I need to write my custom filter for this??
My problem is, will it able to handle around 5 millions files per day?
That depends on the size of the files and the bandwidth of the network; the use of Spring Integration is unlikely to be a factor.
You should probably remove files locally after processing, though, to avoid large directory scans.
To avoid duplicates in a cluster, you need to use a FtpPersistentAcceptOnceFileListFilter backed by a shared metadata store so that each instance will skip files handled by other instances.
See the documentation for more information.
EDIT:
I just tested with your configuration and see no problems. Are you sure both instances are using the same Redis server?
If you run redis-cli and then monitor, you should see something like:
1459258131.934949 [0 127.0.0.1:55237] "HSETNX" "MetaData" "bar.txt" "1384837200000"
1459258131.935129 [0 127.0.0.1:55237] "HSETNX" "MetaData" "baz.txt" "1384837200000"
1459258131.940125 [0 127.0.0.1:55237] "HSETNX" "MetaData" "/tmp/test/bar.txt" "1459258131000"
1459258131.940353 [0 127.0.0.1:55237] "HSETNX" "MetaData" "/tmp/test/baz.txt" "1459258131000"
In this case, the remote directory had 2 files; the first 2 lines are from the remote filter, the last two are from the local filter (setting the initial values).
You should then see a bunch of
1459258142.073316 [0 127.0.0.1:55237] "HSETNX" "MetaData" "bar.txt" "1384837200000"
1459258142.073506 [0 127.0.0.1:55237] "HGET" "MetaData" "bar.txt"
(once per poll - checking to see if the timestamp changed).

OpenAM with OpenDJ - NameNotFoundException: ldap/idp/userDN - when starting up JBoss

I'm using OpenAM, with its embedded OpenDJ as the LDAP service, to protect my web application running on JBoss 7.
When I start my JBoss I get this error:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapUserDN'
...
Caused by: javax.naming.NameNotFoundException: ldap/idp/userDN -- service jboss.naming.context.java.ldap.idp.userDN
So apparently Spring is looking for the JNDI node ldap/idp/userDN. But the jboss configuration file that I got with the project has these entries:
<simple name="ldap/opendj/url" value="ldap://localhost:50389"/>
<simple name="ldap/opendj/userDN" value="cn=Directory Manager"/>
<simple name="ldap/opendj/password" value="mypassword"/>
<simple name="ldap/opendj/baseDN" value="dc=opensso,dc=java,dc=net"/>
And these properties are added to my JNDI tree on JBoss.
If I change these to "ldap/idp/userDN", for instance, then I get rid of the error, but I was wondering if there's anywhere, where "ldap/opendj/userDN" should be mapped to "ldap/idp/userDN", that I've missed.
If you're using Spring LDAP, the actual configuration of the ldap-context-source goes in the a spring config file, and might look like this:
<jee:jndi-lookup jndi-name="ldap/idp/url" id="ldapUrl"/>
<jee:jndi-lookup jndi-name="ldap/idp/userDN" id="ldapUserDN"/>
<jee:jndi-lookup jndi-name="ldap/idp/password" id="ldapPassword"/>
<jee:jndi-lookup jndi-name="ldap/idp/baseDN" id="ldapBaseDN"/>
<ldap:context-source url="#{ldapUrl}"
username="#{ldapUserDN}"
password="#{ldapPassword}"
base="#{ldapBaseDN}"
native-pooling="true"/>
So the jndi entries in your jboss config file should match the ones above.

event:inbound-channel-adapter with payload-expression not able to resolve bean

I'm attempting to use the event:inbound-channel-adapter as an ApplicationEventListener to capture the ContextRefreshedEvent so I can dynamically start a file:inbound-channel-adapter like:
<file:inbound-channel-adapter id="filesIn" auto-startup="false"
directory="${input.location}" channel="fileInChannel">
<integration:poller ref="filesInPoller" />
</file:inbound-channel-adapter>
<event:inbound-channel-adapter id='appStarter' channel="nullChannel"
error-channel="errorChannel"
event-types="org.springframework.context.event.ContextRefreshedEvent"
payload-expression="#filesIn.start()"/>
But I get the following error indicating the sPel payload-expression cannot find the filesIn bean:
Exception in thread "main" org.springframework.expression.spel.SpelEvaluationException: EL1057E:(pos 1): No bean resolver registered in the context to resolve access to bean 'filesIn'
at org.springframework.expression.spel.ast.BeanReference.getValueInternal(BeanReference.java:45)
at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:49)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:82)
at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:93)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:72)
at org.springframework.integration.event.inbound.ApplicationEventListeningMessageProducer.sendEventAsMessage(ApplicationEventListeningMessageProducer.java:113)
at org.springframework.integration.event.inbound.ApplicationEventListeningMessageProducer.onApplicationEvent(ApplicationEventListeningMessageProducer.java:91)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
Am I correct in believing that the file:inbound-channel-adapter is able to be started in this way?
Thanks
What version of Spring Integration are you using? The ability to reference a bean #filesIn was added to this adapter in 3.0.
If you are using 2.2 or below, upgrade to the current release (or at least 3.0.4).
In any case, you can't just send that command to nullChannel, it will evaluate to null and you can't have a null payload; you'll have to send '#filesIn.start()' to a <control-bus/>.
EDIT:
Or, "#filesIn.start() == null ? 'foo' : 'bar'" will send foo to the nullChannel.

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