hibernate 初級問題
package com.gktrim.Hibernate;
import org.hibernate.cfg.*;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.apache.commons.logging.*;
import org.hibernate.cfg.Environment;
/**
* @author Administrator
*
*/
public class InsertMachineSpeed {
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自動產生方法 Stub
Configuration cf=null;
SessionFactory sf=null;
Session se=null;
cf=new Configuration().configure("");
}
}
提示出錯:
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
這是哪裡出問題?