Java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet

Quando starto a aplicação esta dando este erro, alguem sabe pq?

Uso weblogic

[code]<03/02/2012 09h52min27s BRST> <Stack trace for message 149004
weblogic.application.ModuleException: Failed to load webapp: ‘Teste’
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:311)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
Truncated. see log file for complete stacktrace
java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:286)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:259)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
Truncated. see log file for complete stacktrace

[/code]

Weblogic já tem as libs do JSF?

java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet

Jake consegui resolver era isso mesmo, faltava libs.

Agora estou com outro erro, consigo fazer o deploy corretamente mas me parece que ele nao esta encontrando minha pagina sabe pq?

segue o erro:

[code]Error 404–Not Found
From RFC 2068 Hypertext Transfer Protocol – HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
[/code]

Eu tenho uma pagina index.jsp que redireciona para uma xhtml

jsp: <%response.sendRedirect("inicio.jsf");%>

xhtml: [code]

[/code]

web.xml

<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>VIVO_WEB</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <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> <context-param> <description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> <context-param> <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name> <param-value>resources.application</param-value> </context-param> <listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> </web-app>

Confira a subida e veja c tem outro erro.

Geralmente 404 é pq:

  1. A aplicação não subiu por causa de algum erro
  2. O arquivo não estava na pasta correta
  3. O link de acesso está errado

Troca de jsf para .jsf

Olhei na aba ErrorLog não houve erros algum, quando o WebLogic é startado ele abre a pagina -> http://192.168.1.37:7011/index.jsp

Então eu troco para -> http://192.168.1.37:7011/VIVO_WEB

ai da o Erro :cry:

Fez essa alteração?

Opa, desculpa não tinha visto seu outro post.

Agora fiz a alteração e quando acesso a URL da o seguinte erro:


Error 500--Internal Server Error 
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
	at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:340)
	at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:150)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:96)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)
	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
	at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
	at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	at weblogic.security.service.SecurityManager.runAs(Unknown Source)
	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
	at weblogic.work.ExecuteThread.run(ExecuteThread.java:172) 

Que lib é essa?

Coloquei o jar jstl-api-1.2-jar em WEB-INF/lib e agora voltou o erro anterior, não quer achar a pagina :cry:

na sua JSP faça algo tipo assim:
<%
System.out.println(“Chegou”);
response.sendRedirect(“inicio.jsf”);
%>

Veja se vai aparecer essa mensagem no console.

Outra coisa, a página inicio.xhtml está no mesmo diretório dessa página de redirecionamento?

Opa Jake, consegui resolver aqui amigo, vlw brother!

Tive um problema semelhantes agora a pouco e consegui resolver:
Fui na pasta libs que estava no meu ApacheTomcat e coloquei
o ojdbc14.jar.
Depois disso não tive mais erros.
Espero ter ajudado.