Pessoal estou tendo um grande problema que estou custando a resolver. Estou desenvolvendo um sistema WEB usando RichFaces + GlassFish + JPA e SQLServer.
A pagina funciona perfeitamente, como logica de navegação e tudo mais, mas entretanto esta me retornando o seguinte erro que faz com que os componentes do RichFaces não fiquem com skins padrão dele, mais não sei como resolver.
StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: Error decode resource data
StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: Error decode resource data
at org.ajax4jsf.resource.ResourceBuilderImpl.decrypt(ResourceBuilderImpl.java:627)
at org.ajax4jsf.resource.ResourceBuilderImpl.getResourceDataForKey(ResourceBuilderImpl.java:369)
at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:156)
at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: java.util.zip.DataFormatException: unknown compression method
at java.util.zip.Inflater.inflateBytes(Native Method)
at java.util.zip.Inflater.inflate(Inflater.java:223)
at java.util.zip.Inflater.inflate(Inflater.java:240)
at org.ajax4jsf.resource.ResourceBuilderImpl.decrypt(ResourceBuilderImpl.java:621)
[size=18]Pagina de cabecalho[/size]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Document : CabecalhoTop
Created on : 26/06/2009, 13:43:17
Author : paulo
-->
<div style="height: 200px; width: 100%; -rave-layout: grid"
xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">
<f:subview id="Cabecalho1">
<h:panelGrid columns="1" id="topgrid" style="position: center; width: 100%">
<h:graphicImage height="48" id="image1" style="left: 0px; top: 0px; position: absolute; width: 100%"
value="/resources/imagens/masthead-background.jpg" alt="" />
<rich:toolBar height="37" id="menu"
style="left: 0px; top: 50px; position: absolute; width: 100%" >
<rich:toolBarGroup id="toolBarGroupPrincipal">
<h:panelGroup>
<h:panelGroup>
<h:commandLink id="hip" action="#{cabecalhoBean.listagemPontos}">
<h:graphicImage value="/img/shell/icon_add_shelf.png" width="37" height="23" alt="" />
</h:commandLink>
<h:commandLink id="hiperlink" action="#{cabecalhoBean.listagemPontos}">
<h:graphicImage value="/img/shell/icon_add_shelf.png" width="37" height="23" alt="" />
</h:commandLink>
<h:commandLink id="hiperlink1" action="#{cabecalhoBean.listagemPontos}">
<h:graphicImage value="/img/shell/icon_add_shelf.png" width="37" height="23" alt="" />
</h:commandLink>
</h:panelGroup>
</h:panelGroup>
</rich:toolBarGroup>
</rich:toolBar>
</h:panelGrid>
</f:subview>
</div>
[size=18]Pagina de login[/size]
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="a4j"uri="http://richfaces.org/a4j"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%--
This file is an entry point for JavaServer Faces application.
--%>
<f:view>
<style type="text/css">
div#container
{
width: 100%;
position: relative;
margin-top: 100px;
margin-left: auto;
margin-right: auto;
/* background-image:url(../resources/images/fundo2.jpg);*/
}
body
{
text-align: center;
margin: 0;
}
tableqq
{
width: 100%;
height: 100%;
position: absolute;
top:100px;
left:0px;
}
</style>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Login</title>
</head>
<body>
<h:form>
<div id="top" style="height: 46px; left: 0px; top: 0px; position: absolute; width: 100%">
<jsp:directive.include file="WEB-INF/jspf/Cabecalho.jspf"/>
</div>
</h:form>
<h:panelGroup id="modalPanels" layout="block" style=" margin-left:-160px; height: 100%; left: 50%; top: 25%; position: absolute; width: 320px">
<h:form binding="#{login.formLogin}">
<h:panelGrid id="panelGridLogin" columns="1" style="width: 100%; text-align:center;" >
<rich:spacer width="1" height="50"/>
<rich:panel style="width:320px;" id="panelLogin" >
<f:facet name="header">
<h:outputText value="Login"> </h:outputText>
</f:facet>
<h:panelGrid columns="2" columnClasses="ggg" id="panelGridCamposLogin"
style="margin-left:auto; margin-right:auto; width: 100%; text-align:center;" >
<h:outputText value="Usuário: " />
<h:inputText binding="#{login.txtUsuario}" />
<h:outputText value="Senha : " />
<h:inputSecret binding="#{login.txtSenha}"/>
</h:panelGrid>
<h:panelGrid columns="2" id="panelGridBotoes" style="margin-left:auto; margin-right:auto;">
<h:panelGroup layout="block">
<h:commandButton id="btnLogin" value="Login" binding="#{login.btnLogin}" action="#{login.validaUsuario}" />
</h:panelGroup>
<h:panelGroup layout="block">
<h:commandButton value="Limpar" id="btnLimpar" binding="#{login.btnLimpar}" />
</h:panelGroup>
</h:panelGrid>
</rich:panel>
</h:panelGrid>
</h:form>
</h:panelGroup>
</body>
</html>
</f:view>
[size=18]Arquivo WEB.XML[/size]
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>1</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/Login.jsp</welcome-file>
</welcome-file-list>
<jsp-config>
<jsp-property-group>
<url-pattern>*.jspf</url-pattern>
<is-xml>true</is-xml>
</jsp-property-group>
</jsp-config>
</web-app>
[size=18]Arquivo faces-config.xml[/size]
<?xml version='1.0' encoding='UTF-8'?>
<!-- =========== FULL CONFIGURATION FILE ================================== -->
<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<lifecycle>
<phase-listener>
org.dvallone.listener.AuthorizationListener
</phase-listener>
</lifecycle>
<managed-bean>
<managed-bean-name>login</managed-bean-name>
<managed-bean-class>org.dvallone.pages.LoginBeanMB</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>pontosEntrada</managed-bean-name>
<managed-bean-class>org.dvallone.pages.PontosEntrada</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>cabecalhoBean</managed-bean-name>
<managed-bean-class>org.dvallone.pages.CabecalhoBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/*</from-view-id>
<navigation-case>
<from-outcome>loginPage</from-outcome>
<to-view-id>/Login.jsp</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/Login.jsp</from-view-id>
<navigation-case>
<from-outcome>pontosEntrada</from-outcome>
<to-view-id>/PontosEntrada.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>acessorestrito</from-outcome>
<to-view-id>/AcessoRestrito.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>listagemPontos</from-outcome>
<to-view-id>/ListagemPontos.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>logout</from-outcome>
<to-view-id>/Logout.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
