hibernate.cfg.xml文件<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><hibernate-configuration> <session-factory> <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property> <property name="connection.url">jdbc:oracle:thin:@localhost:1521:ZQDATA</property> <property name="connection.username">ZQ</property> <property name="connection.password">1</property> <property name="hibernate.show_sql">true</property> <property name="hbm2ddl.auto">create</property> <mapping resource="/zqTwo/src/com/woders/hibernate.hbm.xml"/> </session-factory></hibernate-configuration>错误:2016-7-30 12:59:33 org.hibernate.Version logVersionINFO: HHH000412: Hibernate Core {5.0.9.Final}2016-7-30 12:59:33 org.hibernate.cfg.Environment <clinit>INFO: HHH000206: hibernate.properties not found2016-7-30 12:59:33 org.hibernate.cfg.Environment buildBytecodeProviderINFO: HHH000021: Bytecode provider name : javassistException in thread "main" org.hibernate.internal.util.config.ConfigurationException: Could not locate cfg.xml resource [hibernate.cfg.xml] at org.hibernate.boot.cfgxml.internal.ConfigLoader.loadConfigXmlResource(ConfigLoader.java:53) at org.hibernate.boot.registry.StandardServiceRegistryBuilder.configure(StandardServiceRegistryBuilder.java:163) at org.hibernate.cfg.Configuration.configure(Configuration.java:259) at org.hibernate.cfg.Configuration.configure(Configuration.java:245) at com.woders.userTest.main(userTest.java:21)
添加回答
举报
0/150
提交
取消