Hi Freeman, thanks for you answer, this is what I'm getting:
find-class javax.ws.rs.client.ClientFinder login-service (123) javax/ws/rs/client/ClientFinder.class Apache CXF Runtime JAX-RS Frontend (171) javax/ws/rs/client/ClientFinder.class Apache CXF JAX-RS Client (173) javax/ws/rs/client/ClientFinder.classMat 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 16:26, Freeman Fang wrote:
Hi, This javax.ws.rs.client.ClientFinder is suspicious. Could you please usefind-class javax.ws.rs.client.ClientFinder to see which bundle contains this class?In CXF, we use Servicemix wrapped jaxrs spec bundle which doesn't use javax.ws.rs.client.ClientFinder at all.My gut is that somehow you use an incorrect version of jaxrs api bundle in your environment.FreemanOn Sat, Mar 14, 2020 at 10:59 AM Alex Weirig <alex.wei...@technolink.lu <mailto:alex.wei...@technolink.lu>> 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 repo cxf-3.3.5 │ mvn:org.apache.cxf.karaf/apache-cxf/RELEASE/xml/features and installed following features: feature:install cxf-jaxrs cxf-core cxf-commands cxf-http-client cxf-jackson and I've installed my bundles. Everything is starting up as expected ... When I try to create a webclient in my code Client 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.ClassNotFoundException at 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.ClassNotFoundException at 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.InstantiationException at 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 more I'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 Weirig Responsable 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>>