Git Product home page Git Product logo

Comments (5)

jbrisbin avatar jbrisbin commented on August 19, 2024

The OpenEntityManagerInViewInterceptor is supposed to make sure a session is open until the object is rendered, but maybe the way it's set up currently isn't catching this case.

Let me ask some of the other data guys and see what they think...

from spring-data-rest.

jbrisbin avatar jbrisbin commented on August 19, 2024

Can we get a fuller stacktrace? I need to see where this is occurring specifically within the lifecycle of the exporter.

from spring-data-rest.

jhiemer avatar jhiemer commented on August 19, 2024

I will send it to you via email!

from spring-data-rest.

jbrisbin avatar jbrisbin commented on August 19, 2024

I suspect this is due to OpenEntityManagerInViewInterceptor not being registered in the MVC HandlerAdapater. Until I get a fix for that in master, you might try adding back in the OpenEntityManagerInViewFilter that was in there originally:

<filter>
  <filter-name>entityManagerInViewFilter</filter-name>
  <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
</filter>

<filter-mapping>
  <filter-name>entityManagerInViewFilter</filter-name>
  <servlet-name>exporter</servlet-name>
</filter-mapping>

from spring-data-rest.

jhiemer avatar jhiemer commented on August 19, 2024

Adding this results in:

java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
    org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:90)
    org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.lookupEntityManagerFactory(OpenEntityManagerInViewFilter.java:183)
    org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.lookupEntityManagerFactory(OpenEntityManagerInViewFilter.java:170)
    org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:128)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

from spring-data-rest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.