spring boot - org.apache.http.client.HttpResponseException: No authentication header supplied -


i configuring neo4j database spring boot. able setup spring boot , working fine. when configure neo4j throwing exception org.apache.http.client.httpresponseexception: no authentication header supplied.

log stash below:

2016-11-08 15:20:54.962  info 4932 --- [nio-8080-exec-1] o.s.web.servlet.dispatcherservlet        : frameworkservlet 'dispatcherservlet': initialization completed in 23 ms 2016-11-08 15:24:29.062  info 4932 --- [nio-8080-exec-2] o.n.o.drivers.http.request.httprequest   : thread: 27, url: http://localhost:7474/db/data/transaction/commit, request: {"statements":[{"statement":"match (user:user) user.id = {id} return user","parameters":{"id":"10"},"resultdatacontents":["graph"],"includestats":false}]} 2016-11-08 15:24:29.285  warn 4932 --- [nio-8080-exec-2] o.n.o.drivers.http.request.httprequest   : thread: 27, response: no authentication header supplied. 2016-11-08 15:24:29.288  info 4932 --- [nio-8080-exec-2] o.s.d.neo4j.config.neo4jconfiguration    : intercepted exception 2016-11-08 15:24:29.299 error 4932 --- [nio-8080-exec-2] o.a.c.c.c.[.[.[/].[dispatcherservlet]    : servlet.service() servlet [dispatcherservlet] in context path [] threw exception [request processing failed; nested exception org.neo4j.ogm.drivers.http.request.httprequestexception: http://localhost:7474/db/data/transaction/commit: no authentication header supplied.] root cause  org.apache.http.client.httpresponseexception: no authentication header supplied.     @ org.neo4j.ogm.drivers.http.request.httprequest.execute(httprequest.java:203) ~[neo4j-ogm-http-driver-2.0.5.jar:na]     @ org.neo4j.ogm.drivers.http.request.httprequest.executerequest(httprequest.java:168) ~[neo4j-ogm-http-driver-2.0.5.jar:na]     @ org.neo4j.ogm.drivers.http.request.httprequest.execute(httprequest.java:87) ~[neo4j-ogm-http-driver-2.0.5.jar:na]     @ org.neo4j.ogm.session.delegates.executequeriesdelegate.executeandmap(executequeriesdelegate.java:114) ~[neo4j-ogm-core-2.0.5.jar:na]     @ org.neo4j.ogm.session.delegates.executequeriesdelegate.query(executequeriesdelegate.java:87) ~[neo4j-ogm-core-2.0.5.jar:na]     @ org.neo4j.ogm.session.delegates.executequeriesdelegate.queryforobject(executequeriesdelegate.java:61) ~[neo4j-ogm-core-2.0.5.jar:na]     @ org.neo4j.ogm.session.neo4jsession.queryforobject(neo4jsession.java:363) ~[neo4j-ogm-core-2.0.5.jar:na]     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) ~[na:1.8.0_31]     @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) ~[na:1.8.0_31]     @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) ~[na:1.8.0_31]     @ java.lang.reflect.method.invoke(unknown source) ~[na:1.8.0_31]     @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:333) ~[spring-aop-4.3.3.release.jar:4.3.3.release]     @ org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java:190) ~[spring-aop-4.3.3.release.jar:4.3.3.release]     @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:157) ~[spring-aop-4.3.3.release.jar:4.3.3.release]     @ org.springframework.aop.support.delegatingintroductioninterceptor.doproceed(delegatingintroductioninterceptor.java:133) ~[spring-aop-4.3.3.release.jar:4.3.3.release]     @ org.springframework.aop.support.delegatingintroductioninterceptor.invoke(delegatingintroductioninterceptor.java:121) ~[spring-aop-4.3.3.release.jar:4.3.3.release]     @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) ~[spring-aop-4.3.3.release.jar:4.3.3.release]     @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:213) ~[spring-aop-4.3.3.release.jar:4.3.3.release]     @ com.sun.proxy.$proxy60.queryforobject(unknown source) ~[na:na] 

configuration class:

public class applicationconfiguration extends neo4jconfiguration{      @bean     public configuration getconfiguration(){         configuration config = new configuration();         config.driverconfiguration()             .setdriverclassname("org.neo4j.ogm.drivers.http.driver.httpdriver")             .seturi("http://neo4j:welcome*123@localhost:7474");         return config;     }      @bean     public sessionfactory getsessionfactory(){         return new sessionfactory(getconfiguration(), "com.ent.entity");     }      @bean     @scope(value = "session", proxymode = scopedproxymode.target_class)     public session getsession() throws exception{         return super.getsession();     } } 

spring boot has list of configuration properties, can set in "application.properties" file.

setting these might solve problem:

spring.data.neo4j.username=neo4j (default user)     spring.data.neo4j.password=neo4j (default password) 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -