VRaptor: AnnotationConfigWebApplicationContex

1 resposta
donny

Estou com um WARN em meu projeto que não estou conseguindo resolver. Segue abaixo a msg do console:

07:10:36,573  INFO [DefaultSpringLocator] No application context found
07:10:36,658  INFO [WebAppBootstrapFactory] No static WebAppBootstrap found.
07:10:36,658  INFO [BasicConfiguration  ] br.com.caelum.vraptor.scanning = null
07:10:36,812  INFO [ScannotationComponentScanner] scanning url jar:file:/D:/Projetos/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/reservas/WEB-INF/lib/vraptor-3.4.0.jar!/br/com/caelum/vraptor/converter/l10n
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.AnnotationConfigWebApplicationContext).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
07:10:37,794  INFO [DefaultConverters   ] Registering bundled converters
07:10:40,572  INFO [LinkToHandler       ] Registering linkTo component

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:jsp="http://java.sun.com/xml/ns/javaee/jsp" 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>reservas</display-name>
  <context-param>
    <param-name>br.com.caelum.vraptor.packages</param-name>
    <param-value>br.com.caelum.vraptor.converter.l10n</param-value>
  </context-param>
  <context-param>
    <param-name>br.com.caelum.vraptor.provider</param-name>
    <param-value>br.com.reservason.infra.persistence.HibernateCustomProvider</param-value>
  </context-param>
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.locale</param-name>
    <param-value>pt_BR</param-value>
  </context-param>
  <context-param>
    <param-name>br.com.caelum.vraptor.encoding</param-name>
    <param-value>UTF-8</param-value>
  </context-param>
  <filter>
    <filter-name>sitemesh</filter-name>
    <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
  </filter>
  <filter>
    <filter-name>vraptor</filter-name>
    <filter-class>br.com.caelum.vraptor.VRaptor</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>sitemesh</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>vraptor</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <jsp-config>
    <jsp-property-group>
      <url-pattern>*.jsp</url-pattern>
      <page-encoding>UTF-8</page-encoding>
      <scripting-invalid>true</scripting-invalid>
      <include-prelude>/WEB-INF/jsp/prelude.jspf</include-prelude>
    </jsp-property-group>
  </jsp-config>
</web-app>

Hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	<session-factory>
		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/reservas</property>
		<property name="hibernate.connection.username">user</property>
		<property name="hibernate.connection.password">123</property>
		<property name="hibernate.connection.pool_size">10</property>
		<property name="show_sql">true</property>
		<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
		<property name="hibernate.hbm2ddl.auto">update</property>
		<property name="hibernate.query.substitutions">true=1, false=0</property>  
		<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
		<property name="hibernate.current_session_context_class">thread</property>
 
		<!-- configuration pool via c3p0--> 
		<property name="c3p0.acquire_increment">1</property> 
		<property name="c3p0.idle_test_period">100</property> <!-- seconds --> 
		<property name="c3p0.max_size">100</property> 
		<property name="c3p0.max_statements">0</property> 
		<property name="c3p0.min_size">10</property> 
		<property name="c3p0.timeout">100</property> <!-- seconds --> 
		<!-- DEPRECATED very expensive property name="c3p0.validate>--> 
 	
	</session-factory>
</hibernate-configuration>

Tem alguma configuração mal feita nos arquivos acima?

1 Resposta

magnocosta

Esta faltando vc configurar o Log4j, geralmente no projeto temo um log4j.properties.
Soh procurar na net que tem varios exemplos !

Abraçoo !

Criado 13 de março de 2012
Ultima resposta 13 de mar. de 2012
Respostas 1
Participantes 2