Announcement Announcement Module
Collapse
No announcement yet.
exception when using openSessionInViewInterceptor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • exception when using openSessionInViewInterceptor

    Hi,
    Has anybody ran into the exception shown below ?
    I am starting a new spring web mvc project using latest spring and hibernate. Whether I use interceptor or filter for openSessionInView for holding hibernate sessions, I get the same error. I looked at the spring code and all seem fine yet the exception is thrown. Any help is appreciated. Thanks.
    Code:
    <bean name="openSessionInViewInterceptor" class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor"
        p:sessionFactory-ref="sessionFactory" />
    
      <bean id="handlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <property name="interceptors">
          <list>
            <ref bean="openSessionInViewInterceptor" />
          </list>
        </property>
        .
        .
        .
    Each time I access any of the configures URL mappings, I get this exception.

    Code:
    java.lang.NoSuchFieldError: MANUAL
    	at org.springframework.orm.hibernate3.HibernateAccessor.applyFlushMode(HibernateAccessor.java:339)
    	at org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor.preHandle(OpenSessionInViewInterceptor.java:157)
    	at org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter.preHandle(WebRequestHandlerInterceptorAdapter.java:54)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:814)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:769)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:613)
    	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:525)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
    	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
    	at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    	at java.lang.Thread.run(Thread.java:619)

  • #2
    exceptions like nosuchfield or nosuchmethod, generally have to do with outdates libraries. first thing to try is updating all your spring and hibernate jar files.

    Comment


    • #3
      FlushMod.MANUAL

      Yes indeed. I forced myself and revisited hibernate and spring jar files. Once I updated to hibernate 3.2.x, the problem went away. the hibernate3.0.jar file I was using came from the latest hibernate release from their website. The problem is solved now. Thanks for your help.

      Comment

      Working...
      X