An Error Occurred:

/basicthemeselector/home-selector.xhtml @6,99 template="file:///websystems-theme/#{SiteFace.selectedTheme}/home.xhtml" javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting invoke lifecycle method public void br.com.escriba.websystems.web.faces.SiteFace.inicializar()

+ Stack Trace

com.sun.facelets.tag.TagAttributeException: /basicthemeselector/home-selector.xhtml @6,99 template="file:///websystems-theme/#{SiteFace.selectedTheme}/home.xhtml" javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting invoke lifecycle  method public void br.com.escriba.websystems.web.faces.SiteFace.inicializar()
	at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:235)
	at com.sun.facelets.tag.TagAttribute.getValue(TagAttribute.java:200)
	at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
	at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
	at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
	at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
	at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
	at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
	at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)
	at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
	at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
	at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
	at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
	at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
	at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at br.com.escriba.webcomponents.fileupload.UploadFilter.doFilter(UploadFilter.java:65)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at br.com.escriba.websystems.web.servlet.filter.ProcessaManutencaoFilter.run(ProcessaManutencaoFilter.java:63)
	at java.lang.Thread.run(Thread.java:619)
Caused by: javax.faces.FacesException: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting invoke lifecycle  method public void br.com.escriba.websystems.web.faces.SiteFace.inicializar()
	at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:537)
	at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82)
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
	at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
	at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:86)
	at com.sun.el.parser.AstValue.getValue(AstValue.java:127)
	at com.sun.el.parser.AstDeferredExpression.getValue(AstDeferredExpression.java:59)
	at com.sun.el.parser.AstCompositeExpression.getValue(AstCompositeExpression.java:64)
	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
	at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:233)
	... 26 more
Caused by: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting invoke lifecycle  method public void br.com.escriba.websystems.web.faces.SiteFace.inicializar()
	at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:340)
	at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:527)
	... 36 more
Caused by: com.sun.enterprise.InjectionException: Exception attempting invoke lifecycle  method public void br.com.escriba.websystems.web.faces.SiteFace.inicializar()
	at com.sun.faces.vendor.GlassFishInjectionProvider.invokeLifecycleMethod(GlassFishInjectionProvider.java:288)
	at com.sun.faces.vendor.GlassFishInjectionProvider.invokePostConstruct(GlassFishInjectionProvider.java:201)
	at com.sun.faces.vendor.GlassFishInjectionProvider.invokePostConstruct(GlassFishInjectionProvider.java:122)
	at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:327)
	... 37 more
Caused by: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.faces.vendor.GlassFishInjectionProvider.invokeLifecycleMethod(GlassFishInjectionProvider.java:271)
	... 40 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor774.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.faces.vendor.GlassFishInjectionProvider$1.run(GlassFishInjectionProvider.java:277)
	... 42 more
Caused by: javax.ejb.EJBException
	at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:3894)
	at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3794)
	at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3596)
	at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1379)
	at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
	at $Proxy213.getModelos(Unknown Source)
	at br.com.escriba.websystems.web.faces.SiteFace.getModelos(SiteFace.java:529)
	at br.com.escriba.websystems.web.faces.SiteFace.inicializar(SiteFace.java:80)
	... 46 more
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
	at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:630)
	at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:75)
	at br.com.escriba.servercomponents.ejb.EscribaAbstractSessionBean.getPureList(EscribaAbstractSessionBean.java:89)
	at br.com.escriba.websystems.session.SiteSessionBean.getModelos(SiteSessionBean.java:618)
	at sun.reflect.GeneratedMethodAccessor775.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
	at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
	at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2920)
	at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4011)
	at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
	... 50 more
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
	at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
	at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
	at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
	at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
	at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
	at org.hibernate.loader.Loader.doQuery(Loader.java:673)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
	at org.hibernate.loader.Loader.doList(Loader.java:2220)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
	at org.hibernate.loader.Loader.list(Loader.java:2099)
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
	at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:66)
	... 60 more
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
	at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115)
	at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
	at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
	... 74 more

+ Component Tree

<PartialTraversalViewRootImpl locale="pt_BR" renderKitId="HTML_BASIC" rendered="true" transient="false" viewId="/home.xhtml"/>

+ Scoped Variables

Request Parameters
NameValue
None
Request Attributes
NameValue
None
Session Attributes
NameValue
None
Application Attributes
NameValue
None
16/01/2017 14:56:23 - Generated by Facelets