myeclipse运行mysql,Hibernate提示出错,一直无法解决,不知道问题出在哪里
求大神指点,问题出在哪了啊这是Hibernate影射设置这是要执行的类packageuser;/***Userentity.@authorMyEclipsePersist...
求大神指点,问题出在哪了啊
这是Hibernate影射设置
这是要执行的类
package user;
/** * User entity. @author MyEclipse Persistence Tools */
public class User implements java.io.Serializable {
// Fields
private String userName; private String userPassword;
// Constructors
/** default constructor */ public User() { }
/** minimal constructor */ public User(String userName) { this.userName = userName; }
/** full constructor */ public User(String userName, String userPassword) { this.userName = userName; this.userPassword = userPassword; }
// Property accessors
public String getUserName() { return this.userName; }
public void setUserName(String userName) { this.userName = userName; }
public String getUserPassword() { return this.userPassword; }
public void setUserPassword(String userPassword) { this.userPassword = userPassword; }
}
错误信息 展开
这是Hibernate影射设置
这是要执行的类
package user;
/** * User entity. @author MyEclipse Persistence Tools */
public class User implements java.io.Serializable {
// Fields
private String userName; private String userPassword;
// Constructors
/** default constructor */ public User() { }
/** minimal constructor */ public User(String userName) { this.userName = userName; }
/** full constructor */ public User(String userName, String userPassword) { this.userName = userName; this.userPassword = userPassword; }
// Property accessors
public String getUserName() { return this.userName; }
public void setUserName(String userName) { this.userName = userName; }
public String getUserPassword() { return this.userPassword; }
public void setUserPassword(String userPassword) { this.userPassword = userPassword; }
}
错误信息 展开
展开全部
个人觉得是你的hibernate.cfg.xml配置文件中<property 的顺搞错了,你把<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>和
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
位置换一下试试。
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
位置换一下试试。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询