Listagem com dataTable

Pessoal estou com a seguinte duvida,

Tenho uma datatable que lista os meus usuarios cadastrados, mas percebo que ele só lista se estiver na sessão. Tipo, se eu cadastrar e listar eles substitui todas as linhas anteriores por meu usuairo inserido no momento. Se eu não cadastrar ele mostra as linhas em branco. As linhas em branco que falo são as linhas que cadastrei das vezes anteriores.

Alguem sabe decifrar esta?

Grato!

posta o faces-config e o bean.

Segue o managed bean:

[code]public class UsuarioBean {

private Usuario usuario;
private Endereco endereco;
private Login login;
@SuppressWarnings("unchecked")
private UsuarioDAOImpl usuarioDaoImpl;
@SuppressWarnings("unused")
private String resultado;
private List<Usuario> usuarios;

//getrs e setrs...

public String limparCampos() {
	usuario.setId(null);
	usuario.setNome("");
	usuario.setTelefone("");
	usuario.setIdade(null);
	usuario.setDataNascimento(null);
	endereco.setRua("");
	endereco.setNumero(null);
	endereco.setCep("");
	endereco.setBairro("");
	endereco.setCidade("");
	endereco.setPais("");
	login.setId(null);
	login.setNomeLogin("");
	login.setSenha(null);
	return "Sucesso";
}

@SuppressWarnings("unchecked")
public String salvar() {
	endereco.setUsuario(usuario);
	login.setUsuario(usuario);
	usuario.setEndereco(new HashSet<Endereco>());
	usuario.getEndereco().add(endereco);
	try {
		usuarioDaoImpl.salvar(usuario);
		resultado = "Sucesso";
	} catch (Exception e) {
		resultado = "Insucesso";
		e.printStackTrace();
	}
	return resultado;
}

@SuppressWarnings("unchecked")
public String atualizar() {
	endereco.setUsuario(usuario);
	login.setUsuario(usuario);
	usuario.setEndereco(new HashSet<Endereco>());
	usuario.getEndereco().add(endereco);
	try {
		usuarioDaoImpl.salvarOuAtualizar(usuario);
		resultado = "Sucesso";
	} catch (Exception e) {
		resultado = "Insucesso";
		e.printStackTrace();
	}
	return resultado;
}

@SuppressWarnings("unchecked")
public List<Usuario> getUsuarios() {
	usuarios = new ArrayList<Usuario>();
	usuarios = usuarioDaoImpl.listar();
	return usuarios;
}

}[/code]

Segue o applicationContext.xml:

[code]<?xml version="1.0" encoding="UTF-8"?>

<aop:aspectj-autoproxy />

<!-- DECLARAÇÃO DO MANAGED BEAN -->
<bean id="usuario" class="br.com.projetobase.modelo.Usuario"/>
<bean id="login" class="br.com.projetobase.modelo.Login"/>
<bean id="endereco" class="br.com.projetobase.modelo.Endereco"/>
<bean id="usuarioDaoImpl" class="br.com.projetobase.dao.UsuarioDAOImpl"/>
<bean id="usuarioBean" class="br.com.projetobase.bean.UsuarioBean" scope="session">
	<property name="usuario" ref="usuario" />
	<property name="login" ref="login" />
	<property name="endereco" ref="endereco" />
	<property name="usuarioDaoImpl" ref="usuarioDaoImpl" />
</bean>

[/code]

Pessoal uma luz no fim do tunel, o que vocês acham?

[code] Nome: Anderson Matos Bonavides

Telefone: (83)32233895

Idade: 29

Data de Nascimento: 2009-03-12

Login: anderson.bonavides

Senha: 1234
79593 [btpool0-0] ERROR org.hibernate.LazyInitializationException - failed to l
azily initialize a collection of role: br.com.projetobase.modelo.Usuario.enderec
o, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collect
ion of role: br.com.projetobase.modelo.Usuario.endereco, no session or session w
as closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitia
lizationException(AbstractPersistentCollection.java:380)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitia
lizationExceptionIfNotConnected(AbstractPersistentCollection.java:372)
at org.hibernate.collection.AbstractPersistentCollection.initialize(Abst
ractPersistentCollection.java:365)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPe
rsistentCollection.java:108)
at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:27
2)
at br.com.projetobase.dao.GenericDAOImpl.listar(GenericDAOImpl.java:76)
at br.com.projetobase.bean.UsuarioBean.getUsuarios(UsuarioBean.java:114)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELRe
solver.java:58)
at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)

    at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.ja

va:71)
at javax.faces.component.UIData.getValue(UIData.java:584)
at org.ajax4jsf.component.UIDataAdaptor.getValue(UIDataAdaptor.java:1644
)
at org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataA
daptor.java:65)
at org.ajax4jsf.component.SequenceDataAdaptor.createDataModel(SequenceDa
taAdaptor.java:59)
at org.richfaces.component.UIDataTable.createDataModel(UIDataTable.java:
125)
at org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdapt
or.java:621)
at org.ajax4jsf.component.UIDataAdaptor.setRowKey(UIDataAdaptor.java:339
)
at org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(Ab
stractTableRenderer.java:124)
at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTabl
eRenderer.java:206)
at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTabl
eRenderer.java:194)
at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101
)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.jav
a:810)
at javax.faces.component.UIData.encodeBegin(UIData.java:880)
at org.ajax4jsf.component.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:1
220)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(Re
ndererUtils.java:513)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.re
nderChildren(HtmlGridRendererBase.java:231)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.en
codeEnd(HtmlGridRendererBase.java:102)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
848)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286
)
at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:
262)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRend
erer.java:220)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRend
erer.java:215)
at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:
121)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.
java:828)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:883)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.jav
a:592)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWra
pper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.j
ava:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePha
se.java:108)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487
)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1093)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

    at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
    at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFil

ter.java:390)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
60)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
26)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand

lerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
52)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
5)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpCo
nnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
ava:488)
LANCOU EXCECAO!!!
org.hibernate.LazyInitializationException: failed to lazily initialize a collect
ion of role: br.com.projetobase.modelo.Usuario.endereco, no session or session w
as closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitia
lizationException(AbstractPersistentCollection.java:380)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitia
lizationExceptionIfNotConnected(AbstractPersistentCollection.java:372)
at org.hibernate.collection.AbstractPersistentCollection.initialize(Abst
ractPersistentCollection.java:365)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPe
rsistentCollection.java:108)
at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:27
2)
at br.com.projetobase.dao.GenericDAOImpl.listar(GenericDAOImpl.java:76)
at br.com.projetobase.bean.UsuarioBean.getUsuarios(UsuarioBean.java:114)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELRe
solver.java:58)
at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)

    at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.ja

va:71)
at javax.faces.component.UIData.getValue(UIData.java:584)
at org.ajax4jsf.component.UIDataAdaptor.getValue(UIDataAdaptor.java:1644
)
at org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataA
daptor.java:65)
at org.ajax4jsf.component.SequenceDataAdaptor.createDataModel(SequenceDa
taAdaptor.java:59)
at org.richfaces.component.UIDataTable.createDataModel(UIDataTable.java:
125)
at org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdapt
or.java:621)
at org.ajax4jsf.component.UIDataAdaptor.setRowKey(UIDataAdaptor.java:339
)
at org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(Ab
stractTableRenderer.java:124)
at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTabl
eRenderer.java:206)
at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTabl
eRenderer.java:194)
at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101
)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.jav
a:810)
at javax.faces.component.UIData.encodeBegin(UIData.java:880)
at org.ajax4jsf.component.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:1
220)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(Re
ndererUtils.java:513)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.re
nderChildren(HtmlGridRendererBase.java:231)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.en
codeEnd(HtmlGridRendererBase.java:102)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
848)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286
)
at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:
262)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRend
erer.java:220)
at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRend
erer.java:215)
at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:
121)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.
java:828)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:883)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.jav
a:592)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWra
pper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.j
ava:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePha
se.java:108)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487
)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1093)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

    at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
    at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFil

ter.java:390)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
60)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
26)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand

lerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
52)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
5)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpCo
nnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
ava:488)
79656 [btpool0-0] WARN org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRe
ndererBase - PanelGrid j_id38 has not enough children. Child count should be a
multiple of the columns attribute.
[/code]

Caro Ánderson Bonnavides por acaso o senhora ja procurou no Google ou na Documentação do Hibernate ou até mesmo no próprio guj?

Indicates access to unfetched data outside of a session context. For example, when an uninitialized proxy or collection is accessed after the session was closed.

http://www.hibernate.org/hib_docs/v3/api/org/hibernate/LazyInitializationException.html

Tem alguns post aqui que possuem problemas como o seu segue os links.

http://www.guj.com.br/posts/list/50093.java

http://www.guj.com.br/posts/list/83773.java

http://www.guj.com.br/posts/list/28666.java

outro link http://www.devmedia.com.br/articles/viewcomp.asp?comp=2986