maven:找不到文件,但该文件已存在

时间:2015-07-02 17:58:07

标签: maven

我制作了包含此依赖性的maven构建

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4</version>
</dependency>

生成的jar文件具有此文件

org.apache.http.conn.ssl.SSLConnectionSocketFactory

我在关于此文件的日志中收到此错误:

org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: List<Exchange>(1 elements)]
at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1379)
at org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:283)
at org.apache.camel.processor.aggregate.AggregateProcessor$1.run(AggregateProcessor.java:550)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at org.apache.camel.util.concurrent.SynchronousExecutorService.execute(SynchronousExecutorService.java:62)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78)
at org.apache.camel.processor.aggregate.AggregateProcessor.onSubmitCompletion(AggregateProcessor.java:540)
at org.apache.camel.processor.aggregate.AggregateProcessor.doProcess(AggregateProcessor.java:262)
at org.apache.camel.processor.aggregate.AggregateProcessor.process(AggregateProcessor.java:179)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:113)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:111)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
at org.apache.camel.processor.FilterProcessor.process(FilterProcessor.java:58)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291)
at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200)
at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: org/apache/http/impl/client/HttpClients
at org.openrdf.http.client.SesameClientImpl.createHttpClient(SesameClientImpl.java:73)
at org.openrdf.http.client.SesameClientImpl.getHttpClient(SesameClientImpl.java:60)
at org.openrdf.http.client.SesameClientImpl.createSesameSession(SesameClientImpl.java:86)
at org.openrdf.repository.http.HTTPRepository.createHTTPClient(HTTPRepository.java:296)
at org.openrdf.repository.http.HTTPRepository.getConnection(HTTPRepository.java:157)
at org.openrdf.repository.Repository$getConnection.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at script143620893395844487538$_run_closure1.doCall(script143620893395844487538.groovy:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
at groovy.lang.Closure.call(Closure.java:410)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3374)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1406)
at org.codehaus.groovy.runtime.dgm$143.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at script143620893395844487538.run(script143620893395844487538.groovy:14)
at org.apache.camel.language.groovy.GroovyExpression.evaluate(GroovyExpression.java:52)
at org.apache.camel.processor.TransformProcessor.process(TransformProcessor.java:47)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
at org.apache.camel.processor.aggregate.AggregateProcessor$1.run(AggregateProcessor.java:548)
... 34 more

该类存在,我甚至尝试为httpclient添加maven依赖项,但核心包含httpclient所具有的所有类,因此我删除了cliet。我真的不知道还应该尝试什么。非常感谢任何帮助。

添加我正在使用的所有依赖项的列表:

<dependency>
    <groupId>org.openrdf.sesame</groupId>
    <artifactId>sesame-repository-http</artifactId>
    <version>2.8.3</version>
</dependency>
<dependency>
    <groupId>org.openrdf.sesame</groupId>
    <artifactId>sesame-rio-api</artifactId>
    <version>2.8.3</version>
</dependency>   
<dependency>
    <groupId>org.openrdf.sesame</groupId>
    <artifactId>sesame-queryresultio-api</artifactId>
    <version>2.8.3</version>
</dependency>  
<dependency>
    <groupId>org.openrdf.sesame</groupId>
    <artifactId>sesame-queryparser-api</artifactId>
    <version>2.8.3</version>
</dependency>
<dependency>
    <groupId>org.openrdf.sesame</groupId>
    <artifactId>sesame-query</artifactId>
    <version>2.8.3</version>
</dependency>
<dependency>
<groupId>org.openrdf.sesame</groupId>
<artifactId>sesame-http-protocol</artifactId>
<version>2.8.3</version>
</dependency>
<dependency>
<groupId>org.openrdf.sesame</groupId>
<artifactId>sesame-util</artifactId>
<version>2.8.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.10</version>
</dependency>  
<dependency>
<groupId>org.openrdf.sesame</groupId>
<artifactId>sesame-queryalgebra-model</artifactId>
<version>2.8.3</version>
</dependency>
<dependency>
<groupId>org.openrdf.sesame</groupId>
<artifactId>sesame-rio-ntriples</artifactId>
<version>2.8.3</version>
</dependency>
<dependency>
<groupId>org.openrdf.sesame</groupId>
<artifactId>sesame-http-client</artifactId>
<version>2.8.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4</version>
</dependency>

<dependency>
    <groupId>org.openrdf.sesame</groupId>
    <artifactId>sesame-repository-api</artifactId>
    <version>2.8.3</version>
</dependency>
<dependency>
    <groupId>org.openrdf.sesame</groupId>
    <artifactId>sesame-rio-trig</artifactId>
    <version>2.8.3</version>
</dependency>
<dependency>
<groupId>org.openrdf.sesame</groupId>
<artifactId>sesame-model</artifactId>
<version>2.8.3</version>
</dependency>      

依赖树如下所示:

+- javax.servlet:servlet-api:jar:2.4:provided (scope not updated to compile)
+- log4j:log4j:jar:1.2.15:provided (scope not updated to compile)
|  +- javax.jms:jms:jar:1.1:provided
|  +- com.sun.jdmk:jmxtools:jar:1.2.1:provided
|  \- com.sun.jmx:jmxri:jar:1.2.1:provided
+- org.apache.camel:camel-jackson:jar:2.13.3:compile
|  +- org.apache.camel:camel-core:jar:2.13.3:compile
|  +- com.fasterxml.jackson.core:jackson-databind:jar:2.3.3:compile
|  +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.3.3:compile
|  \- com.sun.xml.bind:jaxb-impl:jar:2.2.6:compile
+- junit:junit:jar:3.8.1:test (scope not updated to compile)
+- javax.mail:mail:jar:1.3.1:compile
|  \- javax.activation:activation:jar:1.0.2:compile
+- org.openrdf.sesame:sesame-repository-http:jar:2.8.3:compile
|  \- org.openrdf.sesame:sesame-rio-binary:jar:2.8.3:runtime
+- org.openrdf.sesame:sesame-rio-api:jar:2.8.3:compile
+- org.openrdf.sesame:sesame-queryresultio-api:jar:2.8.3:compile
+- org.openrdf.sesame:sesame-queryparser-api:jar:2.8.3:compile
+- org.openrdf.sesame:sesame-query:jar:2.8.3:compile
+- org.openrdf.sesame:sesame-http-protocol:jar:2.8.3:compile
+- org.openrdf.sesame:sesame-util:jar:2.8.3:compile
+- org.slf4j:slf4j-api:jar:1.7.10:compile
+- org.openrdf.sesame:sesame-queryalgebra-model:jar:2.8.3:compile
+- org.openrdf.sesame:sesame-rio-ntriples:jar:2.8.3:compile
|  +- org.openrdf.sesame:sesame-rio-datatypes:jar:2.8.3:runtime
|  \- org.openrdf.sesame:sesame-rio-languages:jar:2.8.3:runtime
+- org.openrdf.sesame:sesame-http-client:jar:2.8.3:compile
+- org.apache.httpcomponents:httpclient:jar:4.4:compile
+- org.apache.httpcomponents:httpcore:jar:4.4:compile
+- org.openrdf.sesame:sesame-repository-api:jar:2.8.3:compile
+- org.openrdf.sesame:sesame-rio-trig:jar:2.8.3:compile
|  \- org.openrdf.sesame:sesame-rio-turtle:jar:2.8.3:compile
+- org.openrdf.sesame:sesame-model:jar:2.8.3:compile
+- commons-pool:commons-pool:jar:1.6:compile
\- commons-dbcp:commons-dbcp:jar:1.4:compile

0 个答案:

没有答案