-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: I am trying to insert (security question) from drop list...
PostPosted: Sat Oct 02, 2010 10:19 pm 
Newbie

Joined: Wed Sep 01, 2010 1:04 pm
Posts: 5
Hi
i am trying to insert (security question) from drop down list.. to hibernate table... but i am getting following error message...

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.hibernate.exception.SQLGrammarException: could not insert: [com.smart.registration.RegBean]
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2295)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)
org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
com.smart.registration.RegDAO.register(RegDAO.java:49)
com.smart.registration.RegServlet.doGet(RegServlet.java:36)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

java.sql.SQLSyntaxErrorException: 'SEC' is not a column in table or VTI 'USER.REGBEAN'.
org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:116)
org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2252)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2688)
org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
com.smart.registration.RegDAO.register(RegDAO.java:49)
com.smart.registration.RegServlet.doGet(RegServlet.java:36)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)




-------------------------------------------------------------------------------


Top
 Profile  
 
 Post subject: Re: I am trying to insert (security question) from drop list...
PostPosted: Mon Oct 04, 2010 8:51 pm 
Newbie

Joined: Wed Sep 01, 2010 1:04 pm
Posts: 5
Thank you sir,

when i looked deep in to the code ... i commented

new SchemaExport(config).create(true, true);

when i executed for first time i named one column as security
but when i executed for second time i commented the above code.. and i tried to change the column name(security) as sec...

since the column name is security, but i was trying to access with sec this error has encountered......


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.