Hi, That’s normal for the jetty.xml as the blog post is pretty old and was with Karaf 4.0.x (afair), so with an older Jetty version.
I didn’t see your feedback about the question. I’m not sure I got your question. If you use a relative path (/foo), then it will use the default HTTP port from Pax Web. You can always set a absolute path (including host and port) and then, CXF will create a new dedicated Jetty connector. So, if it’s just about CXF, just specify an absolute path to let CXF creates its own Jetty connector (if I correctly understand your need ;) ). Regards JB > Le 1 févr. 2021 à 19:10, Stefan Günst <[email protected]> a écrit : > > —— > > Trying to create another Thread because Nabble doesn’t allow me to answer on > my own topics. > > > ——— > > > Hi JB, > > sorry but didn’t work! > > I asked me why it worked like a charm in Version 4.0.9 and now stopped. > > I think to patch jetty.xml is not the right way to go and this solution is > perfect for this Use case. > > http://karaf.922171.n3.nabble.com/Custom-http-port-for-CXF-web-app-td4044555.html > > <http://karaf.922171.n3.nabble.com/Custom-http-port-for-CXF-web-app-td4044555.html> > > > > Jetty ConfigPatch from your Blog will failed on 4.3.0 > > <Call name="addConnector"> > <Arg> > <New class="org.eclipse.jetty.server.nio.SelectChannelConnector"> > <Set name="host">0.0.0.0</Set> > <Set name="port">9191</Set> > <Set name="maxIdleTime">300000</Set> > <Set name="Acceptors">1</Set> > <Set name="statsOn">false</Set> > <Set name="confidentialPort">9443</Set> > <Set name="name">myConnector</Set> > </New> > </Arg> > </Call> > > because of missing org.eclipse.jetty.server.nio.SelectChannelConnector > > Regards > > Stefan > > >> Am 28.01.2021 um 06:02 schrieb jbonofre [via Karaf] >> <[email protected] >> <mailto:[email protected]>>: >> >> Hi Sefan, >> >> You want to have two ports: one for "global" (webconsole, …) and one for CXF >> ? >> >> Then, you need to set this in jetty.xml (you can take a look on >> http://blog.nanthrax.net/?p=352 <http://blog.nanthrax.net/?p=352> >> >> Regards >> JB >> >>> Le 27 janv. 2021 à 20:42, Stefan Günst <[hidden email] >>> <x-msg://4/user/SendEmail.jtp?type=node&node=4059513&i=0>> a écrit : >>> >>> Hi JB, >>> >>> yes i know but isn’t this global? >>> >>> So i want to run on Standard 8181 (webconsole,…) and in parallel on another >>> Port (8080) the REST-Service. >>> >>> Regards >>> >>> Stefan >>> >>> >>>> Am 27.01.2021 um 20:39 schrieb JB Onofré <[hidden email] >>>> <x-msg://4/user/SendEmail.jtp?type=node&node=4059513&i=1>>: >>>> >>>> You have to set the port in etc/org.ops4j.pax.web.cfg. >>>> >>>> Regards >>>> JB >>>> >>>>> Le 27 janv. 2021 à 20:37, Stefan Günst <[hidden email] >>>>> <x-msg://4/user/SendEmail.jtp?type=node&node=4059513&i=2>> a écrit : >>>>> >>>>> Hi, >>>>> >>>>> based on this example: >>>>> >>>>> https://github.com/apache/karaf/tree/master/examples/karaf-rest-example/karaf-rest-example-blueprint >>>>> >>>>> <https://github.com/apache/karaf/tree/master/examples/karaf-rest-example/karaf-rest-example-blueprint> >>>>> >>>>> and trying to switch to another Port failed with errors >>>>> >>>>> 2021-01-27T13:02:53,860 | ERROR | features-3-thread-1 | >>>>> BlueprintContainerImpl | 128 - org.apache.aries.blueprint.core >>>>> - 1.10.2 | Unable to start container for blueprint bundle >>>>> org.apache.karaf.examples.karaf-rest-example-blueprint/4.3.0 >>>>> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable >>>>> to initialize bean bookingRest >>>>> at >>>>> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:593) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:703) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:666) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81) >>>>> ~[?:?] >>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266) >>>>> ~[?:1.8.0_172] >>>>> at >>>>> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:360) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:190) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:737) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:433) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:298) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:311) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:280) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:266) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422) >>>>> ~[?:?] >>>>> at >>>>> org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1180) >>>>> ~[?:?] >>>>> at >>>>> org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730) >>>>> ~[?:?] >>>>> at >>>>> org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485) >>>>> ~[?:?] >>>>> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4817) >>>>> ~[?:?] >>>>> at org.apache.felix.framework.Felix.startBundle(Felix.java:2336) ~[?:?] >>>>> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) >>>>> ~[?:?] >>>>> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) >>>>> ~[?:?] >>>>> at >>>>> org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165) >>>>> ~[?:?] >>>>> at >>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1153) >>>>> ~[?:?] >>>>> at >>>>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1034) >>>>> ~[?:?] >>>>> at >>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062) >>>>> ~[?:?] >>>>> at >>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998) >>>>> ~[?:?] >>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266) >>>>> [?:1.8.0_172] >>>>> at >>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) >>>>> [?:1.8.0_172] >>>>> at >>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) >>>>> [?:1.8.0_172] >>>>> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172] >>>>> Caused by: org.apache.cxf.service.factory.ServiceConstructionException >>>>> at >>>>> org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:216) >>>>> ~[?:?] >>>>> at >>>>> org.apache.cxf.jaxrs.blueprint.JAXRSServerFactoryBeanDefinitionParser$BPJAXRSServerFactoryBean.create(JAXRSServerFactoryBeanDefinitionParser.java:205) >>>>> ~[?:?] >>>>> at >>>>> org.apache.cxf.jaxrs.blueprint.JAXRSServerFactoryBeanDefinitionParser$BPJAXRSServerFactoryBean.init(JAXRSServerFactoryBeanDefinitionParser.java:200) >>>>> ~[?:?] >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> ~[?:1.8.0_172] >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) >>>>> ~[?:1.8.0_172] >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>> ~[?:1.8.0_172] >>>>> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172] >>>>> at >>>>> org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:337) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:835) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:591) >>>>> ~[?:?] >>>>> ... 35 more >>>>> Caused by: java.io.IOException: Cannot find any registered >>>>> HttpDestinationFactory from the Bus. >>>>> at >>>>> org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:276) >>>>> ~[?:?] >>>>> at >>>>> org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:85) >>>>> ~[?:?] >>>>> at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:64) ~[?:?] >>>>> at >>>>> org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:170) >>>>> ~[?:?] >>>>> at >>>>> org.apache.cxf.jaxrs.blueprint.JAXRSServerFactoryBeanDefinitionParser$BPJAXRSServerFactoryBean.create(JAXRSServerFactoryBeanDefinitionParser.java:205) >>>>> ~[?:?] >>>>> at >>>>> org.apache.cxf.jaxrs.blueprint.JAXRSServerFactoryBeanDefinitionParser$BPJAXRSServerFactoryBean.init(JAXRSServerFactoryBeanDefinitionParser.java:200) >>>>> ~[?:?] >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> ~[?:1.8.0_172] >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) >>>>> ~[?:1.8.0_172] >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>>> ~[?:1.8.0_172] >>>>> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172] >>>>> at >>>>> org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:337) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:835) >>>>> ~[?:?] >>>>> at >>>>> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:591) >>>>> ~[?:?] >>>>> ... 35 more >>>>> >>>>> >>>>> https://github.com/apache/karaf/blob/master/examples/karaf-rest-example/karaf-rest-example-blueprint/src/main/resources/OSGI-INF/blueprint/rest.xml >>>>> >>>>> <https://github.com/apache/karaf/blob/master/examples/karaf-rest-example/karaf-rest-example-blueprint/src/main/resources/OSGI-INF/blueprint/rest.xml> >>>>> >>>>> address=„http://0.0.0.0:8080 <http://0.0.0.0:8080/>/booking"> >>>>> >>>>> Is there something additional to configure ? >>>>> >>>>> >>>>> Regards >>>>> >>>>> Stefan >>>>> >>>>> >>> >> >> >> >> If you reply to this email, your message will be added to the discussion >> below: >> http://karaf.922171.n3.nabble.com/Karaf-4-3-0-REST-via-Blueprint-can-t-configure-another-different-HTTP-Port-tp4059509p4059513.html >> >> <http://karaf.922171.n3.nabble.com/Karaf-4-3-0-REST-via-Blueprint-can-t-configure-another-different-HTTP-Port-tp4059509p4059513.html> >> To unsubscribe from Karaf - User, click here >> <http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=930749&code=c3RlZmFuLmd1ZW5zdEBtZS5jb218OTMwNzQ5fDU2MzIzMjg=>. >> NAML >> <http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
