Oi pessoal,
Verifiquei aqui Joviane, e notei somente um Warning no console no momento em que subo o servidor, será que é devido a este Warning?
fev 11, 2016 7:24:24 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
fev 11, 2016 7:24:24 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:jsf-livraria' did not find a matching property.
fev 11, 2016 7:24:24 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
fev 11, 2016 7:24:24 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
fev 11, 2016 7:24:24 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 738 ms
fev 11, 2016 7:24:24 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
fev 11, 2016 7:24:24 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
fev 11, 2016 7:24:26 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.1.17 ( 20130107-1935 https://svn.java.net/svn/mojarra~svn/tags/2.1.17@11335) for context '/jsf-livraria'
fev 11, 2016 7:24:26 PM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
fev 11, 2016 7:24:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/thiago/Desenv/apache-tomcat-7.0.47/webapps/docs
fev 11, 2016 7:24:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/thiago/Desenv/apache-tomcat-7.0.47/webapps/examples
fev 11, 2016 7:24:27 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
fev 11, 2016 7:24:27 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
fev 11, 2016 7:24:27 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@5d1492ed')
fev 11, 2016 7:24:27 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/thiago/Desenv/apache-tomcat-7.0.47/webapps/ROOT
fev 11, 2016 7:24:27 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/thiago/Desenv/apache-tomcat-7.0.47/webapps/host-manager
fev 11, 2016 7:24:27 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/thiago/Desenv/apache-tomcat-7.0.47/webapps/manager
fev 11, 2016 7:24:27 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
fev 11, 2016 7:24:27 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
fev 11, 2016 7:24:27 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2833 ms
Cassius, tentei implementar a anotação de escopo mas permaneceu o mesmo erro, optei por usar o @RequestScoped, dai minha classe ficou desta forma que esta abaixo, é assim mesmo que deve ser implementado o escopo?
package br.com.caelum.livraria.bean;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
@ManagedBean
@RequestScoped
public class LivroBean {
public void gravar(){
System.out.println("Gravando livro!");
}
}