Problem
I'm trying to install the camel feature camel-swagger-java 2.22.2 in a karaf 4.2.2 environment.
I added the feature camel-swagger-java to featuresBoot property in the config file etc/org.apache.karaf.features.cfg of karaf because I want that this feature is installed when karaf is up.
When I launch bin/karaf I get this error:
org.apache.karaf.features.internal.util.MultiException: Error:
Error downloading wrap:file:/C:/Users/karaf/.m2/repository/io/swagger/swagger-parser/1.0.36/swagger-parser-1.0.36.jar
Error downloading wrap:file:/C:/Users/karaf/.m2/repository/io/swagger/swagger-parser/1.0.36/swagger-parser-1.0.36.jar
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.(MavenDownloadManager.java:91)
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)
at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:457)
at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:452)
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:224)
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Suppressed: java.io.IOException: Error downloading wrap:file:/C:/Users/karaf/.m2/repository/io/swagger/swagger-parser/1.0.36/swagger-parser-1.0.36.jar
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:77)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
... 3 more
Caused by: java.io.IOException: Could not download [wrap:file:/C:/Users/karaf/.m2/repository/io/swagger/swagger-parser/1.0.36/swagger-parser-1.0.36.jar]
at org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:91)
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
... 7 more
Caused by: java.net.MalformedURLException: Unknown protocol: wrap
at java.net.URL.(URL.java:627)
at java.net.URL.(URL.java:490)
at java.net.URL.(URL.java:439)
at org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:62)
... 8 more
Caused by: java.lang.IllegalStateException: Unknown protocol: wrap
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:373)
at java.net.URL.(URL.java:622)
... 11 more
[CIRCULAR REFERENCE:java.io.IOException: Error downloading wrap:file:/C:/Users/karaf/.m2/repository/io/swagger/swagger-parser/1.0.36/swagger-parser-1.0.36.jar
Code
These are the first lines of my etc/org.apache.karaf.features.cfg
featuresRepositories mvn:org.apache.karaf.features/enterprise/4.2.2/xml/features, mvn:org.apache.karaf.features/spring/4.2.2/xml/features, mvn:org.apache.karaf.features/standard/4.2.2/xml/features, mvn:org.apache.karaf.features/framework/4.2.2/xml/features, mvn:org.apache.camel.karaf/apache-camel/2.22.2/xml/features, mvn:org.apache.karaf.decanter/apache-karaf-decanter/2.1.0/xml/features, mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.3.2/xml/features, mvn:org.apache.servicemix.features/servicemix-features/7.0.1/xml/features
featuresBoot = instance/4.2.2, package/4.2.2, log/4.2.2, ssh/4.2.2, framework/4.2.2, system/4.2.2, eventadmin/4.2.2, feature/4.2.2, shell/4.2.2, management/4.2.2, service/4.2.2, jaas/4.2.2, deployer/4.2.2, diagnostic/4.2.2, wrap/2.5.4, bundle/4.2.2, config/4.2.2, kar/4.2.2, webconsole/4.2.2, jdbc/4.2.2, http/4.2.2, jetty/4.2.2, camel/2.22.2, camel-core/2.22.2, camel-blueprint/2.22.2, camel-spring/2.22.2, camel-jetty/2.22.2, camel-netty/2.22.2, camel-netty-http/2.22.2, camel-netty4/2.22.2, camel-netty4-http/2.22.2, camel-http4/2.22.2, camel-jackson/2.22.2, camel-sql/2.22.2, camel-jdbc/2.22.2, camel-quartz/2.22.2, camel-jacksonxml/2.22.2, camel-swagger-java/2.22.2, decanter-appender-elasticsearch-rest/2.1.0, decanter-collector-log/2.1.0, pax-jdbc-mariadb/1.3.2, pax-jdbc-mysql/1.3.2, pax-jdbc-config/1.3.2
Question
Why I get this error? It's a bug of camel-swagger-java feature or I'm missing something?
Related
Every time I start Android studio I get IDE Fatal errors by a kite.
Exception in plugin Kite AI Code AutoComplete...(1.8.25)
Here is stacktrace.txt :
java.lang.Throwable: Can't remove prefix "pid:"
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:146)
at com.intellij.execution.process.impl.ProcessListUtil.logErrorTestSafe(ProcessListUtil.java:286)
at com.intellij.execution.process.impl.ProcessListUtil.removePrefix(ProcessListUtil.java:333)
at com.intellij.execution.process.impl.ProcessListUtil.parseWinProcessListHelperOutput(ProcessListUtil.java:350)
at com.intellij.execution.process.impl.ProcessListUtil.parseCommandOutput(ProcessListUtil.java:102)
at com.intellij.execution.process.impl.ProcessListUtil.getProcessListUsingWinProcessListHelper(ProcessListUtil.java:278)
at com.intellij.execution.process.impl.ProcessListUtil.doGetProcessList(ProcessListUtil.java:43)
at com.intellij.execution.process.impl.ProcessListUtil.getProcessList(ProcessListUtil.java:35)
at kite.obfuscated.hk.bg(GenericProcessWatcher.java:33)
at kite.obfuscated.gy.bg(KiteDetector.java:61)
at kite.obfuscated.ho.bo(KiteProcessWatcher.java:16)
at kite.obfuscated.ip.k(KiteProjectLifecycleListener.java:1044)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:255)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)```
I am trying to work with solr-cloud and I have to use learning to rank models and features for my project. But I am facing this issue of SolrCore Initialization Failures
techproducts_shard1_replica_n2: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Failed to create new ManagedResource /schema/model-store of type org.apache.solr.ltr.store.rest.ManagedModelStore due to: org.apache.solr.common.SolrException: org.apache.solr.ltr.model.ModelException: Model type does not exist org.apache.solr.ltr.model.LinearModel
techproducts_shard2_replica_n6: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Failed to create new ManagedResource /schema/model-store of type org.apache.solr.ltr.store.rest.ManagedModelStore due to: org.apache.solr.common.SolrException: org.apache.solr.ltr.model.ModelException: Model type does not exist org.apache.solr.ltr.model.LinearModel
Please check your logs for more information
These are the solr logs:-
**2019-12-04 12:44:05.760 ERROR (searcherExecutor-15-thread-1-processing-n:192.168.137.1:8983_solr x:techproducts_shard1_replica_n2 c:techproducts s:shard1 r:core_node5) [c:techproducts s:shard1 r:core_node5 x:techproducts_shard1_replica_n2] o.a.s.h.RequestHandlerBase java.lang.NullPointerException
at org.apache.solr.handler.component.SearchHandler.initComponents(SearchHandler.java:183)
at org.apache.solr.handler.component.SearchHandler.getComponents(SearchHandler.java:203)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:260)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2578)
at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:74)
at org.apache.solr.core.SolrCore.lambda$getSearcher$18(SolrCore.java:2344)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:209)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2019-12-04 12:44:05.760 ERROR (searcherExecutor-14-thread-1-processing-n:192.168.137.1:8983_solr x:techproducts_shard2_replica_n6 c:techproducts s:shard2 r:core_node8) [c:techproducts s:shard2 r:core_node8 x:techproducts_shard2_replica_n6] o.a.s.h.RequestHandlerBase java.lang.NullPointerException
at org.apache.solr.handler.component.SearchHandler.initComponents(SearchHandler.java:183)
at org.apache.solr.handler.component.SearchHandler.getComponents(SearchHandler.java:203)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:260)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2578)
at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:74)
at org.apache.solr.core.SolrCore.lambda$getSearcher$18(SolrCore.java:2344)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:209)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Match the compatibility of Solr version and zookeeper....
For Solr 8.2.0 use zookepeer 3.5.6
fetch of httpurl failed with:
org.apache.nutch.protocol.ProtocolNotFound: protocol not found for
url=http at
org.apache.nutch.protocol.ProtocolFactory.getProtocol(ProtocolFactory.java:85)
at org.apache.nutch.fetcher.FetcherThread.run(FetcherThread.java:285)
Using queue mode : byHost
fetch of httpsurl failed with: org.apache.nutch.protocol.ProtocolNotFound: protocol not found for url=https
at org.apache.nutch.protocol.ProtocolFactory.getProtocol(ProtocolFactory.java:85)
at org.apache.nutch.fetcher.FetcherThread.run(FetcherThread.java:285)
I get above result while running nutch1.13 with solr6.6.0
command i used is
bin/crawl -i -D
solr.server.url=http://myip/solr/nutch/ urls/ crawl 2
below is plugin section in my nutch-site.xml
<name>plugin.includes</name>
<value>
protocol-(http|httpclient)|urlfilter-regex|parse-(html)|index-(basic|anchor)|indexer-solr|query-(basic|site|url)|response-(json|xml)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)
</value>
Below are my file contents
[root#localhost apache-nutch-1.13]# ls plugins
creativecommons index-more nutch-extensionpoints protocol-file scoring-similarity urlnormalizer-ajax
feed index-replace parse-ext protocol-ftp subcollection urlnormalizer-basic
headings index-static parsefilter-naivebayes protocol-htmlunit tld urlnormalizer-host
index-anchor language-identifier parsefilter-regex protocol-http urlfilter-automaton urlnormalizer-pass
index-basic lib-htmlunit parse-html protocol-httpclient urlfilter-domain urlnormalizer-protocol
indexer-cloudsearch lib-http parse-js protocol-interactiveselenium urlfilter-domainblacklist urlnormalizer-querystring
indexer-dummy lib-nekohtml parse-metatags protocol-selenium urlfilter-ignoreexempt urlnormalizer-regex
indexer-elastic lib-regex-filter parse-replace publish-rabbitmq urlfilter-prefix urlnormalizer-slash
indexer-solr lib-selenium parse-swf publish-rabitmq urlfilter-regex
index-geoip lib-xml parse-tika scoring-depth urlfilter-suffix
index-links microformats-reltag parse-zip scoring-link urlfilter-validator
index-metadata mimetype-filter plugin scoring-opic urlmeta
I'm stuck with this issue. As you can see i have included both protocol-(http|httpclient) .But still fetching url failed. Thanks in advance.
NEWER ISSUE hadoop.log
2017-09-01 14:35:07,172 INFO solr.SolrIndexWriter - SolrIndexer:
deleting 1/1 documents 2017-09-01 14:35:07,321 WARN
output.FileOutputCommitter - Output Path is null in cleanupJob()
2017-09-01 14:35:07,323 WARN mapred.LocalJobRunner -
job_local1176811933_0001 java.lang.Exception:
java.lang.IllegalStateException: Connection pool shut down at
org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
at
org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:529)
Caused by: java.lang.IllegalStateException: Connection pool shut down
at org.apache.http.util.Asserts.check(Asserts.java:34) at
org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:169)
at
org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:202)
at
org.apache.http.impl.conn.PoolingClientConnectionManager.requestConnection(PoolingClientConnectionManager.java:184)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at
org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:481)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:240)
at
org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:229)
at
org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149)
at
org.apache.solr.client.solrj.SolrClient.commit(SolrClient.java:482)
at
org.apache.solr.client.solrj.SolrClient.commit(SolrClient.java:463)
at
org.apache.nutch.indexwriter.solr.SolrIndexWriter.commit(SolrIndexWriter.java:191)
at
org.apache.nutch.indexwriter.solr.SolrIndexWriter.close(SolrIndexWriter.java:179)
at org.apache.nutch.indexer.IndexWriters.close(IndexWriters.java:117)
at
org.apache.nutch.indexer.CleaningJob$DeleterReducer.close(CleaningJob.java:122)
at org.apache.hadoop.io.IOUtils.cleanup(IOUtils.java:244) at
org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:459)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:392) at
org.apache.hadoop.mapred.LocalJobRunner$Job$ReduceTaskRunnable.run(LocalJobRunner.java:319)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748) 2017-09-01 14:35:07,679
ERROR indexer.CleaningJob - CleaningJob: java.io.IOException: Job
failed! at
org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:865) at
org.apache.nutch.indexer.CleaningJob.delete(CleaningJob.java:174) at
org.apache.nutch.indexer.CleaningJob.run(CleaningJob.java:197) at
org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at
org.apache.nutch.indexer.CleaningJob.main(CleaningJob.java:208)
I somehow solved the issue. I think the space in nutch-site.xml was causing issue new plugin.includes section for others coming here.
<name>plugin.includes</name>
<value>protocol-http|protocol-httpclient|urlfilter-regex|parse-(html)|index-(basic|anchor)|indexer-solr|query-(basic|site|url)|response-(json|xml)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)</value>
Hi I am trying to consume a cxf spring based web service using camel.
Getting below error on server start up
SEVERE:
Context initialization failed
org.apache.camel.RuntimeCamelException: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1680)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:138)
at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:340)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:855)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:219)
at org.apache.camel.component.cxf.jaxrs.CxfRsConsumer.<init>(CxfRsConsumer.java:44)
at org.apache.camel.component.cxf.jaxrs.CxfRsEndpoint.createConsumer(CxfRsEndpoint.java:176)
at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:69)
at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:98)
at org.apache.camel.impl.RouteService.warmUp(RouteService.java:158)
at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3490)
at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3420)
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3197)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3053)
at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2848)
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2844)
at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2867)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2844)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2813)
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:270)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:136)
... 19 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: No resource classes found
at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:317)
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:159)
... 37 more
Aug 24, 2016 11:19:05 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.apache.camel.RuntimeCamelException: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1680)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:138)
at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:340)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:855)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:219)
at org.apache.camel.component.cxf.jaxrs.CxfRsConsumer.<init>(CxfRsConsumer.java:44)
at org.apache.camel.component.cxf.jaxrs.CxfRsEndpoint.createConsumer(CxfRsEndpoint.java:176)
at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:69)
at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:98)
at org.apache.camel.impl.RouteService.warmUp(RouteService.java:158)
at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3490)
at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3420)
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3197)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3053)
at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2848)
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2844)
at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2867)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2844)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2813)
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:270)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:136)
... 19 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: No resource classes found
at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:317)
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:159)
... 37 more
Make sure you've configured resources classes for the cxf component to use. E.g
from("cxfrs:http://localhost:8080/?resourceClasses=your.fully.qualified.ClassName")
.to("mock:in")
The resource class you specify needs to be annotated with the jaxrs annotations so cxf can understand it and use it.
I am using camel 2.15.1 which uses CXF 3.0.4. I am trying to deploy my web application into Websphere 7.0. It is throwing Incompatible class version version. I have already Disabled websphere JAX WS engine com.ibm.websphere.webservices.DisableIBMJAXWSEngine=true and changed classloader to parent last. Still get below error. Similar approach with Camel 2.10.X on my earlier application has worked though. Below is stacktrace.
[5/11/16 21:12:59:157 GMT+08:00] 00000024 extension E com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor createServletWrapper Error occured while preparing the servlet for initialization.
javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:434)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:169)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1809)
at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:98)
at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:1038)
at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:959)
at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:638)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:436)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:304)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:731)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:616)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1147)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1320)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:611)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:945)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:760)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1292)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5305)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5483)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1297)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2069)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:434)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:377)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:648)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:610)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1204)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:272)
at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1152)
at java.security.AccessController.doPrivileged(AccessController.java:298)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1146)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:999)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:847)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:783)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1331)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1224)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:242)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:353)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink$IPCConnectorReadCallback.complete(IPCConnectorInboundLink.java:595)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1662)
Caused by: org.apache.cxf.bus.extension.ExtensionException: Could not load extension class org.apache.camel.component.cxf.transport.CamelTransportFactory.
at org.apache.cxf.bus.extension.Extension.tryClass(Extension.java:183)
at org.apache.cxf.bus.extension.Extension.getClassObject(Extension.java:199)
at org.apache.cxf.bus.extension.ExtensionManagerImpl.activateAllByType(ExtensionManagerImpl.java:144)
at org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerBus.java:180)
at org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerBus.java:186)
at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:40)
at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:36)
at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:32)
at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:146)
at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:122)
at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:94)
at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:83)
at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:83)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:76)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358)
... 64 more
Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/apache/camel/component/cxf/transport/CamelTransportFactory, offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:287)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:778)
at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:691)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:532)
at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
at org.apache.cxf.bus.extension.Extension.tryClass(Extension.java:164)
... 78 more
Found the problem. It is due to WAS 7.0 running with java 6 and application is build using 1.7.