org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select this_.resCode as resCode15_3_, this_.createTime as createTime15_3_, this_.creator as creator15_3_, this_.description as descript4_15_3_, this_.lastUpdateTime as lastUpda5_15_3_, this_.lastUpdater as lastUpda6_15_3_, this_.optimisticLock as optimist7_15_3_, this_.re as re15_3_, this_.resIcon as resIcon15_3_, this_.resName as resName15_3_, this_.resUrl as resUrl15_3_, this_.sequence as sequence15_3_, this_1_.parentFunctionNo as parentFu2_16_3_, this_2_.functionNo as functionNo17_3_, case when this_1_.resCode is not null then 1 when this_2_.resCode is not null then 2 when this_.resCode is not null then 0 end as clazz_3_, roles2_.resources_resCode as resources2_5_, role3_.roleCode as roles1_5_, role3_.roleCode as roleCode13_0_, role3_.createTime as createTime13_0_, role3_.creator as creator13_0_, role3_.description as descript4_13_0_, role3_.lastUpdateTime as lastUpda5_13_0_, role3_.lastUpdater as lastUpda6_13_0_, role3_.optimisticLock as optimist7_13_0_, role3_.re as re13_0_, role3_.roleName as roleName13_0_, function4_.resCode as resCode15_1_, function4_1_.createTime as createTime15_1_, function4_1_.creator as creator15_1_, function4_1_.description as descript4_15_1_, function4_1_.lastUpdateTime as lastUpda5_15_1_, function4_1_.lastUpdater as lastUpda6_15_1_, function4_1_.optimisticLock as optimist7_15_1_, function4_1_.re as re15_1_, function4_1_.resIcon as resIcon15_1_, function4_1_.resName as resName15_1_, function4_1_.resUrl as resUrl15_1_, function4_1_.sequence as sequence15_1_, function4_.parentFunctionNo as parentFu2_16_1_, function5_.resCode as resCode15_2_, function5_1_.createTime as createTime15_2_, function5_1_.creator as creator15_2_, function5_1_.description as descript4_15_2_, function5_1_.lastUpdateTime as lastUpda5_15_2_, function5_1_.lastUpdater as lastUpda6_15_2_, function5_1_.optimisticLock as optimist7_15_2_, function5_1_.re as re15_2_, function5_1_.resIcon as resIcon15_2_, function5_1_.resName as resName15_2_, function5_1_.resUrl as resUrl15_2_, function5_1_.sequence as sequence15_2_, function5_.parentFunctionNo as parentFu2_16_2_ from Resource this_ left outer join Function this_1_ on this_.resCode=this_1_.resCode left outer join Operation this_2_ on this_.resCode=this_2_.resCode left outer join Role_Resource roles2_ on this_.resCode=roles2_.resources_resCode left outer join Role role3_ on roles2_.roles_roleCode=role3_.roleCode left outer join Function function4_ on this_1_.parentFunctionNo=function4_.resCode left outer join Resource function4_1_ on function4_.resCode=function4_1_.resCode left outer join Function function5_ on this_2_.functionNo=function5_.resCode left outer join Resource function5_1_ on function5_.resCode=function5_1_.resCode where this_.resUrl=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:150)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
root cause org.hibernate.exception.SQLGrammarException: could not execute query
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
org.hibernate.loader.Loader.doList(Loader.java:2235)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
org.hibernate.loader.Loader.list(Loader.java:2124)
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:117)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1532)
org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
org.springframework.orm.hibernate3.HibernateTemplate$36.doInHibernate(HibernateTemplate.java:1056)
org.springframework.orm.hibernate3.HibernateTemplate$36.doInHibernate(HibernateTemplate.java:1)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:1046)
org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:1039)
com.sinba.common.dao.BaseDAOImplHibernate.findUniqueBy(BaseDAOImplHibernate.java:297)
com.sinba.common.security.service.ResourceSecurityMetaDataSource.getAttributes(ResourceSecurityMetaDataSource.java:49)
org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:172)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:98)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:95)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
Proxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:150)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
root cause com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student11.resource' doesn't exist
sun.reflect.GeneratedConstructorAccessor34.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
com.mysql.jdbc.Util.getInstance(Util.java:381)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885)
org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
org.hibernate.loader.Loader.getResultSet(Loader.java:1810)
org.hibernate.loader.Loader.doQuery(Loader.java:695)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:257)
org.hibernate.loader.Loader.doList(Loader.java:2232)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
org.hibernate.loader.Loader.list(Loader.java:2124)
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:117)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1532)
org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
org.springframework.orm.hibernate3.HibernateTemplate$36.doInHibernate(HibernateTemplate.java:1056)
org.springframework.orm.hibernate3.HibernateTemplate$36.doInHibernate(HibernateTemplate.java:1)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:1046)
org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:1039)
com.sinba.common.dao.BaseDAOImplHibernate.findUniqueBy(BaseDAOImplHibernate.java:297)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:150)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

解决方案 »

  1.   

    Table 'student11.resource' doesn't exist
    数据库表不存在啊
      

  2.   

    show_sql
    放数据库看能不能执行
      

  3.   

    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student11.resource' doesn't exist
    主要是看这行,表不存在
      

  4.   

    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student11.resource' doesn't exist
    SQL语句写得有问题
      

  5.   

    root cause  com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student11.resource' doesn't exist查询的表不存在 query  肯定是不可以进行查询的  show_sql = true 脚本 放到数据库里面执行 ok问题  方可解决 如有问题 直接 联系 哈 [email protected] or 464690335  come on !
      

  6.   

     检查你那句 黑长的 sql!拿到数据库上跑,莫得问题再放上去!
      

  7.   

    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student11.resource' doesn't exist
    主要是看这行,表不存在
      

  8.   

    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student11.resource' doesn't exist 看着了的错误
      

  9.   

    sql的问题 看错误不是全看的