[jboss-user] [JBoss jBPM] - LazyInitializationException with ExtensionsFilter

DerJohannes do-not-reply at jboss.com
Tue Aug 1 12:50:19 EDT 2006


I am still stuck in this problem:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=87720

Although I learned much about Filters and  the web.xml deployment descriptor in the last few days, i do not get the jBPM Starter's Kit to work after inserting the following entry into web.xml:

  
    <filter-name>ExtensionsFilter</filter-name>
    <filter-class>
      org.apache.myfaces.component.html.util.ExtensionsFilter
    </filter-class>
  
  <filter-mapping>
    <filter-name>ExtensionsFilter</filter-name>    
    <servlet-name>FacesServlet</servlet-name>
  </filter-mapping> 

(Although this is the way recommended under
http://www.onjava.com/pub/a/onjava/2005/07/13/jsfupload.html?page=2  )

No matter, in which order I put the filter-mappings, no matter if I use a <servlet-name>-mapping or an <url-pattern>-mapping, no matter if I map the ExtensionsFilter before the FacesServlet or after it, to "/*" or to a certain .jsp-page (even if i map it to a jsp that is not accessed at all!)...
...the Hibernate session gets closed mysteriosly, and I get the following error:

18:36:32,274 ERROR [LazyInitializationException] could not initialize proxy - the owning Session was closed
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
        at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:56)
        at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
        at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:133)
        at org.jbpm.taskmgmt.exe.TaskInstance$$EnhancerByCGLIB$$c63bf161.getTaskMgmtInstance()
        at org.jbpm.JbpmContext.save(JbpmContext.java:297)


If I've understood it right, theoretically, every request passes the chain of filters described in web.xml in the order they appear resp. in the order the filter mappings are defined.

Theoretically, the org.apache.myfaces.component.html.util.ExtensionsFilter only applies its filter if the request is of the type enctype="multipart/form-data". So there should be no problem if the form hasn't the attribute enctype="multipart/form-data". 

But the JSF application keeps on crashing, no matter what I do.

Can anyone give me a hint how I can integrate a file upload possibility into the Starter's Kit Example? It does not have to be commons-fileupload...

Why doesn't jBPM/Hibernate like the ExtensionFilter?

Any help would be highly appreciated.

Johannes

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962240#3962240

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962240



More information about the jboss-user mailing list