struts +hibernate配置问题半天搞不清楚哪里错了

发哥1997 发哥1997 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
加载hibernate配置文件的类:
package addHibernateFile;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class HibernateSessionFactory {
private SessionFactory sessionFactory;
public HibernateSessionFactory(){}
@SuppressWarnings("deprecation")
public SessionFactory config(){
try {
Configuration configuration=new Configuration();
Configuration configure=configuration.configure("hibernate.cfg.xml");
return configure.buildSessionFactory();
} catch (Exception e) {
// TODO: handle exception
e.getMessage();
return null;
}
}
public Session getSession(){
sessionFactory=config();
return sessionFactory.openSession();
}

}



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="hibernate.bytecode.use_reflection_optimizer">false</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">test</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/test</property>
<property name="hibernate.connection.username">test</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
<mapping resource="PO/UserInfoPo.hbm.xml"></mapping>
</session-factory>
</hibernate-configuration>





UserInfoPo.hbm.xml配置文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="PO.UserInfoPo" table="mima">
<id name="id" type="int">
<column name="id"/>
<generator class="increment"/>
</id>
<property name="username" type="string">
<column name="username" length="20" not-null="true"/>
</property>
<property name="password" type="string">
<column name="password" length="20" not-null="true"/>
</property>
</class>
</hibernate-mapping>






错误信息:
。。。。。
七月 04, 2014 2:08:06 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000046: Connection properties: {user=test, password=****}
七月 04, 2014 2:08:06 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000006: Autocommit mode: false
七月 04, 2014 2:08:06 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
七月 04, 2014 2:08:06 下午 org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
七月 04, 2014 2:08:06 下午 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4
七月 04, 2014 2:08:06 下午 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
七月 04, 2014 2:08:06 下午 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
七月 04, 2014 2:08:17 下午 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: hibernate.cfg.xml
七月 04, 2014 2:08:17 下午 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: hibernate.cfg.xml
七月 04, 2014 2:08:17 下午 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
七月 04, 2014 2:08:17 下午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: PO/UserInfoPo.hbm.xml
七月 04, 2014 2:08:17 下午 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
七月 04, 2014 2:08:17 下午 org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
七月 04, 2014 2:08:17 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH000402: Using Hibernate built-in connection pool (not for production use!)
七月 04, 2014 2:08:17 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/test]
七月 04, 2014 2:08:17 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000046: Connection properties: {user=test, password=****}
七月 04, 2014 2:08:17 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000006: Autocommit mode: false
七月 04, 2014 2:08:17 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
七月 04, 2014 2:08:17 下午 org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
七月 04, 2014 2:08:17 下午 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4
七月 04, 2014 2:08:17 下午 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
七月 04, 2014 2:08:17 下午 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
七月 04, 2014 2:08:21 下午 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: hibernate.cfg.xml
七月 04, 2014 2:08:21 下午 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: hibernate.cfg.xml
七月 04, 2014 2:08:21 下午 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
七月 04, 2014 2:08:21 下午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: PO/UserInfoPo.hbm.xml
七月 04, 2014 2:08:21 下午 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
七月 04, 2014 2:08:21 下午 org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
七月 04, 2014 2:08:21 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH000402: Using Hibernate built-in connection pool (not for production use!)
七月 04, 2014 2:08:21 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/test]
七月 04, 2014 2:08:21 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000046: Connection properties: {user=test, password=****}
七月 04, 2014 2:08:21 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000006: Autocommit mode: false
七月 04, 2014 2:08:21 下午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
七月 04, 2014 2:08:21 下午 org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
七月 04, 2014 2:08:21 下午 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4
七月 04, 2014 2:08:21 下午 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
七月 04, 2014 2:08:21 下午 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory



网上查询了半天,仍无解决办法,可能本人愚钝,望大虾能指点迷津,
...全文

相关推荐

struts,hibernate,spring开发宝典

看到坛子里有第一部分,但找了半天没找到第二部分。。。。。。。这个是我另外下的完整版,不是高清扫描的,但不影响阅读,请各位放心下载!喜欢的顶一个,不喜欢的走过看看!

bestiori

fengmian123

fengmian123

CiYuanShuos

QYR-18900-2026-2032全球与中国智能旋转导向钻井系统市场现状及未来发展趋势 Sample-shijunzhong.docx

QYR-18900-2026-2032全球与中国智能旋转导向钻井系统市场现状及未来发展趋势 Sample-shijunzhong.docx

qyresearch报告

XERJ 是一款受到社区信赖的本地 AI 搜索引擎

XERJ 是一款受到社区信赖的本地 AI 搜索引擎,能自动为任意文件夹建立索引,让编程智能体直接检索所需代码,省去逐个读取文件消耗的 token。它的主要用途是参考现有实现来写代码(reference coding):接到任务后,智能体下载与任务相关的开源仓库,建立索引,再查阅这些项目的解决方法。 在一项对照研究中,这种做法让智能体的输出 token 用量降至原来的约 1/2.7,同时保持 16/16 的任务完成率(案例研究)。用户在日常开发中报告的用量约为原来的 1/5(使用反馈)。有了可检索的参考实现,较小、较便宜的模型也可能胜过只凭记忆工作的昂贵模型,减少反复修改的次数。把下面这段提示词交给智能体即可开始

yiersansiwu123d

DocRes.Vulkan.WinForms.VS2022-Source-r1.1-20261016-102846-206.zip

DocRes.Vulkan.WinForms.VS2022-Source-r1.1-20261016-102846-206.zip 博客地址:https://blog.csdn.net/lw112190/article/details/168119884

天天代码码天天
评论
收藏 已收藏
分享
返回顶部
发哥1997
XML/XSL 8,906 成员 22,677 内容