You didn't provide auth information. I think the error message should be
more informative. (Nigel)

You can find more information here in the docs:

http://neo4j.com/docs/developer-manual/current/drivers/#driver-driver

Driver driver = GraphDatabase.driver( "bolt://localhost",
AuthTokens.basic("neo4j", "<pwd>"), ....


There are also other examples here:
https://neo4j.com/developer/java/#neo4j-java-driver

and an example application here:
https://github.com/neo4j-examples/neo4j-movies-java-bolt

On Thu, Aug 4, 2016 at 2:17 PM, Zaina <[email protected]> wrote:

> 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.
>

-- 
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.

Reply via email to