List NullPointerException Hibernate : <p>I having a error with my hibernate project. It gives me a NullPointerException when counts the size of my list(null) cause it breaks when doing the Query and doesnt set the 2 parameters that i pass, when i doint just with one parameter works perfectly. 
Thanks in advanced! Helppppp meeee! ahah
I will show you:</p>

<p>AlertsHelper</p>

<pre><code>public List getAlertsList(int level, String Process) 
{
    List&lt;Dtalerts&gt; list = null;
    try 
    {
            if(!this.session.isOpen()){
                this.iniciarConexion();
            }
        Query q = session.createQuery("from Dtalerts as dtalerts where  dtalerts.level = :level AND dtalerts.Process = :Process");
        //q.setParameter("Fh_alert", Fh_alert);
        q.setParameter("level", level);
        q.setParameter("Process", Process);
        list = (List&lt;Dtalerts&gt;) q.list();
    } catch (Exception ex) 
    {
        System.out.println("Excepcion " + ex);
        ex.printStackTrace();
    }
    return list;
}
</code></pre>

<p>Jsp</p>

<pre><code>&lt;%
    if(request.getParameter("level")!=null){
    int level = Integer.parseInt(request.getParameter("level"));
    String Process = request.getParameter("Process");
    AlertsHelper helper = new AlertsHelper();
    List alertList = helper.getAlertsList(level, Process);
    out.print("&lt;table border='1'&gt;");
    out.print("&lt;tr&gt;&lt;th&gt;Level&lt;/th&gt;&lt;th&gt;Process&lt;/th&gt;&lt;/tr&gt;");
    for(int i = 0; i &lt;alertList.size(); i++){
    Dtalerts alerts = (Dtalerts) alertList.get(i);
    Id = alerts.getId();
    level = alerts.getLevel();
    Process = alerts.getProcess();
    String Description = alerts.getDescription();
    out.print("&lt;td&gt;&lt;a href='javascript:mostrarDatos(" + level + ",\"" + Process + ")'&gt;Seleccionar&lt;/a&gt;&lt;/td&gt;");
    out.print("&lt;tr&gt;");
    out.print("&lt;td&gt;" + level + "&lt;/td&gt;");
    out.print("&lt;td&gt;" + Process + "&lt;/td&gt;");
    out.print("&lt;td&gt;" + Description + "&lt;/td&gt;");
    out.print("&lt;td&gt;" + Id + "&lt;/td&gt;");
    out.print("&lt;/tr&gt;");
    }
    out.print("&lt;/table&gt;");
    }else{
    out.print("introduce un id");
    }%&gt;
    &lt;/form&gt;
</code></pre>
