Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

nilsonuehara

JavaServer Faces + RichFaces

Recommended Posts

Boa tarde,

estou iniciando no desenvolvimento em JavaServer Faces (IDE Netbeans 6.0) e já tive algum progresso.

Resolvi então fazer alguns testes com RichFaces...

Adicionei os JAR´s

  • richfaces-api-3.1.1-GA.jar
  • richfaces-impl-3.1.1-GA.jar
  • richfaces-ui-3.1.1-GA.jar
e incluí no WEB.XML

<context-param>
  <param-name>org.ajax4jsf.SKIN</param-name>
  <param-value>blueSky</param-value>
</context-param>
<filter>
  <display-name>Ajax4jsf Filter</display-name>
  <filter-name>ajax4jsf</filter-name>
  <filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
  <filter-name>ajax4jsf</filter-name>
  <servlet-name>Faces Servlet</servlet-name>
  <dispatcher>REQUEST</dispatcher>
  <dispatcher>FORWARD</dispatcher>
  <dispatcher>INCLUDE</dispatcher>
</filter-mapping>

Depois disso, ao dar F6 para executar o projeto, o Netbeans começou a dar erro... resolvi então voltar tudo como era antes.

Removi os JAR´s

Removi as entradas no WEB.XML

 

O problema é que mesmo assim o erro persiste:

 

FAIL - Application at context path /jsf could not be started
Deployment error:
The module has not been deployed.
See the server log for details.
		at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:163)
		at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
		at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
		at sun.reflect.GeneratedMethodAccessor439.invoke(Unknown Source)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
		at java.lang.reflect.Method.invoke(Method.java:597)
		at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
		at org.apache.tools.ant.Task.perform(Task.java:348)
		at org.apache.tools.ant.Target.execute(Target.java:357)
		at org.apache.tools.ant.Target.performTasks(Target.java:385)
		at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
		at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
		at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
		at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
		at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
		at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
		at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: The module has not been deployed.
		at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:157)
		... 16 more
BUILD FAILED (total time: 6 seconds)

Já tentei remover todas as librarys mas mesmo assim não funfa... o que ainda pode estar errado?

 

Obs: WEB.XML

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"'>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>com.sun.faces.verifyObjects</param-name>
		<param-value>false</param-value>
	</context-param>
	<context-param>
		<param-name>com.sun.faces.validateXml</param-name>
		<param-value>false</param-value>
	</context-param>
	<context-param>
		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
		<param-value>client</param-value>
	</context-param>
	<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>*.jsf</url-pattern>
	</servlet-mapping>
	
	<session-config>
		<session-timeout>
			30
		</session-timeout>
	</session-config>
</web-app>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Descobri...

Os 3 arquivos do richfaces ainda estavam no subdiretório build\web\WEB-INF\lib, bastou exclui-los para o Netbeans rodar normalmente...

 

Agora outra pergunta... Pq ocorre o erro quando eu incluo o RichFaces com o JavaServer Faces? Será algum erro no WEB.XML?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Sempre que incluo as librarys do Richfaces ocorre:

 

init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
Copying 1 file to C:\Desenvolvimento\java\jsf\teste\build\web\WEB-INF\lib
library-inclusion-in-manifest:
compile:
compile-jsps:
Incrementally deploying http://localhost:8084/teste
Completed incremental distribution of http://localhost:8084/teste
Incrementally redeploying http://localhost:8084/teste
Start is in progress...
start?path=/teste
FAIL - Application at context path /teste could not be started
Deployment error:
The module has not been deployed.
See the server log for details.
		at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:163)
		at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104)
		at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
		at sun.reflect.GeneratedMethodAccessor278.invoke(Unknown Source)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
		at java.lang.reflect.Method.invoke(Method.java:597)
		at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
		at org.apache.tools.ant.Task.perform(Task.java:348)
		at org.apache.tools.ant.Target.execute(Target.java:357)
		at org.apache.tools.ant.Target.performTasks(Target.java:385)
		at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
		at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
		at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
		at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
		at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
		at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
		at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: The module has not been deployed.
		at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:157)
		... 16 more
BUILD FAILED (total time: 3 seconds)

Compartilhar este post


Link para o post
Compartilhar em outros sites

Bem estranho, mas você ja verificou as versões de dependências do richfaces?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Geralmente no site dos desenvolvedores dos projetos tem as versões e suas dependências.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.