Note that there are some explanatory texts on larger screens.

plurals
  1. POJCR session closed by container causes duplicate attempt to close session
    primarykey
    data
    text
    <p>In my EJB I use a JCR session to store a File. I then logout of the session and throw a CDI event. The EJB which observes the CDI event then creates a new JCR session in which it wants to use the stored file. (Note: I had to add a delay in order to get this to work because for some reason the file wasn't available directly after storing it). After the method is done with using the file I also logout of this session. However after 15 minutes I get the exception "Attempt to close session-a84d60ac-1c8f-4cad-bc5a-84102b12f8e5-385 after it has already been closed." with stacktrace :</p> <pre><code>Stack trace of the duplicate attempt to close session-c7bc3b30-9a5f-4922-bf80-8f197c583370-389 at org.apache.jackrabbit.core.session.SessionState.close(SessionState.java:280) ~[jackrabbit-core-2.4.2.jar:na] at org.apache.jackrabbit.core.SessionImpl.logout(SessionImpl.java:943) [jackrabbit-core-2.4.2.jar:na] at org.apache.jackrabbit.core.XASessionImpl.logout(XASessionImpl.java:392) [jackrabbit-core-2.4.2.jar:na] at org.apache.jackrabbit.jca.JCAManagedConnection.cleanup(JCAManagedConnection.java:169) [jackrabbit-jca-2.4.2.jar:na] at ... </code></pre> <p>and after 1 hour :</p> <pre><code>Unclosed session detected. The session was opened here: java.lang.Exception: Stack Trace at org.apache.jackrabbit.core.SessionImpl.&lt;init&gt;(SessionImpl.java:222) ~[jackrabbit-core-2.4.2.jar:na] at org.apache.jackrabbit.core.SessionImpl.&lt;init&gt;(SessionImpl.java:239) ~[jackrabbit-core-2.4.2.jar:na] at org.apache.jackrabbit.core.XASessionImpl.&lt;init&gt;(XASessionImpl.java:99) ~[jackrabbit-core-2.4.2.jar:na] at ... </code></pre> <p>I believe this is because the application server (Glassfish v.3.1.2.2) tries to close the session I already closed. But when I don't close any sessions, I also get an exception where it says that the pool size limit is reached. How can I avoid my problem?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload