Erro 500 Jsf 2.0 + prime faces

8 respostas
J

Galera to iniciando o estudo com Jsf…2.0 e to com dificuldade nesse erro não consigo achar…agradeço a todos que ajudarem vlw

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: null source
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:321)

root cause

java.lang.IllegalArgumentException: null source
	java.util.EventObject.<init>(Unknown Source)
	javax.faces.event.SystemEvent.<init>(SystemEvent.java:67)
	javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:69)
	javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:69)
	com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:256)
	com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:245)
	com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
	com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
	com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.
Apache Tomcat/6.0.26

To usando Eclipse 3.5 ai so troquei os web.xml e faces Config
…tava usando o Helios mais tava travando demais

abraços

8 Respostas

P

Olá,

estou com o mesmo problema …

Se puder me ajudar …

abs

Dapcapix

Impossível esse erro.

Não consegui achar a causa.

]exception 

javax.servlet.ServletException: javax.servlet.ServletException: null source
	br.com.teste.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:44)


root cause 

javax.servlet.ServletException: null source
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:323)
	br.com.teste.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:31)


root cause 

java.lang.IllegalArgumentException: null source
	java.util.EventObject.<init>(Unknown Source)
	javax.faces.event.SystemEvent.<init>(SystemEvent.java:67)
	javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:69)
	javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:69)
	com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:256)
	com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:245)
	com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
	com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
	com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:310)
	br.com.teste.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:31)
Dapcapix

Esqueci de colocar a classe ConexaoHibernateFilter.

Segue...
public class ConexaoHibernateFilter implements Filter { 


        private SessionFactory sf; 


        @Override 
        public void init(FilterConfig config) throws ServletException { 
                // TODO Auto-generated method stub 
                this.sf = HibernateUtil.getSessionFactory(); 
        } 


        @Override 
        public void doFilter(ServletRequest servletRequest, 
                        ServletResponse servletResponse, FilterChain chain) 
                        throws IOException, ServletException { 
                try { 
                        this.sf.getCurrentSession().beginTransaction(); 
                        chain.doFilter(servletRequest, servletResponse); 
                        this.sf.getCurrentSession().getTransaction().commit(); 
                        this.sf.getCurrentSession().close(); 
                } catch (Throwable ex) { 
                        try { 
                                if (this.sf.getCurrentSession().getTransaction().isActive()) { 
                                        this.sf.getCurrentSession().getTransaction().rollback(); 
                                } 
                        } catch (Throwable t) { 
                                t.printStackTrace(); 
                        } 
                        throw new ServletException(ex); 
                } 
        } 


        @Override 
        public void destroy() { 
                // TODO Auto-generated method stub 


        } 



}
benignoms

Colocastes todos os jars?

Dapcapix

Eu pensei que poderia ser por causa dos Jars. Mas acredito que coloquei todos.

H

cara acredito que seja o servidor eu tive esse problema troquei para o glassfish funcionou se não me engano é porque o toncat 6 não suporta servlets 3

espero ter ajudado

abraços

A

Uso o Tomcat7 e estou passando pelo mesmo problema…

H

eu estou usando o glassfish porem não usei o tomcat 7 só o 6 e por isso dava problema

abraços!

Criado 15 de setembro de 2010
Ultima resposta 4 de fev. de 2011
Respostas 8
Participantes 6