问题如下:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myAuthorizationFilter' defined in file [D:\Tomcat 6.0\webapps\spring_security\WEB-INF\classes\applicationContext-security.xml]: Cannot  Could not instantiate bean class [com.huaxin.security.MySecurityMetadataSource]: Constructor threw exception; nested exception is org.springframework.dao.I
by: org.hibernate.exception.SQLGrammarException: could not execute query
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query

解决方案 »

  1.   

    我感觉不是applicationContext-.xml 找不到缺什么包吗 ,查了好几个小时, 求指点
    在这下的例子
    http://blog.csdn.net/k10509806/article/details/6369131跑不通
      

  2.   

    'com.huaxin.security.MySecurityMetadataSource#1acdd78' defined in file [D:\apache-tomcat-7.0.37\webapps\spring_security\WEB-INF\classes\applicationContext-security.xml]: 
        <!-- 认证过滤器 -->
        <beans:bean id="securityFilter" class="com.huaxin.security.MySecurityFilter">
         <!-- 用户拥有的权限 -->
         <beans:property name="authenticationManager" ref="myAuthenticationManager" />
         <!-- 用户是否拥有所请求资源的权限 -->
         <beans:property name="accessDecisionManager" ref="myAccessDecisionManager" />
         <!-- 资源与权限对应关系 -->
         <beans:property name="securityMetadataSource" ref="mySecurityMetadataSource" />
        </beans:bean>
        <!-- 实现了UserDetailsService的Bean -->就是这里对应的东西全部找不到