Hello,
I am new to neo4j and I get the following error with my first program in
java with neo4j.
Exception in thread "main" org.neo4j.driver.v1.exceptions.ClientException:
Authentication token must contain: 'scheme : basic'
(ID:EED198F090FE487133CF552B3EECE6AE7E0E1F38FBB7E71323D46405404FF838)
at
org.neo4j.driver.internal.connector.socket.SocketResponseHandler.handleFailureMessage(SocketResponseHandler.java:68)
at
org.neo4j.driver.internal.messaging.PackStreamMessageFormatV1$Reader.unpackFailureMessage(PackStreamMessageFormatV1.java:456)
at
org.neo4j.driver.internal.messaging.PackStreamMessageFormatV1$Reader.read(PackStreamMessageFormatV1.java:417)
at
org.neo4j.driver.internal.connector.socket.SocketClient.receiveOne(SocketClient.java:129)
at
org.neo4j.driver.internal.connector.socket.SocketConnection.receiveOne(SocketConnection.java:135)
at
org.neo4j.driver.internal.connector.ConcurrencyGuardingConnection.receiveOne(ConcurrencyGuardingConnection.java:150)
at
org.neo4j.driver.internal.pool.PooledConnection.receiveOne(PooledConnection.java:142)
at
org.neo4j.driver.internal.InternalStatementResult.tryFetchNext(InternalStatementResult.java:303)
at
org.neo4j.driver.internal.InternalStatementResult.hasNext(InternalStatementResult.java:181)
at testone.testsub.main(testsub.java:20)
My code is as following:
package testone;
import org.neo4j.driver.v1.AuthTokens;
import org.neo4j.driver.v1.Config;
import org.neo4j.driver.v1.Driver;
import org.neo4j.driver.v1.GraphDatabase;
import org.neo4j.driver.v1.Record;
import org.neo4j.driver.v1.Session;
import org.neo4j.driver.v1.StatementResult;
public class testsub {
public static void main(String[] args) {
Driver driver = GraphDatabase.driver( "bolt://localhost",
Config.build().withEncryptionLevel( Config.EncryptionLevel.REQUIRED
).toConfig() );
System.out.println("Connection success");
Session session = driver.session();
session.run( "CREATE (a:Person {name:'Arthur', title:'King'})" );
StatementResult result = session.run( "MATCH (a:Person) WHERE a.name =
'Arthur' RETURN a.name AS name, a.title AS title" );
while ( result.hasNext() )
{
Record record = result.next();
System.out.println( record.get( "title" ).asString() + " " +
record.get("name").asString() );
}
session.close();
driver.close();
}
}
I hope you can help me with this problem and if there is a video or
tutorial that can help me to start working on neo4j with java.
Best regards,
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.