cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

org.neo4j.driver.v1.exceptions.AuthenticationException: Unsupported authentication token, scheme='none' only allowed when auth is disabled: { scheme='none' }

Hi,

I am trying to connect to Neo4j from Spark using neo4j-spark-connector. I am facing an authentication issue when I try to connect to the Neo4j "org.neo4j.driver.v1.exceptions.AuthenticationException: Unsupported authentication token, scheme='none' only allowed when auth is disabled: { scheme='none' }" I have checked and the credentials I am passing are correct. Not sure why is it failing now.

import org.neo4j.spark._
import org.apache.spark._
import org.graphframes._
import org.apache.spark.sql.SparkSession
import org.neo4j.driver.v1.GraphDatabase
import org.neo4j.driver.v1.AuthTokens

val config = new SparkConf()

config.set(Neo4jConfig.prefix + "url", "bolt://localhost")
config.set(Neo4jConfig.prefix + "user", "neo4j")
config.set(Neo4jConfig.prefix + "password", "root")

val sparkSession :SparkSession = SparkSession.builder.config(config).getOrCreate()

val neo = Neo4j(sparkSession.sparkContext)

val graphFrame = neo.pattern(("Person","id"),("KNOWS","null"), ("Employee","id")).partitions(3).rows(1000).loadGraphFrame


println("**********Graphframe Vertices Count************")
graphFrame.vertices.count

println("**********Graphframe Edges Count************")
graphFrame.edges.count


val pageRankFrame = graphFrame.pageRank.maxIter(5).run()
val ranked = pageRankFrame.vertices
ranked.printSchema()

val top3 = ranked.orderBy(ranked.col("pagerank").desc).take(3)

Can someone please have a look and let me know the reason for the same?

2 REPLIES 2

Hi,

One of my deployments is stuck due to this issue. It will be great if someone can have a look at this issue.

Thanks

Did you figure this out?