spring config in
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.DerbyDialect</prop>coding....
SessionFactory sf= new org.hibernate.cfg.AnnotationConfiguration()
.addAnnotatedClass(Myuser.class)
.configure()
.buildSessionFactory();here give me a Exception :(
org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426)
why???我猜测可能是我的009-7-1 0:45:04 org.hibernate.cfg.Configuration doConfigure
��Ϣ: Configured SessionFactory: null
哪里能找到更多资料??
who help me???
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.DerbyDialect</prop>coding....
SessionFactory sf= new org.hibernate.cfg.AnnotationConfiguration()
.addAnnotatedClass(Myuser.class)
.configure()
.buildSessionFactory();here give me a Exception :(
org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426)
why???我猜测可能是我的009-7-1 0:45:04 org.hibernate.cfg.Configuration doConfigure
��Ϣ: Configured SessionFactory: null
哪里能找到更多资料??
who help me???
解决方案 »
- HTML鼠标滑动分页有点小问题.
- 有没有EJB的简单例子?
- 送分的问题!大家积极参加
- 为何调用另一个有参数的构造方法时又打印出a=10?--代码分析疑问(有关静态块和this的用法。)
- 敬请高手总结一下J2EE体系结构:J2EE都包含哪些技术?它们之间的相互关系?通常都怎么用?若题目太大,介绍一些文章吧。谢谢!
- Hibernate的hibernate.cfg.xml放到哪个目录???老提示hibernate.cfg.xml not found????
- 谁能提供一个MVC模式开发的例子?
- 每加一颗星要得到多少分
- 如何使IIS支持ASP的同时支持JSP&Servlets&EJB?如果不行,请给出其他解决方案。
- idea占用内存过高求助
- 请教一个关于Struts2和一个算法问题。
- jdbc的小问题
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://localhost:3306/infoweb</value>
</property>
<property name="username">
<value>root</value>
</property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<prop key="hibernate.show_sql">
true
</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
</props>
</property>
<property name="mappingResources">
<value>com/yxy/entity/Admin.hbm.xml</value>
</property>
</bean>二种方式<bean name="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean>