Ask Experts Questions for FREE Help !
Ask
    DVNRaju's Avatar
    DVNRaju Posts: 1, Reputation: 1
    New Member
     
    #1

    Jul 22, 2015, 03:53 AM
    Whenever I'm trying to execute a simple hibernate example I'm getting this error..
    the error is
    Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not execute statement
    at org.hibernate.exception.internal.SQLExceptionTypeD elegate.convert(SQLExceptionTypeDelegate.java:80)
    at org.hibernate.exception.internal.StandardSQLExcept ionConverter.convert(StandardSQLExceptionConverter .java:49)
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.c onvert(SqlExceptionHelper.java:126)
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.c onvert(SqlExceptionHelper.java:112)
    at org.hibernate.engine.jdbc.internal.ResultSetReturn Impl.executeUpdate(ResultSetReturnImpl.java:211)
    at org.hibernate.engine.jdbc.batch.internal.NonBatchi ngBatch.addToBatch(NonBatchingBatch.java:62)
    at org.hibernate.persister.entity.AbstractEntityPersi ster.insert(AbstractEntityPersister.java:3124)
    at org.hibernate.persister.entity.AbstractEntityPersi ster.insert(AbstractEntityPersister.java:3581)
    at org.hibernate.action.internal.EntityInsertAction.e xecute(EntityInsertAction.java:104)
    at org.hibernate.engine.spi.ActionQueue.executeAction s(ActionQueue.java:463)
    at org.hibernate.engine.spi.ActionQueue.executeAction s(ActionQueue.java:349)
    at org.hibernate.event.internal.AbstractFlushingEvent Listener.performExecutions(AbstractFlushingEventLi stener.java:350)
    at org.hibernate.event.internal.DefaultFlushEventList ener.onFlush(DefaultFlushEventListener.java:56)
    at org.hibernate.internal.SessionImpl.flush(SessionIm pl.java:1222)
    at org.hibernate.internal.SessionImpl.managedFlush(Se ssionImpl.java:425)
    at org.hibernate.engine.transaction.internal.jdbc.Jdb cTransaction.beforeTransactionCommit(JdbcTransacti on.java:101)
    at org.hibernate.engine.transaction.spi.AbstractTrans actionImpl.commit(AbstractTransactionImpl.java:177 )
    at main.java.EmplDaoImpl.addEmployee(EmplDaoImpl.java :32)
    at main.java.EmplTest.main(EmplTest.java:12)
    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorEx ception: 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 'group, name, id) values ('it', 'dvn', 121)' at line 1
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Construc tor.java:526)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:40 6)
    at com.mysql.jdbc.Util.getInstance(Util.java:381)
    at com.mysql.jdbc.SQLError.createSQLException(SQLErro r.java:1030)
    at com.mysql.jdbc.SQLError.createSQLException(SQLErro r.java:956)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:3491)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:3423)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:19 36)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java :2060)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionIm pl.java:2542)
    at com.mysql.jdbc.PreparedStatement.executeInternal(P reparedStatement.java:1734)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(Pre paredStatement.java:2019)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(Pre paredStatement.java:1937)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(Pre paredStatement.java:1922)
    at org.hibernate.engine.jdbc.internal.ResultSetReturn Impl.executeUpdate(ResultSetReturnImpl.java:208)
    ... 14 more

Check out some similar questions!

Simple Calculator has error (my first program in java with GUI) [ 0 Answers ]

I have a problem with my code... it's a simple code and the error I think in ' = ' button or sum button import javax.swing.*; import java.awt.event.*; import java.awt.*; public class Frame extends JFrame implements ActionListener{ JButton b0,b1,b2,b3,before,b5,b6,b7,b8,b9,C,X,O,sum;

Simple C++ error: Cannot convert at initialization [ 3 Answers ]

Hey guys. I have a very simple code that's spewing out an error: #include <iostream> #include <string> #include "NodeWord.h" using namespace std; NodeWord::~NodeWord(){

Run Command Error when trying to execute a command [ 4 Answers ]

I just had my laptop re-imaged with a new Updated Windows XP CD running SP3, however, When I go to START | RUN It does not matter if I type in a Server name on the network or just CMD. I get the message below and it will not execute. Is there something I can do to fix this? “This file does not...

Unable to successfully execute the MAPI second command Error 2 [ 6 Answers ]

Hi there, I get this error message when I try to send a fax via email - Unable to successfully execute the MAPI second command Error 2. Please help.

Hibernate [ 1 Answers ]

I was trying to log off and my computer went to hibernate. I do not know what I hit that made that happen. The problem is that I cannot restart the computer. It's an HP Compaq NX9030. It runs on XP. I've tried holding the power button, removing the battery, checking to see that it is plugged...


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.