title: java.lang.NullPointerException at org.apache.jsp.WEB_002dINF.view.profilEtudiant_jsp._jspService
body: <p>I can't get my code working, the only clue I got is the warning about unchecked cast, but it seems to me that I can't be more precise ....</p>
  
  <p>I tried to put the <code>@SuppressWarnings (value="unchecked")</code> just above my code inside the <code>&lt;% %&gt;</code> but it didn't work...</p>
  
  <p>Here is the error log : </p>
  
  <pre><code>juin 22, 2016 4:25:34 AM org.apache.catalina.core.StandardWrapperValve invoke
  GRAVE: Servlet.service() for servlet [GroupeEleve] in context with path [/GAPP2] threw exception [
  An exception occurred processing JSP page /WEB-INF/view/profilEtudiant.jsp at line 668
  
  665:     &lt;tr&gt;
  666:     &lt;% 
  667:         Users U = (Users)session.getAttribute("user");
  668:         Set&lt;Absences&gt; A=(Set&lt;Absences&gt;)U.getAbsenceses();
  669          List&lt;Absences&gt; B = new ArrayList&lt;Absences&gt;(A);
  670:         for(int i=0;i&lt;B.size();i++){%&gt;
  671:             &lt;td&gt;&lt;%out.print(B.get(i).getDate()) ;%&gt;&lt;/td&gt;
  
  
  Stacktrace:] with root cause
  java.lang.NullPointerException
      at org.apache.jsp.WEB_002dINF.view.profilEtudiant_jsp._jspService(profilEtudiant_jsp.java:817)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
      at com.isep.controlleurs.GroupeEleve.doGet(GroupeEleve.java:46)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>