Bom dia senhores,
peguei um tutoreial de primeiros passos de hibernate, porem estou com o seguinte erro, e na oestou sabendo como solucionar:
[color=darkred]log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
java.lang.NullPointerException[/color]
[color=darkblue] at java.util.Hashtable.get(Hashtable.java:334)
at java.util.Properties.getProperty(Properties.java:932)[/color]
[color=darkred] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:107)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1509)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1054)[/color]
[color=darkblue] at hibernate.AmigoDAO.
at hibernate.TesteAmigo.main(TesteAmigo.java:16)
espero que alguem possa me ajudar,
ps: estou usando netbeans5.5, hibernate3.2, todos os arquivos estao junto com as classes.
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping.dtd">
<hibernate-mapping>
<!--noma tabela-->
<class name="Amigo" table="amigos">
<!--chave primaria-->
<id name="nome" column="nome" type="string">
<generator class="assigned"/>
</id>
<!--propriedades-->
<property name="endereco" column="endereco," type="string"/>
<property name="telefone" column="fone" type="string"/>
<property name="celular" column="cel" type="string"/>
<property name="email" column="email," type="string"/>
<property name="nascimento" column="nascimento" type="date"/>
</class>
</hibernate-mapping>