spring - No qualifying bean of type [javax.persistence.EntityManagerFactory] is defined -
trying spring data rest , spring data neo4j working.
here source: https://github.com/tony-landis/spring-data-neo4j-rest
running on jetty, starts ok on request log:
no qualifying bean of type [javax.persistence.entitymanagerfactory] defined</pre></p><h3>caused by:</h3><pre>org.springframework.beans.factory.nosuchbeandefinitionexception: no qualifying bean of type [javax.persistence.entitymanagerfactory] defined @ org.springframework.beans.factory.support.defaultlistablebeanfactory.getbean(defaultlistablebeanfactory.java:296) @ org.springframework.context.support.abstractapplicationcontext.getbean(abstractapplicationcontext.java:1125) @ org.springframework.orm.jpa.entitymanagerfactoryutils.findentitymanagerfactory(entitymanagerfactoryutils.java:114) @ org.springframework.orm.jpa.support.openentitymanagerinviewfilter.lookupentitymanagerfactory(openentitymanagerinviewfilter.java:229) @ org.springframework.orm.jpa.support.openentitymanagerinviewfilter.lookupentitymanagerfactory(openentitymanagerinviewfilter.java:205) @ org.springframework.orm.jpa.support.openentitymanagerinviewfilter.dofilterinternal(openentitymanagerinviewfilter.java:152) @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) @ org.eclipse.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1419) @ org.eclipse.jetty.servlet.servlethandler.dohandle(servlethandler.java:455) @ org.eclipse.jetty.server.handler.scopedhandler.handle(scopedhandler.java:137) @ org.eclipse.jetty.security.securityhandler.handle(securityhandler.java:557) @ org.eclipse.jetty.server.session.sessionhandler.dohandle(sessionhandler.java:231) @ org.eclipse.jetty.server.handler.contexthandler.dohandle(contexthandler.java:1075) @ org.eclipse.jetty.servlet.servlethandler.doscope(servlethandler.java:384) @ org.eclipse.jetty.server.session.sessionhandler.doscope(sessionhandler.java:193) @ org.eclipse.jetty.server.handler.contexthandler.doscope(contexthandler.java:1009) @ org.eclipse.jetty.server.handler.scopedhandler.handle(scopedhandler.java:135) @ org.eclipse.jetty.server.handler.contexthandlercollection.handle(contexthandlercollection.java:255) @ org.eclipse.jetty.server.handler.handlercollection.handle(handlercollection.java:154) @ org.eclipse.jetty.server.handler.handlerwrapper.handle(handlerwrapper.java:116) @ org.eclipse.jetty.server.server.handle(server.java:368) @ org.eclipse.jetty.server.abstracthttpconnection.handlerequest(abstracthttpconnection.java:488) @ org.eclipse.jetty.server.abstracthttpconnection.headercomplete(abstracthttpconnection.java:932) @ org.eclipse.jetty.server.abstracthttpconnection$requesthandler.headercomplete(abstracthttpconnection.java:994) @ org.eclipse.jetty.http.httpparser.parsenext(httpparser.java:640) @ org.eclipse.jetty.http.httpparser.parseavailable(httpparser.java:235) @ org.eclipse.jetty.server.asynchttpconnection.handle(asynchttpconnection.java:82) @ org.eclipse.jetty.io.nio.selectchannelendpoint.handle(selectchannelendpoint.java:628) @ org.eclipse.jetty.io.nio.selectchannelendpoint$1.run(selectchannelendpoint.java:52) @ org.eclipse.jetty.util.thread.queuedthreadpool.runjob(queuedthreadpool.java:608) @ org.eclipse.jetty.util.thread.queuedthreadpool$3.run(queuedthreadpool.java:543) @ java.lang.thread.run(thread.java:680)
well old question, had same error add answer.
this error happens because spring data neo4j doesn't provide implementation of openentitymanagerinviewfilter
. filter spring data jpa related only.
solution delete these lines "src/main/webapp/web-inf/web.xml":
<filter> <filter-name>openentitymanagerinviewfilter</filter-name> <filter-class>org.springframework.orm.jpa.support.openentitymanagerinviewfilter</filter-class> </filter> <filter-mapping> <filter-name>openentitymanagerinviewfilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
Comments
Post a Comment