Hibernate - NullPointerException ao fazer query

Olá pessoal.

Estou tendo o seguinte erro com o Hibernate

no trecho de código

public List getListaAdmin(){
        listaAdmin.clear();
        Session session = HibernateUtility.getSession();
        Transaction trans = session.beginTransaction();
        try{
            Criteria criteria = session.createCriteria(Familia.class);
            listaAdmin = criteria.list();
            trans.commit();
        }
        catch(Exception e){
            addMessage("Erro ao obter lista de famílias");
        }
        return listaAdmin;
    }

Aqui está o stacktrace:

org.hibernate.tuple.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:372)
org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3232)
org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:237)
org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:174)
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:86)
org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:871)
org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:839)
org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
org.hibernate.type.EntityType.resolve(EntityType.java:303)
org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116)
org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
org.hibernate.loader.Loader.doQuery(Loader.java:717)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
org.hibernate.loader.Loader.doList(Loader.java:2145)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
org.hibernate.loader.Loader.list(Loader.java:2024)
org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
EixoPraticaDAO.FamiliaDAO.getListaAdmin(FamiliaDAO.java:297)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
javax.el.BeanELResolver.getValue(BeanELResolver.java:273)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:62)
com.sun.el.parser.AstValue.getValue(AstValue.java:117)
com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
javax.faces.component.UIData.getValue(UIData.java:582)
javax.faces.component.UIData.getDataModel(UIData.java:1061)
javax.faces.component.UIData.setRowIndex(UIData.java:417)
com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:85)
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
javax.faces.component.UIData.encodeBegin(UIData.java:878)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:828)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:883)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75) 

Já procurei em diversos fóruns…

Agradeço pela ajuda

Sem entra em detalhes mas NullPointerException, significa que esta retornando null sua query… faz um debug onde sai o resultado da query e analisa…

Abs

Descobri o que era… só colocar as libs do hibernate na pasta lib do appserver da sun e deu certo. Obrigada pela ajuda.

Não precisa de transação em query :)))

Me desculpe pessoal… postei no local errado…

Moderador… por favor apague meu post…

Obrigado