Guest User

Untitled

a guest
Nov 4th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. type Exception report
  2.  
  3. messageInternal Server Error
  4.  
  5. descriptionThe server encountered an internal error that prevented it from fulfilling this request.
  6.  
  7. exception
  8.  
  9. org.apache.jasper.JasperException: org.hibernate.exception.SQLGrammarException: could not fetch initial value for increment generator
  10.  
  11. root cause
  12.  
  13. org.hibernate.exception.SQLGrammarException: could not fetch initial value for increment generator
  14.  
  15. root cause
  16.  
  17. 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
  18.  
  19. <?xml version='1.0'?>
  20. <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
  21. <!-- Generated Nov 9, 2011 6:53:58 PM by Hibernate Tools 3.2.1.GA -->
  22.  
  23. <hibernate-mapping>
  24. <class name="com.hibernateClass.UserRegistration" table="user_registration">
  25. <id name="index">
  26. <generator class="increment"></generator>
  27. </id>
  28. <property name="userName"></property>
  29. <property name="password"></property>
  30. <property name="email"></property>
  31. </class>
  32. </hibernate-mapping>
  33.  
  34. <?xml version="1.0" encoding="UTF-8"?>
  35. <!DOCTYPE hibernate-configuration PUBLIC
  36. "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  37. "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
  38.  
  39. <!-- Generated by MyEclipse Hibernate Tools. -->
  40. <hibernate-configuration>
  41.  
  42. <session-factory>
  43. <property name="hbm2ddl.auto">update</property>
  44. <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
  45. <property name="connection.url">jdbc:mysql://localhost:3306/employee</property>
  46. <property name="connection.username">root</property>
  47. <property name="connection.password"></property>
  48. <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
  49. <property name="show_sql">true</property>
  50. <mapping resource="com/hibernateClass/UserRegistration.hbm.xml"/>
  51. </session-factory>
  52.  
  53. </hibernate-configuration>
  54.  
  55. public class UserRegistration implements java.io.Serializable {
  56.  
  57.  
  58. int index;
  59. String userName;
  60. String password;
  61. String email;
  62. public int getIndex() {
  63. return index;
  64. }
  65.  
  66. public void setIndex(int index) {
  67. this.index = index;
  68. }
  69.  
  70. public String getUserName() {
  71. return userName;
  72. }
  73.  
  74. public void setUserName(String userName) {
  75. this.userName = userName;
  76. }
  77.  
  78. public String getPassword() {
  79. return password;
  80. }
  81.  
  82. public void setPassword(String password) {
  83. this.password = password;
  84. }
  85.  
  86. public String getEmail() {
  87. return email;
  88. }
  89.  
  90. public void setEmail(String email) {
  91. this.email = email;
  92. }
  93. }
Add Comment
Please, Sign In to add comment