I'm getting the following error on Neo4JConfig Class when running the Web
App.
Caused by: java.lang.IllegalStateException: No thread-bound request found:
Are you referring to request attributes outside of an actual web request,
or processing a request outside of the originally receiving thread? If you
are actually operating within a web request and still receive this message,
your code is probably running outside of
DispatcherServlet/DispatcherPortlet: In this case, use
RequestContextListener or RequestContextFilter to expose the current
request.
at
org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131)
~[spring-web-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at
org.springframework.web.context.request.SessionScope.get(SessionScope.java:91)
~[spring-web-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:340)
~[spring-beans-4.2.8.RELEASE.jar:4.2.8.RELEASE]
... 75 common frames omitted
Neo4J Config Class
public class Neo4JConfig extends Neo4jConfiguration {
@Bean
public SessionFactory getSessionFactory() {
// with domain entity base package(s)
return new SessionFactory("....");
}
// needed for session in view in web-applications
@Bean
@Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS)
public Session getSession() throws Exception {
return super.getSession();
}
}
--
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.