BTW: from my docs it looks like I did that in the past using cxf 3.2.4.
Have there been any significant breaking changes since 3.2.4?Mat frëndleche Gréiss, Mit freundlichen Grüßen, Meilleures salutations, Kind regards,
Alex WeirigResponsable Technique Ville de Luxembourg Service Enseignement Centre Technolink *Tel* +352 4796 - 6127 <tel:+35247966127> *Fax* +352 42 88 81 *Email* alex.wei...@technolink.lu <mailto:alex.wei...@technolink.lu> www.vdl.lu <http://www.vdl.lu> // www.technolink.lu <http://www.technolink.lu> Centre Technolink 2, rue Charles de Tornaco L-2623 LUXEMBOURG
//indoors.this.blesses <https://map.what3words.com/indoors.this.blesses> //schaufel.besten.kopie <https://map.what3words.com/schaufel.besten.kopie> //supposons.levage.venger <https://map.what3words.com/supposons.levage.venger> On 14/03/2020 15:59, Alex Weirig wrote:
Hi, I'm trying to develop a JAX-RS client on karaf 4.2.8. I've installed the usual suspects: feature:install scr webconsole and I've added the cxf repocxf-3.3.5 │ mvn:org.apache.cxf.karaf/apache-cxf/RELEASE/xml/featuresand installed following features:feature:install cxf-jaxrs cxf-core cxf-commands cxf-http-client cxf-jacksonand I've installed my bundles. Everything is starting up as expected ... When I try to create a webclient in my codeClient client = ClientBuilder.newBuilder().hostnameVerifier((s, session) -> true).sslContext(sslContext) .register(new JacksonJsonProvider(objectMapper)) .connectTimeout(10, TimeUnit.MINUTES) .build(); I get a CNF exception. java.lang.RuntimeException: java.lang.ClassNotFoundExceptionat javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:50) ~[?:?] at tlk.occupation_postes_electronique.services.login_service.impl.LoginServiceImpl.authenticate(LoginServiceImpl.java:92) ~[?:?] at lu.tlk.occupation_postes_electronique.services.login_service_test.cmd.LoginServiceTestCommands.testLogin(LoginServiceTestCommands.java:22) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212]at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212]at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:143) ~[?:?] at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:91) ~[?:?] at org.apache.karaf.shell.impl.console.osgi.CommandTracker$1.execute(CommandTracker.java:112) ~[?:?] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_212]at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] Caused by: java.lang.ClassNotFoundExceptionat javax.ws.rs.client.ClientFinder.newInstance(ClientFinder.java:120) ~[?:?] at javax.ws.rs.client.ClientFinder.find(ClientFinder.java:96) ~[?:?] at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:44) ~[?:?]... 21 more Caused by: java.lang.InstantiationExceptionat sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48) ~[?:1.8.0_212] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_212]at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_212]at javax.ws.rs.client.ClientFinder.newInstance(ClientFinder.java:116) ~[?:?] at javax.ws.rs.client.ClientFinder.find(ClientFinder.java:96) ~[?:?] at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:44) ~[?:?]... 21 moreI'm pretty sure I had something similar running in an older version of karaf but I can't figure out what I'm missing today...Many thanks in advance --Mat frëndleche Gréiss, Mit freundlichen Grüßen, Meilleures salutations, Kind regards,Alex WeirigResponsable Technique Ville de Luxembourg Service Enseignement Centre Technolink *Tel* +352 4796 - 6127 <tel:+35247966127> *Fax* +352 42 88 81 *Email* alex.wei...@technolink.lu <mailto:alex.wei...@technolink.lu> www.vdl.lu <http://www.vdl.lu> // www.technolink.lu <http://www.technolink.lu> Centre Technolink 2, rue Charles de Tornaco L-2623 LUXEMBOURG//indoors.this.blesses <https://map.what3words.com/indoors.this.blesses> //schaufel.besten.kopie <https://map.what3words.com/schaufel.besten.kopie> //supposons.levage.venger <https://map.what3words.com/supposons.levage.venger> -- This email was Anti Virus checked by SOPHOS UTM
<<attachment: alex_weirig.vcf>>