Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Column 'NEXT_HI' is either not in any table in the FROM list or appears

 
silamala ramesh babu
Greenhorn
Posts: 25
Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



I am using spring an hibernate annotations. for jsp page i am asking the user to enter details and i am trying to save the details in db.
>And i am giving the @generated value for the ContactId

but ia m getting the error saying like this .


/////////////////
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: isAdminRole=null
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associate emp id=1
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associate emp name=s
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associate created by =0
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associate created on = 2012-01-31 11:11:15.562
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associate modified by = 0
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associate modified on = 2012-01-31 11:11:15.562
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associate password = 1
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associatecontact contact id=0
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associatecontact emp team=s
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associatecontact emp tcs mail=s
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associatecontact emp created by =0
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: associatecontact emp created on = 2012-01-31 11:11:15.562
5639324 [http-8080-1] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: -1, SQLState: 42X04
5639324 [http-8080-1] ERROR org.hibernate.util.JDBCExceptionReporter - Column 'NEXT_HI' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'NEXT_HI' is not a column in the target table.
Jan 31, 2012 11:11:15 AM com.tcs.rdt.associate.web.AssociateController associateDoAdd
INFO: org.springframework.dao.InvalidDataAccessResourceUsageException: could not get or update next value; SQL [null]; nested exception is org.hibernate.exception.SQLGrammarException: could not get or update next value








 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, this is a Hibernate issue and you mapping of the Primary Key and its Generation mechanism. In your case you configured it to use a HILO type algorithm, and probably not what your database uses.

Moving this to the ORM forum for better answers.

Oh, and we have a CODE button when posting that adds CODE tags to you post wher eyou post your code between those tags and the code keeps its nice to read format.

So I added CODE tags for you, but please use them in the future for us. Thanks

Good Luck

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic