Salve!
Criei um projeto em JSF e estou tendo o seguinte erro:
com.sun.faces.mgbean.ManagedBeanCreationException: Não foi possível criar o managed bean listaContratacao. Os seguintes problemas foram encontrados:
- Bean ou propriedade de classe br.com.turbronx.slt.contratacao.mb.ListaContratacaoMB para o managed bean listaContratacao não pode ser localizada.
- Bean ou propriedade de classe br.com.turbronx.slt.contratacao.mb.ListaContratacaoMB para o managed bean listaContratacao não pode ser localizada.
com.sun.faces.mgbean.BeanManager.create(BeanManager.java:204)
com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:86)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:61)
org.apache.el.parser.AstValue.getValue(AstValue.java:107)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
javax.faces.component.UIData.getValue(UIData.java:614)
org.ajax4jsf.component.UIDataAdaptor.getValue(UIDataAdaptor.java:1624)
org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataAdaptor.java:65)
org.ajax4jsf.component.SequenceDataAdaptor.createDataModel(SequenceDataAdaptor.java:59)
org.richfaces.component.UIDataTable.createDataModel(UIDataTable.java:121)
org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:621)
org.ajax4jsf.component.UIDataAdaptor.setRowKey(UIDataAdaptor.java:339)
org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(AbstractTableRenderer.java:138)
org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:140)
org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:128)
org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:100)
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
javax.faces.component.UIData.encodeBegin(UIData.java:967)
org.ajax4jsf.component.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:1202)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
Alguém já passou por isso e sabe me dizer do que se trata? Cacei na net é os textos que encontrei são muito vagos.
Minha classe:
package br.com.turbronx.slt.contratacao.mb;
import java.util.ArrayList;
import java.util.List;
public class ListaContratacaoMB {
public List<String> getListaTeste(){
List<String> string = new ArrayList<String>();
for (int i = 0; i < 9; i++){
string.add("Teste " + i);
}
return string;
}
}
Meu faces-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
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"
version="1.2">
<managed-bean>
<managed-bean-name>listaContratacao</managed-bean-name>
<managed-bean-class>br.com.turbronx.slt.contratacao.mb.ListaContratacaoMB</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
</faces-config>
E o meu 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>TPT_1_1_03</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<!-- Plugging the "Blue Sky" skin into the project -->
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<!-- Making the RichFaces skin spread to standard HTML controls -->
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>disable</param-value>
</context-param>
<!-- Defining and mapping the RichFaces filter -->
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<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>
</web-app>
Quem puder dar um help…!!
Abs.