Please open an issue about this. Il mar 18 mag 2021, 01:08 Nicola Cisternino <ncistern...@gmail.com> ha scritto:
> Other tests ... > The problem is generated by "snappy" feature required by camel-kafka > feature (see at: > > https://repo1.maven.org/maven2/org/apache/camel/karaf/apache-camel/3.9.0/apache-camel-3.9.0-features.xml > ) > The sequence to reproduce the problem, starting from a fresh 4.3.1 Karaf > installation, is: > > __ __ ____ > / //_/____ __________ _/ __/ > / ,< / __ `/ ___/ __ `/ /_ > / /| |/ /_/ / / / /_/ / __/ > /_/ |_|\__,_/_/ \__,_/_/ > > Apache Karaf (4.3.1) > > Hit '<tab>' for a list of available commands > and '[cmd] --help' for help on a specific command. > Hit 'system:shutdown' to shutdown Karaf. > Hit '<ctrl-d>' or type 'logout' to disconnect shell from current session. > > karaf@root()> feature:repo-add camel 3.9.0 > Adding feature url > mvn:org.apache.camel.karaf/apache-camel/3.9.0/xml/features > karaf@root()> feature:install http webconsole camel camel-netty > karaf@root()> feature:install camel-stream > karaf@root()> feature:install snappy > karaf@root()> feature:install camel-sql > Error executing command: Unable to resolve root: missing requirement > [root] osgi.identity; osgi.identity=kar; type=karaf.feature; > version="[4.3.1,4.3.1]"; > filter:="(&(osgi.identity=kar)(type=karaf.feature)(version>=4.3.1)(version<=4.3.1))" > > [caused by: Unable to resolve kar/4.3.1: missing requirement [kar/4.3.1] > osgi.identity; osgi.identity=org.apache.karaf.kar.core; > type=osgi.bundle; version="[4.3.1,4.3.1]"; resolution:=mandatory [caused > by: Unable to resolve org.apache.karaf.kar.core/4.3.1: missing > requirement [org.apache.karaf.kar.core/4.3.1] osgi.wiring.package; > > filter:="(&(osgi.wiring.package=org.osgi.framework)(version>=1.0.0)(!(version>=3.0.0)))"]] > karaf@root()> > > > On 5/17/21 10:21 PM, Andrea Cosentino wrote: > > 3.9.0 has been tested only with 4.3.1 > > > > Il lun 17 mag 2021, 22:13 Nicola Cisternino <ncistern...@gmail.com> ha > > scritto: > > > >> Thank you JB > >> > >> I've tried to update all to last versions. > >> > >> So I've installed: > >> - Apache Karaf *4.3.2* > >> - Camel *3.9.0* features > >> > >> In features terms: > >> *feature:install http webconsole** > >> **feature:repo-add camel 3.9.0** > >> **feature:install camel camel-netty camel-kafka** > >> * > >> ... and all works fine ;-) > >> ... but ... trying to install some other camel feature (for example > >> camel-sql or camel-stream) occurs the following error: > >> > >> karaf@root()> *feature:install camel-sql* > >> Error executing command: Unable to resolve root: missing requirement > >> [root] osgi.identity; osgi.identity=shell; type=karaf.feature; > >> version="[4.3.2,4.3.2]"; > >> > filter:="(&(osgi.identity=shell)(type=karaf.feature)(version>=4.3.2)(version<=4.3.2))" > >> > >> [caused by: Unable to resolve shell/4.3.2: missing requirement > >> [shell/4.3.2] osgi.identity; osgi.identity=org.apache.karaf.shell.core; > >> type=osgi.bundle; version="[4.3.2,4.3.2]"; resolution:=mandatory [caused > >> by: Unable to resolve org.apache.karaf.shell.core/4.3.2: missing > >> requirement [org.apache.karaf.shell.core/4.3.2] osgi.wiring.package; > >> > >> > filter:="(&(osgi.wiring.package=org.osgi.framework)(version>=1.0.0)(!(version>=3.0.0)))"]] > >> karaf@root()> > >> > >> In the log: > >> 2021-05-17T20:09:52,508 | INFO | pipe-feature:install camel-sql | > >> FeaturesServiceImpl | 18 - org.apache.karaf.features.core - > >> 4.3.2 | Adding features: camel-sql/[3.9.0,3.9.0] > >> 2021-05-17T20:09:52,601 | ERROR | Karaf ssh console user karaf | > >> ShellUtil | 43 - org.apache.karaf.shell.core - > >> 4.3.2 | Exception caught while executing command > >> org.apache.felix.resolver.reason.ReasonException: Unable to resolve > >> root: missing requirement [root] osgi.identity; osgi.identity=shell; > >> type=karaf.feature; version="[4.3.2,4.3.2]"; > >> > filter:="(&(osgi.identity=shell)(type=karaf.feature)(version>=4.3.2)(version<=4.3.2))" > >> > >> [caused by: Unable to resolve shell/4.3.2: missing requirement > >> [shell/4.3.2] osgi.identity; osgi.identity=org.apache.karaf.shell.core; > >> type=osgi.bundle; version="[4.3.2,4.3.2]"; resolution:=mandatory [caused > >> by: Unable to resolve org.apache.karaf.shell.core/4.3.2: missing > >> requirement [org.apache.karaf.shell.core/4.3.2] osgi.wiring.package; > >> > >> > filter:="(&(osgi.wiring.package=org.osgi.framework)(version>=1.0.0)(!(version>=3.0.0)))"]] > >> at > >> > org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) > >> > >> ~[?:?] > >> at > >> org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:433) > >> ~[?:?] > >> at > >> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:420) > >> ~[?:?] > >> at > >> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:374) > >> ~[?:?] > >> at > >> > org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257) > >> > >> ~[?:?] > >> at > >> > org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:399) > >> > >> ~[?:?] > >> at > >> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069) > >> > >> ~[?:?] > >> at > >> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004) > >> > >> ~[?:?] > >> at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?] > >> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown > >> Source) ~[?:?] > >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown > >> Source) ~[?:?] > >> at java.lang.Thread.run(Unknown Source) [?:?] > >> Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to > >> resolve shell/4.3.2: missing requirement [shell/4.3.2] osgi.identity; > >> osgi.identity=org.apache.karaf.shell.core; type=osgi.bundle; > >> version="[4.3.2,4.3.2]"; resolution:=mandatory [caused by: Unable to > >> resolve org.apache.karaf.shell.core/4.3.2: missing requirement > >> [org.apache.karaf.shell.core/4.3.2] osgi.wiring.package; > >> > >> > filter:="(&(osgi.wiring.package=org.osgi.framework)(version>=1.0.0)(!(version>=3.0.0)))"] > >> at > >> > org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) > >> > >> ~[?:?] > >> ... 12 more > >> Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to > >> resolve org.apache.karaf.shell.core/4.3.2: missing requirement > >> [org.apache.karaf.shell.core/4.3.2] osgi.wiring.package; > >> > >> > filter:="(&(osgi.wiring.package=org.osgi.framework)(version>=1.0.0)(!(version>=3.0.0)))" > >> at > >> > org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) > >> > >> ~[?:?] > >> at > >> > org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) > >> > >> ~[?:?] > >> ... 12 more > >> > >> The strange thing is that org.apache.karaf.shell.core bundle is running > !! > >> > >> > >> On 5/17/21 7:02 PM, Jean-Baptiste Onofre wrote: > >>> Hi, > >>> > >>> The error seems related to Kafka bundle. > >>> > >>> Can you check if Kafka bundle version is 2.6.0_2 ? > >>> > >>> Regards > >>> JB > >>> > >>>> Le 17 mai 2021 à 18:42, Nicola Cisternino <ncistern...@gmail.com> a > >> écrit : > >>>> Hi all > >>>> I'm using Apache Karaf 4.3.1 to route netty socket on Kafka: > >>>> > >>>> cat > deploy/example.xml <<END > >>>> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> > >>>> <camelContext xmlns="http://camel.apache.org/schema/blueprint" > >> id="kafka"> > >>>> <route id="kafka"> > >>>> <from uri="mina:tcp:// > >> 0.0.0.0:8888?decoderMaxLineLength=8192&textline=true&sync=false > "/> > >>>> <to uri="kafka:users?brokers=192.168.1.231:9092"/> > >>>> </route> > >>>> </camelContext> > >>>> </blueprint> > >>>> END > >>>> > >>>> Using Camel 3.5.0 all works fine (from gogo shell): > >>>> feature:install http webconsole > >>>> feature:repo-add camel 3.5.0 > >>>> feature:install camel camel-netty camel-kafka > >>>> > >>>> Using last Camel 3.7.3 version (plus 3 Jackson Bundles) with same > >> features: > >>>> feature:install http webconsole > >>>> feature:repo-add camel 3.7.3 > >>>> feature:install camel camel-netty camel-kafka > >>>> > >>>> .. the following error occurs: > >>>> > >>>> 16:33:39.663 INFO [Blueprint Event Dispatcher: 1] Kafka version: 2.6.0 > >>>> 16:33:39.664 INFO [Blueprint Event Dispatcher: 1] Kafka commitId: > >> 62abe01bee039651 > >>>> 16:33:39.664 INFO [Blueprint Event Dispatcher: 1] Kafka startTimeMs: > >> 1621269219663 > >>>> 16:33:39.665 ERROR [kafka-producer-network-thread | producer-2] > >> Uncaught exception in thread 'kafka-producer-network-thread | > producer-2': > >>>> java.lang.NoClassDefFoundError: Could not initialize class > >> org.apache.kafka.common.requests.ApiVersionsRequest$Builder > >>>> at > >> > org.apache.kafka.clients.NetworkClient.handleConnections(NetworkClient.java:910) > >> ~[!/:?] > >>>> at > >> org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:555) > ~[!/:?] > >>>> at > >> > org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:325) > >> ~[!/:?] > >>>> at > >> org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:240) > >> ~[!/:?] > >>>> at java.lang.Thread.run(Unknown Source) [?:?] > >>>> > >>>> Any idea ? > >>>> > >>>> > >>>> > >>>> > >> > >