java hibernate无法读取xml
我尝试使用java hibernate 3.6构建简单的crud应用程序,但我遇到了一个问题,当尝试运行时,出现了错误,如下所示:java hibernate无法读取xml,java,hibernate,Java,Hibernate,我尝试使用java hibernate 3.6构建简单的crud应用程序,但我遇到了一个问题,当尝试运行时,出现了错误,如下所示: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBi
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Inisialisasi sessionFactory failed org.hibernate.InvalidMappingException: Unable to read XML
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
有什么建议吗?
谢谢,
public class HibernateUtil {
private static final SessionFactory sessionFactory;
private static final orangDao orangDao;
static {
try {
sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
orangDao = new orangDaoImpl(sessionFactory);
} catch (Throwable e) {
System.err.println("Inisialisasi sessionFactory gagal "+e);
throw new ExceptionInInitializerError(e);
}
}
public static orangDao getPersonDao() {
return orangDao;
}
public static SessionFactory getSessionFactory() {
return sessionFactory;
}
}
请提供相关代码和xml,以及完整的stacktrace。否则,我们将无法帮助您。哪些代码和xml?映射类还是其他类?抱歉,我在hibernateFirst中是新手,stacktrace应该对代码中的行和文件有一些引用。使用它来指导您了解相关代码。其次,我要求的xml是错误中提到的xml,它无法读取