-->
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.  [ 3 posts ] 
Author Message
 Post subject: Help! : ResultSet is from UPDATE. No Data.
PostPosted: Thu Jan 29, 2009 10:17 am 
Newbie

Joined: Thu Jan 29, 2009 10:03 am
Posts: 5
Hi All,

I have a website written using Struts 2, on a MYSQL database, using Hibernate.. I have a search function which calls a
stored procedure in the database (search_SP), which accepts 1 parameter (the text entered in the form field),
which in turn populates from a View.

When I submit a search via the site, I don't get any errors, and the results return exactly as I would expect them to,
but in the background my Eclipse session is showing a stacktrace along the lines of:



Code:
28-Jan-2009 21:06:49
com.opensymphony.xwork2.validator.DelegatingValidatorContext
$LoggingValidationAware addFieldError
SEVERE: Validation error for results:Enter something to search for
here
Hibernate: call search_SP(?)
28-Jan-2009 21:06:49 org.hibernate.util.JDBCExceptionReporter
logExceptions
WARNING: SQL Error: 0, SQLState: S1000
28-Jan-2009 21:06:49 org.hibernate.util.JDBCExceptionReporter
logExceptions
SEVERE: ResultSet is from UPDATE. No Data.
28-Jan-2009 21:06:49 org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet default threw exception
java.sql.SQLException: ResultSet is from UPDATE. No Data.
       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
       at com.mysql.jdbc.ResultSet.next(ResultSet.java:7287)
       at org.hibernate.loader.Loader.doQuery(Loader.java:697)
       at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
       at org.hibernate.loader.Loader.doList(Loader.java:2220)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
       at org.hibernate.loader.Loader.list(Loader.java:2099)
       at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
       at
org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695)
       at
org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
       at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)
       at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:66)
       at
prodme.service.Search_service_impl.search(Search_service_impl.java:30)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
       at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
       at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
       at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
       at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
       at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
       at $Proxy11.search(Unknown Source)
       at prodme.action.Search.execute(Search.java:24)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
       at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
       at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
       at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
       at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:186)
       at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121)
       at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:224)
       at com.opensymphony.xwork2.DefaultActionInvocation
$2.doProfiling(DefaultActionInvocation.java:223)
       at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
       at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
       at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
       at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
       at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
       at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
       at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
       at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
       at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
       at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)


The search_SP stored procedure doesn't do any kind of UPDATE or INSERT, it merely builds up a query, and executes the query,
returning a resultset. Any ideas what could be causing this error? It's got me stumped!

Thanks in advance :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 29, 2009 2:21 pm 
Newbie

Joined: Thu Jan 29, 2009 10:03 am
Posts: 5
And for clarity, here's my mapping:

Code:
    @SuppressWarnings("unchecked")
    public List<Web_view> search(String result) {
        Query query = getEntityManager().createNativeQuery("call search_SP(?)",Web_view.class);
        query.setParameter(1, result);
       return query.getResultList();
    }


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 4:56 am 
Newbie

Joined: Thu Jan 29, 2009 10:03 am
Posts: 5
Could it be an issue with using createNativeQuery, is there a better way of doing this?


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