我有一些Spring上下文配置
<bean name="propertyConfigurator" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:/com/net/model/jdbc.properties"/>
</bean>
....
<bean id="sessionFactoryToBillingDb" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
....jdbc.properties看起来就像
...
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
...我想使用Inellij中的HQL控制台,但是得到错误:
java.lang.RuntimeException: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.dialect.MySQLDialectt.MySQLDialect] as strategy [org.hibernate.dialect.Dialect]org.hibernate.dialect.MySQLDialectt.MySQLDialect怎么了?
发布于 2015-12-27 07:00:41
您添加了一个额外的t。错误消息就是这样写的:
无法解析名称org.hibernate.dialect.MySQLDialectt.MySQLDialect
发布于 2014-07-03 12:18:41
很可能,该属性的值(org.hibernate.dialect.MySQLDialectt.MySQLDialect)与您猜测的值(org.hibernate.dialect.MySQL5Dialect)不同。所以某些东西必须改变这个值,而这个东西不在你展示给我们的项目中。
我从我们对问题的评论中了解到这一点:
你应该尝试的事情:
${hibernate.dialect}。这样做的最简单方法是在错误的位置使用参数(例如,url属于或类似的地方)。这将导致您在那里看到错误消息,并且可以确定该变量的实际值是什么。https://stackoverflow.com/questions/24549161
复制相似问题