GitHub user selvatlc closed a discussion: Apache Pulsar - OSGI Support
My application is running on karaf. I'm integrating apache pulsar into our
platform and included the below dependencies in pom.xml
`
<dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-client</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-client</artifactId>
<version>3.1.0</version>
</dependency>
`
I tried to build the admin client and pulsar client using the below snippet but
getting Class Not found exception during runtime
`PulsarAdmin.builder().serviceHttpUrl(adminUrl).build();`
`PulsarClient.builder().serviceUrl(clientUrl).build();`
Below exception thrown whenever Pulsar Admin client is called
`java.lang.NoClassDefFoundError: Could not initialize class
org.apache.pulsar.client.admin.utils.DefaultImplementation`
Below exception thrown whenever Pulsar client is invoked
`org.apache.pulsar.client.api.PulsarClient not found by
wrap_file__Users_kumarselvadg_.m2_repository_org_apache_pulsar_pulsar-client-admin_3.1.0_pulsar-client-admin-3.1.0.jar
[206]`
Note :
If I do a test using a standalone JAR [without OSGI modules], it is working
fine.
Please help me on this !
GitHub link: https://github.com/apache/pulsar/discussions/21239
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]