Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Exception report
- messageInternal Server Error
- descriptionThe server encountered an internal error that prevented it from fulfilling this request.
- exception
- org.apache.jasper.JasperException: org.hibernate.exception.SQLGrammarException: could not fetch initial value for increment generator
- root cause
- org.hibernate.exception.SQLGrammarException: could not fetch initial value for increment generator
- root cause
- com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index) from user_registration' at line 1
- <?xml version='1.0'?>
- <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
- <!-- Generated Nov 9, 2011 6:53:58 PM by Hibernate Tools 3.2.1.GA -->
- <hibernate-mapping>
- <class name="com.hibernateClass.UserRegistration" table="user_registration">
- <id name="index">
- <generator class="increment"></generator>
- </id>
- <property name="userName"></property>
- <property name="password"></property>
- <property name="email"></property>
- </class>
- </hibernate-mapping>
- <?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">
- <!-- Generated by MyEclipse Hibernate Tools. -->
- <hibernate-configuration>
- <session-factory>
- <property name="hbm2ddl.auto">update</property>
- <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
- <property name="connection.url">jdbc:mysql://localhost:3306/employee</property>
- <property name="connection.username">root</property>
- <property name="connection.password"></property>
- <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
- <property name="show_sql">true</property>
- <mapping resource="com/hibernateClass/UserRegistration.hbm.xml"/>
- </session-factory>
- </hibernate-configuration>
- public class UserRegistration implements java.io.Serializable {
- int index;
- String userName;
- String password;
- String email;
- public int getIndex() {
- return index;
- }
- public void setIndex(int index) {
- this.index = index;
- }
- public String getUserName() {
- return userName;
- }
- public void setUserName(String userName) {
- this.userName = userName;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public String getEmail() {
- return email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- }
Add Comment
Please, Sign In to add comment