Can you try to enable DynamicImport for this bundle ? Regards JB
> Le 29 juin 2021 à 16:38, Baskar, Vinoth via lists.opendaylight.org > <vinoth.baskar=verizon....@lists.opendaylight.org> a écrit : > > Hi JB, > > Thanks for the help and ideas.. > > I have tried the import-package options as follow, > > <build> > <plugins> > <plugin> > <groupId>org.apache.felix</groupId> > <artifactId>maven-bundle-plugin</artifactId> > <extensions>true</extensions> > <configuration> > <instructions> > <Import-Package> > * > </Import-Package> > </instructions> > </configuration> > </plugin> > > Eventhough, I got the same issue while accessing the io.grpc.Context class. > Also, I have used the "dynamic-import" option and loaded the io.grpc.Context > bundle. But the issue still exists. > > I have cleaned all the code and just added below one line logger code to test > the bundle issue. > > LOGGER.debug("Context class {}", io.grpc.Context.class); > > This particular line does not produce any issue if I have added only > grpc-context related dependency in the pom.xml. > > <dependency> > <groupId>io.grpc</groupId> > <artifactId>grpc-context</artifactId> > <version>1.38.0</version> > </dependency> > > But If I have added grpc-protobuf jar (which have the grpc-context jar > dependency internally), It producing NoClassDefFoundErrror for the > io.grpc.Context class > > <dependency> > <groupId>io.grpc</groupId> > <artifactId>grpc-context</artifactId> > <version>1.38.0</version> > </dependency> > <dependency> > <groupId>io.grpc</groupId> > <artifactId>grpc-protobuf</artifactId> > <version>1.38.0</version> > <scope>compile</scope> > <exclusions> > <exclusion> > <groupId>io.grpc</groupId> > <artifactId>grpc-context</artifactId> > </exclusion></exclusions> > </dependency> > > Any Idea to resolve this bundle related issue, would be helpful to get rid of > this error? > > Regards, > Vinoth B > > > On Mon, Jun 28, 2021 at 5:59 PM Jean-Baptiste Onofre <j...@nanthrax.net > <mailto:j...@nanthrax.net>> wrote: > Hi, > > Maybe the wrap bundle doesn’t have the correct import. It can be fixed with > ?Import-Package=io.grpc… or using a wrapped bundle private package. > > Regards > JB > >> Le 28 juin 2021 à 07:55, Baskar, Vinoth via lists.opendaylight.org >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.opendaylight.org&d=DwMFaQ&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=MB85jW0Vw6dNjlCNuvM2PEjbZ4BtbKtikcVtcZCDFR4&m=XvQmOREbPcb9mkj8tgJWIQsqVqiofX3zZZhGi5abdEw&s=KkHB4pBZr4p2srXqXBjyDbcfikWiV1OSsry-aclcLXM&e=> >> <vinoth.baskar=verizon....@lists.opendaylight.org >> <mailto:vinoth.baskar=verizon....@lists.opendaylight.org>> a écrit : >> >> >> Any help on this? >> >> ---------- Forwarded message --------- >> From: Baskar, Vinoth <vinoth.bas...@verizon.com >> <mailto:vinoth.bas...@verizon.com>> >> Date: Mon, Jun 21, 2021 at 6:16 PM >> Subject: ClassNotFoundException thrown even after correct bundle exists >> To: <discuss@lists.opendaylight.org <mailto:discuss@lists.opendaylight.org>> >> >> >> Hi, >> >> I am trying to support the gNMI interfaces using the opendaylight. I have >> added the gNMI related java files, dependencies correctly in the >> opendaylight application. After the successful compilation, we are able to >> start the karaf application. But when we are doing the gNMI related stuff, I >> am getting the following error, >> >> java.lang.ClassNotFoundException: io.grpc.Context cannot be found by >> wrap_file__home_verizon_gnmi_gnmi_karaf_target_assembly_system_io_grpc_grpc-core_1.38.0_grpc-core-1.38.0.jar_0.0.0 >> >> >> But this specific class(io.grpc.Context) exists in the grpc-context jar, >> that I have added correctly in the application's pom.xml file. But, still I >> am getting this error. >> >> I have used the "find-class io.grpc.Context" option in the karaf >> application, displaying the grpc-conext.jar correctly. But why the error >> showing the " _io_grpc_grpc-core" ? Is the karaf looking into the wrong >> bundle? >> >> Please help on how to get rid of this issue... >> >> Regards, >> Vinoth B >> >> >> > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8759): https://lists.opendaylight.org/g/Discuss/message/8759 Mute This Topic: https://lists.opendaylight.org/mt/83917756/21656 Group Owner: discuss+ow...@lists.opendaylight.org Unsubscribe: https://lists.opendaylight.org/g/Discuss/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-