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="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:oracle</property>
<property name="connection.username"></property>
<property name="connection.password"></property>
<mapping resource="hibernate/po/Login.hbm.xml"/>
</session-factory>
</hibernate-configuration>Login.hbm.xml<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mappong PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourccforgc.net/hibernate mapping-3.0.dtd"><hibernate-configuration>
<class name="hibernate.po.Login" table="login" schema="MYHR">
<id name="userName" type="java.lang.String">
<column name="username" length="20"/>
<gencerator class="assigned"/>
</id>
<property name="passWord" type="java.lang.String">
<column name="password" length="20" not-null="true"/>
</property>
</class>
</hibernate-configuration>
<!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="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:oracle</property>
<property name="connection.username"></property>
<property name="connection.password"></property>
<mapping resource="hibernate/po/Login.hbm.xml"/>
</session-factory>
</hibernate-configuration>Login.hbm.xml<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mappong PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourccforgc.net/hibernate mapping-3.0.dtd"><hibernate-configuration>
<class name="hibernate.po.Login" table="login" schema="MYHR">
<id name="userName" type="java.lang.String">
<column name="username" length="20"/>
<gencerator class="assigned"/>
</id>
<property name="passWord" type="java.lang.String">
<column name="password" length="20" not-null="true"/>
</property>
</class>
</hibernate-configuration>
解决方案 »
- 急【史无前例?】奇怪问题,劳烦进..IE8 showModalDialog 里面的select 点几次才能点开。
- 关于Java Web学习的一些疑惑
- java小项目blog中如何加入fckeditor 配置还有简单的分页技术
- HTTPURLConnection下载文件的问题
- JSP文件中web.xml这个配置文件不明白,解释下内容意思!
- 难题,不知道怎么解决
- Configured SessionFactory: null?这是怎么一回事呢?
- 大家来帮我看看Error creating bean with
- jsp中session不能跨窗口?
- 为什麽JNDI找不到EJBHome接口??
- 一对多中,多方不会加载,取不到多方的值
- 求助,img标签中,path是什么用处?然后为什么编译的时候是错的
还有上面的文档声明也写错了不过已经改过来了
这个jar包应该不少吧
我不太会下载,那个是人家给我的 除了slf4j-1.5.2都导进去了 所有的jar包都在上面那个图里面现在还是这个异常
我不太会下载,那个是人家给我的 除了slf4j-1.5.2都导进去了 所有的jar包都在上面那个图里面现在还是这个异常你用myeclipse加载hibernate的时候,把那些jar包都勾上就行了,你贴一下完整的异常信息。
我不太会下载,那个是人家给我的 除了slf4j-1.5.2都导进去了 所有的jar包都在上面那个图里面现在还是这个异常你用myeclipse加载hibernate的时候,把那些jar包都勾上就行了,你贴一下完整的异常信息。
0.0我用的是eclipse 老师说新手先用eclipse 不然脱离了MYeclipse集成环境啥都不会了
Login.hbm.xml里的 "http://hibernate.sourccforgc.net/hibernate mapping-3.0.dtd">改为
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mappong PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourccforgc.net/hibernate mapping-3.0.dtd">文件头你都自己敲吗,谁教你的。是你老师脑袋里有水还是你脑袋里有水。
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mappong PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourccforgc.net/hibernate mapping-3.0.dtd">文件头你都自己敲吗,谁教你的。是你老师脑袋里有水还是你脑袋里有水。
0.0自己乱敲的
Login.hbm.xml <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforgc.net/hibernate-configuration-3.0.dtd">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">现在这样对了吗
Login.hbm.xml <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforgc.net/hibernate-configuration-3.0.dtd">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">
上面那个回复错了 Login.hbm.xml已经改过来了