Org.springframework.dao.InvalidDataAccessResourceUsageException:could not execute query; Nested exception is org.hibernate.exception.SQLGrammarException:could not execute query
At Org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException ( sessionfactoryutils.java:630) [SPRING.JAR:2.5.6.SEC01]
At Org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException (Hibernateaccessor.java : 412) [SPRING.JAR:2.5.6.SEC01]
At Org.springframework.orm.hibernate3.HibernateTemplate.doExecute (hibernatetemplate.java:424) [spring.jar:2.5.6. SEC01]
At Org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession (hibernatetemplate.java:374) [ SPRING.JAR:2.5.6.SEC01]
At Com.metinform.modules.orm.hibernate.BaseDAO.findPageByCriteria (basedao.java:154) [BaseDAO.class:na]
At Com.metinform.zxzj.persistence.TraceProjectDAO.findPageList (traceprojectdao.java:331) [Traceprojectdao.class: Na
At Com.metinform.zxzj.service.ProjectService.traceProjectPage (projectservice.java:5351) [ProjectService.class:na ]
At com.metinform.zxzj.service.projectservice$ $FastClassByCGLIB $$4715dfff.invoke (<generated>) [ Cglib-nodep-2.1_3.jar:na]
At Net.sf.cglib.proxy.MethodProxy.invoke (methodproxy.java:149) [Cglib-nodep-2.1_3.jar:na]
At Org.springframework.aop.framework.cglib2aopproxy$cglibmethodinvocation.invokejoinpoint (Cglib2AopProxy.java : () [SPRING.JAR:2.5.6.SEC01]
At Org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (reflectivemethodinvocation.java:149) [ SPRING.JAR:2.5.6.SEC01]
At Org.springframework.transaction.interceptor.TransactionInterceptor.invoke (transactioninterceptor.java:106) [ SPRING.JAR:2.5.6.SEC01]
At Org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (reflectivemethodinvocation.java:171) [ SPRING.JAR:2.5.6.SEC01]
At Org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke (exposeinvocationinterceptor.java:89) [ SPRING.JAR:2.5.6.SEC01]
At Org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (reflectivemethodinvocation.java:171) [ SPRING.JAR:2.5.6.SEC01]
At Org.springframework.aop.framework.cglib2aopproxy$dynamicadvisedinterceptor.intercept (Cglib2AopProxy.java:635 ) [SPRING.JAR:2.5.6.SEC01]
At com.metinform.zxzj.service.projectservice$ $EnhancerByCGLIB $$819c4b2c.traceprojectpage (<generated>) [ Cglib-nodep-2.1_3.jar:na]
At Com.metinform.zxzj.projectstruct.action.ProjectAction.projectTraceList (projectaction.java:2582) [ ProjectAction.class:na]
At Sun.reflect.GeneratedMethodAccessor170.invoke (Unknown Source) [Na:na]
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:25) [Na:1.6.0_12]
At Java.lang.reflect.Method.invoke (method.java:597) [Na:1.6.0_12]
At Org.apache.struts.actions.DispatchAction.dispatchMethod (dispatchaction.java:269) [Struts-extras-1.3.10.jar : 1.3.10]
At Org.apache.struts.actions.DispatchAction.execute (dispatchaction.java:170) [struts-extras-1.3.10.jar:1.3.10]
At Org.apache.struts.chain.commands.servlet.ExecuteAction.execute (executeaction.java:58) [Struts-core-1.3.10.jar : 1.3.10]
At Org.apache.struts.chain.commands.AbstractExecuteAction.execute (abstractexecuteaction.java:67) [ STRUTS-CORE-1.3.10.JAR:1.3.10]
At Org.apache.struts.chain.commands.ActionCommandBase.execute (actioncommandbase.java:51) [Struts-core-1.3.10.jar : 1.3.10]
At Org.apache.commons.chain.impl.ChainBase.execute (chainbase.java:190) [commons-chain-1.1.jar:1.1]
At Org.apache.commons.chain.generic.LookupCommand.execute (lookupcommand.java:304) [commons-chain-1.1.jar:1.1]
At Org.apache.commons.chain.impl.ChainBase.execute (chainbase.java:190) [commons-chain-1.1.jar:1.1]
At Org.apache.struts.chain.ComposableRequestProcessor.process (composablerequestprocessor.java:283) [ STRUTS-CORE-1.3.10.JAR:1.3.10]
At Org.apache.struts.action.ActionServlet.process (actionservlet.java:1913) [struts-core-1.3.10.jar:1.3.10]
At Org.apache.struts.action.ActionServlet.doGet (actionservlet.java:449) [struts-core-1.3.10.jar:1.3.10]
At Javax.servlet.http.HttpServlet.service (httpservlet.java:617) [Servlet-api.jar:na]
At Javax.servlet.http.HttpServlet.service (httpservlet.java:723) [Servlet-api.jar:na]
At Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:290) [ CATALINA.JAR:6.0.45]
At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:206) [Catalina.jar : 6.0.45]
At Com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent (sitemeshfilter.java:129) [ Sitemesh-2.4.1-weblogic-utf-8.jar:na]
At Com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter (sitemeshfilter.java:77) [ Sitemesh-2.4.1-weblogic-utf-8.jar:na]
At Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:235) [ CATALINA.JAR:6.0.45]
At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:206) [Catalina.jar : 6.0.45]
At Com.metinform.zxzj.web.filter.MDCFilter.doFilter (mdcfilter.java:86) [MDCFilter.class:na]
At Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:235) [ CATALINA.JAR:6.0.45]
At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:206) [Catalina.jar : 6.0.45]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:378) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke (Filtersecurityinterceptor.java : 109) [Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter (Filtersecurityinterceptor.java : [Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp ( SESSIONFIXATIONPROTECTIONFILTER.JAVA:67) [Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.SpringSecurityFilter.doFilter (springsecurityfilter.java:53) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp (exceptiontranslationfilter.java:101) [Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.SpringSecurityFilter.doFilter (springsecurityfilter.java:53) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp ( anonymousprocessingfilter.java:105) [Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.SpringSecurityFilter.doFilter (springsecurityfilter.java:53) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp ( remembermeprocessingfilter.java:116) [Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.SpringSecurityFilter.doFilter (springsecurityfilter.java:53) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp ( securitycontextholderawarerequestfilter.java:91) [Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.SpringSecurityFilter.doFilter (springsecurityfilter.java:53) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp (basicprocessingfilter.java:174) [Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.SpringSecurityFilter.doFilter (springsecurityfilter.java:53) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp (abstractprocessingfilter.java:278) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.SpringSecurityFilter.doFilter (springsecurityfilter.java:53) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Com.metinform.modules.security.springsecurity.SpringSecurityLogFilter.doFilterHttp ( SPRINGSECURITYLOGFILTER.JAVA:39) [SpringSecurityLogFilter.class:na]
At Org.springframework.security.ui.SpringSecurityFilter.doFilter (springsecurityfilter.java:53) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.logout.LogoutFilter.doFilterHttp (logoutfilter.java:89) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.SpringSecurityFilter.doFilter (springsecurityfilter.java:53) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp ( httpsessioncontextintegrationfilter.java:235) [Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.SpringSecurityFilter.doFilter (springsecurityfilter.java:53) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.concurrent.ConcurrentSessionFilter.doFilterHttp (concurrentsessionfilter.java:99 ) [Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.ui.SpringSecurityFilter.doFilter (springsecurityfilter.java:53) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.filterchainproxy$virtualfilterchain.dofilter (FilterChainProxy.java:390) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.security.util.FilterChainProxy.doFilter (filterchainproxy.java:175) [ Spring-security-core-2.0.5.jar:na]
At Org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate (delegatingfilterproxy.java:236) [ SPRING.JAR:2.5.6.SEC01]
At Org.springframework.web.filter.DelegatingFilterProxy.doFilter (delegatingfilterproxy.java:167) [Spring.jar : 2.5.6.SEC01]
At Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:235) [ CATALINA.JAR:6.0.45]
At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:206) [Catalina.jar : 6.0.45]
At Com.metinform.modules.web.struts.AntiSqlInjectionfilter.doFilter (antisqlinjectionfilter.java:54) [ AntiSqlInjectionfilter.class:na]
At Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:235) [ CATALINA.JAR:6.0.45]
At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:206) [Catalina.jar : 6.0.45]
At Org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal (characterencodingfilter.java:96) [ SPRING.JAR:2.5.6.SEC01]
At Org.springframework.web.filter.OncePerRequestFilter.doFilter (onceperrequestfilter.java:76) [spring.jar:2.5.6. SEC01]
At Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:235) [ CATALINA.JAR:6.0.45]
At Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:206) [Catalina.jar : 6.0.45]
At Org.apache.catalina.core.StandardWrapperValve.invoke (standardwrappervalve.java:233) [catalina.jar:6.0.45]
At Org.apache.catalina.core.StandardContextValve.invoke (standardcontextvalve.java:191) [catalina.jar:6.0.45]
At Org.apache.catalina.core.StandardHostValve.invoke (standardhostvalve.java:127) [catalina.jar:6.0.45]
At Org.apache.catalina.valves.ErrorReportValve.invoke (errorreportvalve.java:103) [catalina.jar:6.0.45]
At Org.apache.catalina.core.StandardEngineValve.invoke (standardenginevalve.java:109) [catalina.jar:6.0.45]
At Org.apache.catalina.connector.CoyoteAdapter.service (coyoteadapter.java:293) [catalina.jar:6.0.45]
At Org.apache.coyote.http11.Http11AprProcessor.process (http11aprprocessor.java:879) [tomcat-coyote.jar:6.0.45]
At Org.apache.coyote.http11.http11aprprotocol$http11connectionhandler.process (http11aprprotocol.java:610) [ TOMCAT-COYOTE.JAR:6.0.45]
At Org.apache.tomcat.util.net.aprendpoint$worker.run (aprendpoint.java:1777) [tomcat-coyote.jar:6.0.45]
At Java.lang.Thread.run (thread.java:619) [Na:1.6.0_12]
caused by:org.hibernate.exception.SQLGrammarException:could not execute query
At Org.hibernate.exception.SQLStateConverter.convert (sqlstateconverter.java:90) [Hibernate3.jar:na]
At Org.hibernate.exception.JDBCExceptionHelper.convert (jdbcexceptionhelper.java:66) [Hibernate3.jar:na]
At Org.hibernate.loader.Loader.doList (loader.java:2235) [Hibernate3.jar:na]
At Org.hibernate.loader.Loader.listIgnoreQueryCache (loader.java:2129) [Hibernate3.jar:na]
At Org.hibernate.loader.Loader.list (loader.java:2124) [Hibernate3.jar:na]
At Org.hibernate.loader.criteria.CriteriaLoader.list (criterialoader.java:118) [Hibernate3.jar:na]
At Org.hibernate.impl.SessionImpl.list (sessionimpl.java:1597) [Hibernate3.jar:na]
At Org.hibernate.impl.CriteriaImpl.list (criteriaimpl.java:306) [Hibernate3.jar:na]
At Com.metinform.modules.orm.hibernate.basedao$6.doinhibernate (basedao.java:212) [BaseDAO$6.class:na]
At Org.springframework.orm.hibernate3.HibernateTemplate.doExecute (hibernatetemplate.java:419) [spring.jar:2.5.6. SEC01]
... Common frames omitted
Caused by:com.microsoft.sqlserver.jdbc.SQLServerException: Column name ' userstr4date ' is not valid.
At Com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError (sqlserverexception.java:196) [ Sqljdbc4.jar:na]
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult (sqlserverstatement.java:1454) [Sqljdbc4.jar:na]
At Com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement ( sqlserverpreparedstatement.java:388) [Sqljdbc4.jar:na]
At Com.microsoft.sqlserver.jdbc.sqlserverpreparedstatement$prepstmtexeccmd.doexecute ( sqlserverpreparedstatement.java:338) [Sqljdbc4.jar:na]
At Com.microsoft.sqlserver.jdbc.TDSCommand.execute (iobuffer.java:4026) [Sqljdbc4.jar:na]
At Com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand (sqlserverconnection.java:1416) [Sqljdbc4.jar: Na
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand (sqlserverstatement.java:185) [Sqljdbc4.jar:na]
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement (sqlserverstatement.java:160) [Sqljdbc4.jar: Na
At Com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery (sqlserverpreparedstatement.java:281) [ Sqljdbc4.jar:na]
At Org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery (delegatingpreparedstatement.java:96) [ TOMCAT-DBCP.JAR:6.0.45]
At Org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery (delegatingpreparedstatement.java:96) [ TOMCAT-DBCP.JAR:6.0.45]
At Org.hibernate.jdbc.AbstractBatcher.getResultSet (abstractbatcher.java:208) [Hibernate3.jar:na]
At Org.hibernate.loader.Loader.getResultSet (loader.java:1812) [Hibernate3.jar:na]
At Org.hibernate.loader.Loader.doQuery (loader.java:697) [Hibernate3.jar:na]
At Org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections (loader.java:259) [Hibernate3.jar:na]
At Org.hibernate.loader.Loader.doList (loader.java:2232) [Hibernate3.jar:na]
... 106 Common Frames omitted
Org.springframework.dao.InvalidDataAccessResourceUsageException:could not execute query; Nested exception is org.hibernate.exception.SQLGrammarException:could not execute query
Reason:
The solution to this problem is simple, mainly because there are no related tables or columns in the database.
Org.springframework.dao.InvalidDataAccessResourceUsageException:could not execute query; Nested exception is