Error on using camel cxf "No binding factory... http://schemas.xmlsoap.org/soap/ registered" (but works in eclipse) -
Error on using camel cxf "No binding factory... http://schemas.xmlsoap.org/soap/ registered" (but works in eclipse) -
in camel app creating cxf endpoints in java dsl:
cxfendpoint cxf = new cxfendpoint(rtdmurl, new cxfcomponent(this.getcontext())); cxf.setserviceclass(eventporttype.class); process.process(rtdmsetnamefactory.get(eventname)).to(cxf).process(handlertdmanswer); if seek run route get:
exception in thread "main" org.apache.camel.failedtocreateproducerexception: failed create producer endpoint: end point[http://localhost:8088/mockeventsoapbinding]. reason: org.apache.cxf.service.factory.serviceconstructionexception: not resolve binding null ... caused by: org.apache.cxf.busexception: no binding mill namespace http://schemas.xmlsoap.org/soap/ registered. but if run main[] within eclipse (called in @test same configuration) working fine!?
my jar built maven-assembly-plugin (executable jar dependencies) hope/think configuration problem or related how set cxf endpoint.
additional info bounty hunters created minimal illustration reproduces error: https://bitbucket.org/moritz_loeser/cxftests/src
it contains test calls main() test working if alter path in route (it creates exchange per file, file content ignored). used soapui (project file within above repository) mock web service. on machine test works fine running mvn package , java -jar cxftests-1.0-snapshot-jar-with-dependencies.jar target folder fails. i tried: mvn test working
this dependency tree:
[info] com.sas:cep-adapter-java:jar:1.0-snapshot [info] +- com.sas:dfesp-component:jar:1.0-snapshot:compile [info] | \- dfx-esp-api:api:jar:2.2-post:compile [info] +- com.sas.o2:rtdm_general_client:jar:0.0.1-snapshot:compile [info] +- com.google.inject:guice:jar:3.0:compile [info] | +- javax.inject:javax.inject:jar:1:compile [info] | \- aopalliance:aopalliance:jar:1.0:compile [info] +- com.google.inject.extensions:guice-multibindings:jar:3.0:compile [info] +- com.google.guava:guava:jar:16.0.1:compile [info] +- joda-time:joda-time:jar:2.3:compile [info] +- org.apache.camel:camel-core:jar:2.13.1:compile [info] | \- com.sun.xml.bind:jaxb-impl:jar:2.2.6:compile [info] +- org.apache.camel:camel-ftp:jar:2.13.1:compile [info] | +- com.jcraft:jsch:jar:0.1.50:compile [info] | \- commons-net:commons-net:jar:3.3:compile [info] +- org.apache.camel:camel-cxf:jar:2.13.1:compile [info] | +- org.apache.camel:camel-spring:jar:2.13.1:compile [info] | | +- org.springframework:spring-aop:jar:3.2.8.release:compile [info] | | \- org.springframework:spring-tx:jar:3.2.8.release:compile [info] | +- org.apache.camel:camel-cxf-transport:jar:2.13.1:compile [info] | +- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:2.7.11:compile [info] | | +- org.apache.cxf:cxf-api:jar:2.7.11:compile [info] | | | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.2.1:compile [info] | | | | \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile [info] | | | +- org.apache.ws.xmlschema:xmlschema-core:jar:2.1.0:compile [info] | | | +- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile [info] | | | \- wsdl4j:wsdl4j:jar:1.6.3:compile [info] | | +- org.apache.cxf:cxf-rt-core:jar:2.7.11:compile [info] | | +- javax.ws.rs:javax.ws.rs-api:jar:2.0-m10:compile [info] | | +- org.apache.cxf:cxf-rt-bindings-xml:jar:2.7.11:compile [info] | | \- org.apache.cxf:cxf-rt-transports-http:jar:2.7.11:compile [info] | +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.7.11:compile [info] | | +- xml-resolver:xml-resolver:jar:1.2:compile [info] | | +- asm:asm:jar:3.3.1:compile [info] | | +- org.apache.cxf:cxf-rt-frontend-simple:jar:2.7.11:compile [info] | | \- org.apache.cxf:cxf-rt-ws-addr:jar:2.7.11:compile [info] | | \- org.apache.cxf:cxf-rt-ws-policy:jar:2.7.11:compile [info] | | \- org.apache.neethi:neethi:jar:3.0.3:compile [info] | +- org.apache.cxf:cxf-rt-rs-security-oauth:jar:2.7.11:compile [info] | | \- net.oauth.core:oauth-provider:jar:20100527:compile [info] | | \- net.oauth.core:oauth:jar:20100527:compile [info] | +- org.springframework:spring-core:jar:3.2.8.release:compile [info] | | \- commons-logging:commons-logging:jar:1.1.3:compile [info] | +- org.springframework:spring-beans:jar:3.2.8.release:compile [info] | +- org.springframework:spring-context:jar:3.2.8.release:compile [info] | | \- org.springframework:spring-expression:jar:3.2.8.release:compile [info] | +- org.apache.cxf:cxf-rt-features-clustering:jar:2.7.11:compile [info] | \- org.apache.cxf:cxf-rt-bindings-soap:jar:2.7.11:compile [info] | \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.7.11:compile [info] +- org.slf4j:slf4j-api:jar:1.7.7:compile [info] +- org.slf4j:slf4j-log4j12:jar:1.7.7:compile [info] +- org.slf4j:jul-to-slf4j:jar:1.7.7:compile [info] +- log4j:log4j:jar:1.2.17:compile [info] +- org.apache.camel:camel-test:jar:2.13.0:test [info] +- junit:junit:jar:4.11:test [info] | \- org.hamcrest:hamcrest-core:jar:1.3:compile [info] +- org.mockftpserver:mockftpserver:jar:2.4:compile [info] +- org.jukito:jukito:jar:1.4:compile [info] | +- org.mockito:mockito-core:jar:1.9.5:compile [info] | | \- org.objenesis:objenesis:jar:1.0:compile [info] | \- com.google.inject.extensions:guice-assistedinject:jar:3.0:compile [info] \- org.hamcrest:hamcrest-all:jar:1.3:compile my main method this:
public static void main(final string... args) throws exception { injector i; if (args.length < 1 || strings.isnullorempty(args[0])) { = guice.createinjector(new cepmodule()); } else { = guice.createinjector(new cepmodule(args[0])); } ourmain main = i.getinstance(ourmain.class); // eliminates logging java.util.logger slf4jbridgehandler.removehandlersforrootlogger(); // redirects java.util.logger stuff slf4j slf4jbridgehandler.install(); //i.getinstance(routecontrol.class).startall(); main.enablehangupsupport(); main.run(); } as stated before test works in eclipse runs method same configuration file test throws error (run console java -jar thejat.jar).
i had similar error while migrating cxf 2.3.1 2.6.6. in case in post before:
it seems assembly-plugin messes configuration files (overriding in not specific order). solution don't utilize it! utilize shade plugin here: how bundle apache cxf application monolithic jar maven "shade" plugin
but should tried add together :
<transformer implementation="org.apache.maven.plugins.shade.resource.appendingtransformer"> <resource>meta-inf/cxf/bus-extensions.txt</resource> </transformer>
(answer in post too), not transformenrs, , don't need buildtools
cxf apache-camel
Comments
Post a Comment