title: weblogic 10.3.6, InvalidSession exception on first login
body: <p>I am receiving an InvalidSession exception when login to my JSF2 application that is deployed on weblogic 10.3.6, the exception is thrown randomly</p>
  
  <p>I've search on the net a lot about the issue but I didn't find anything, so please I want to know why this exception is thrown and how can I handle it or code a workaround for the exception to handle</p>
  
  <p>Stacktrace</p>
  
  <pre><code>&lt;Aug 14, 2012 2:07:36 PM GMT+02:00&gt; &lt;Error&gt; &lt;HTTP&gt; &lt;BEA-101020&gt; &lt;[ServletContext@32196770[app:SAMEAR module:SAMWeb path:/SAMWeb spec-version:2.5]] Servlet failed with Exception
  java.net.SocketException: Connection reset by peer: socket write error
      at java.net.SocketOutputStream.socketWrite0(Native Method)
      at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
      at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
      at weblogic.utils.io.ChunkedOutputStream.writeTo(ChunkedOutputStream.java:284)
      at weblogic.servlet.internal.ServletOutputStreamImpl.writeHeader(ServletOutputStreamImpl.java:167)
      Truncated. see log file for complete stacktrace
  &gt; 
  &lt;Aug 14, 2012 2:07:36 PM GMT+02:00&gt; &lt;Notice&gt; &lt;Diagnostics&gt; &lt;BEA-320068&gt; &lt;Watch 'UncheckedException' with severity 'Notice' on server 'AdminServer' has triggered at Aug 14, 2012 2:07:36 PM GMT+02:00. Notification details: 
  WatchRuleType: Log 
  WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802')) 
  WatchData: DATE = Aug 14, 2012 2:07:36 PM GMT+02:00 SERVER = AdminServer MESSAGE = [ServletContext@32196770[app:SAMEAR module:SAMWeb path:/SAMWeb spec-version:2.5]] Servlet failed with Exception
  java.net.SocketException: Connection reset by peer: socket write error
      at java.net.SocketOutputStream.socketWrite0(Native Method)
      at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
      at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
      at weblogic.utils.io.ChunkedOutputStream.writeTo(ChunkedOutputStream.java:284)
      at weblogic.servlet.internal.ServletOutputStreamImpl.writeHeader(ServletOutputStreamImpl.java:167)
      at weblogic.servlet.internal.ResponseHeaders.writeHeaders(ResponseHeaders.java:444)
      at weblogic.servlet.internal.ServletResponseImpl.writeHeaders(ServletResponseImpl.java:1288)
      at weblogic.servlet.internal.ServletOutputStreamImpl.sendHeaders(ServletOutputStreamImpl.java:281)
      at weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:118)
      at weblogic.servlet.internal.ServletResponseImpl.sendRedirect(ServletResponseImpl.java:893)
      at weblogic.servlet.security.internal.FormSecurityModule.processJSecurityCheck(FormSecurityModule.java:334)
      at weblogic.servlet.security.internal.FormSecurityModule.checkUserPerm(FormSecurityModule.java:213)
      at weblogic.servlet.security.internal.FormSecurityModule.checkAccess(FormSecurityModule.java:96)
      at weblogic.servlet.security.internal.ServletSecurityManager.checkAccess(ServletSecurityManager.java:82)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2209)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
   SUBSYSTEM = HTTP USERID = &lt;WLS Kernel&gt; SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = 00IT8T83D TXID =  CONTEXTID = 43d101969fafeaf3:78b99118:13924e1c932:-8000-0000000000000991 TIMESTAMP = 1344946056374  
  WatchAlarmType: AutomaticReset 
  WatchAlarmResetPeriod: 30000 
  &gt; 
  &lt;Aug 14, 2012 2:07:36 PM GMT+02:00&gt; &lt;Warning&gt; &lt;javax.enterprise.resource.webcontainer.jsf.context&gt; &lt;BEA-000000&gt; &lt;JSF1091: No mime type could be found for file error_128_128.png.  To resolve this, add a mime-type mapping to the applications web.xml.&gt; 
  &lt;Aug 14, 2012 2:07:36 PM GMT+02:00&gt; &lt;Warning&gt; &lt;javax.enterprise.resource.webcontainer.jsf.context&gt; &lt;BEA-000000&gt; &lt;JSF1091: No mime type could be found for file error_128_128.png.  To resolve this, add a mime-type mapping to the applications web.xml.&gt; 
  &lt;Aug 14, 2012 2:07:36 PM GMT+02:00&gt; &lt;Error&gt; &lt;HTTP&gt; &lt;BEA-101020&gt; &lt;[ServletContext@32196770[app:SAMEAR module:SAMWeb path:/SAMWeb spec-version:2.5]] Servlet failed with Exception
  java.lang.IllegalStateException: HttpSession is invalid
      at weblogic.servlet.internal.session.SessionData.getInternalAttribute(SessionData.java:759)
      at weblogic.servlet.internal.session.SessionData.getInternalAttribute(SessionData.java:754)
      at weblogic.servlet.security.internal.FormSecurityModule.processJSecurityCheck(FormSecurityModule.java:287)
      at weblogic.servlet.security.internal.FormSecurityModule.checkUserPerm(FormSecurityModule.java:213)
      at weblogic.servlet.security.internal.FormSecurityModule.checkAccess(FormSecurityModule.java:96)
      Truncated. see log file for complete stacktrace
  </code></pre>