GitHub user Pavan792reddy edited a discussion: issue with  OAuth2 for spark 
streaming from pulsar

hi team,
we are trying to read the data from pulsar topic but we facing class not found 
issue 


org.apache.pulsar.client.api.PulsarClientException$UnsupportedAuthenticationException:
 java.lang.RuntimeException: 
org.apache.pulsar.client.api.PulsarClientException$UnsupportedAuthenticationException:
 java.lang.ClassNotFoundException: 
org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2
  at 
org.apache.pulsar.client.api.AuthenticationFactory.create(AuthenticationFactory.java:84)
  at 
org.apache.pulsar.client.admin.internal.PulsarAdminBuilderImpl.authentication(PulsarAdminBuilderImpl.java:84)
  at org.apache.spark.sql.pulsar.AdminUtils$.buildAdmin(AdminUtils.scala:29)
  at 
org.apache.spark.sql.pulsar.PulsarMetadataReader.<init>(PulsarMetadataReader.scala:51)
  at 
org.apache.spark.sql.pulsar.PulsarProvider.$anonfun$createRelation$1(PulsarProvider.scala:140)
  at org.apache.spark.util.Utils$.tryWithResource(Utils.scala:2830)
  at 
org.apache.spark.sql.pulsar.PulsarProvider.createRelation(PulsarProvider.scala:141)
  at 
org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:350)
  at 
org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:228)
  at 
org.apache.spark.sql.DataFrameReader.$anonfun$load$2(DataFrameReader.scala:210)
  at scala.Option.getOrElse(Option.scala:189)
  at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:210)
  at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:171)
  ... 47 elided
Caused by: java.lang.RuntimeException: 
org.apache.pulsar.client.api.PulsarClientException$UnsupportedAuthenticationException:
 java.lang.ClassNotFoundException: 
org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2
  at 
org.apache.pulsar.client.internal.ReflectionUtils.catchExceptions(ReflectionUtils.java:43)
  at 
org.apache.pulsar.client.internal.DefaultImplementation.createAuthentication(DefaultImplementation.java:120)
  at 
org.apache.pulsar.client.api.AuthenticationFactory.create(AuthenticationFactory.java:82)
  ... 59 more
Caused by: 
org.apache.pulsar.client.api.PulsarClientException$UnsupportedAuthenticationException:
 java.lang.ClassNotFoundException: 
org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2
  at 
org.apache.pulsar.client.impl.AuthenticationUtil.create(AuthenticationUtil.java:87)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  at 
org.apache.pulsar.client.internal.DefaultImplementation.lambda$createAuthentication$8(DefaultImplementation.java:123)
  at 
org.apache.pulsar.client.internal.ReflectionUtils.catchExceptions(ReflectionUtils.java:35)
  ... 61 more
Caused by: java.lang.ClassNotFoundException: 
org.apache.pulsar.client.impl.auth.oauth2.AuthenticationOAuth2
  at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
  at java.base/java.lang.Class.forName0(Native Method)
  at java.base/java.lang.Class.forName(Class.java:315)
  at 
org.apache.pulsar.client.impl.AuthenticationUtil.create(AuthenticationUtil.java:73)
  ... 67 more

scala> 

GitHub link: https://github.com/apache/pulsar/discussions/22997

----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscr...@pulsar.apache.org

Reply via email to