-->
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.  [ 4 posts ] 
Author Message
 Post subject: " Could not execute query" question, not sql error
PostPosted: Mon Jan 23, 2006 2:05 am 
Newbie

Joined: Sat Nov 12, 2005 3:31 am
Posts: 7
I use hibernate + mysql , and configure the entity mapping with "lazy=false" .and deploy my applicaiton.
The first day, all of it worked well,
but since the second day. something exception occured: and stack message is " Could not execute query", and my application dump....

can anybody here help me? many thanks.
------------------------------------------------


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 23, 2006 11:54 pm 
Regular
Regular

Joined: Tue Dec 14, 2004 5:21 am
Posts: 104
Location: india
please provide your mappings and stack trace , also the code that does the operation

_________________
sHeRiN
thanks for your ratings ...... :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 24, 2006 10:17 am 
Newbie

Joined: Sat Nov 12, 2005 3:31 am
Posts: 7
ok, thanks for your reply, here is my stack messages and the code-related.

org.hibernate.exception.GenericJDBCException: could not execute query
org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
org.hibernate.loader.Loader.doList(Loader.java:1596)
org.hibernate.loader.Loader.list(Loader.java:1577)
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1322)
org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:300)
net.mostin.bid.dao.UserDAO.getUserByName(UserDAO.java:52)
net.mostin.bid.action.LoginAction.execute(LoginAction.java:40)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
net.mostin.bid.controll.LoginFilter.doFilter(LoginFilter.java:45)
net.mostin.bid.controll.EncodingFilter.doFilter(EncodingFilter.java:33)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)

--------------------------------------------------
and the code is as following.

SystemUser result = null;
Session session = getSession();
try {
Criteria criteria = session.createCriteria(SystemUser.class);
criteria.add(Restrictions.eq("username", username));
Iterator iter = criteria.list().iterator();
if (iter.hasNext()) {
return (SystemUser)iter.next();
}
} finally {
closeSession(session);
}
return result;


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 24, 2006 11:37 pm 
Regular
Regular

Joined: Tue Dec 14, 2004 5:21 am
Posts: 104
Location: india
i dont think this problem relates to your hibernate code , since it worked the first time . check for any database level errors. maybe u can go through mysql log

_________________
sHeRiN
thanks for your ratings ...... :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.