spring - Intellij JPA Console with persistence.xml -


i'm setting xml-free persistence jpa/hibernate 4+/spring 3+ using intellij 13+. when try execute query in jpa console, following error:

javax.persistence.persistenceexception: unable build entity manager factory java.lang.runtimeexception: org.hibernate.boot.registry.selector.spi.strategyselectionexception: unable resolve name [org.hibernate.dialect.postgresql9dialectt.postgresql9dialect] strategy [org.hibernate.dialect.dialect] 

with default postgres dialect, same error. idea what's going on?

configuration extract:

<bean id="entitymanagerfactory"       class="org.springframework.orm.jpa.localcontainerentitymanagerfactorybean">     <property name="datasource" ref="datasource" />     <property name="packagestoscan" value="com.wikiz.service.model.rep" />     <property name="jpavendoradapter">         <bean class="org.springframework.orm.jpa.vendor.hibernatejpavendoradapter" />     </property>     <property name="jpaproperties">         <props>             <prop key="hibernate.dialect">${hibernate.dialect}</prop>             <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>             <prop key="hibernate.format_sql">${hibernate.format_sql}</prop>             <prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>             <prop key="jadira.usertype.autoregisterusertypes">true</prop>             <prop key="hibernate.ejb.naming_strategy">org.hibernate.cfg.improvednamingstrategy</prop>         </props>     </property> </bean>  <bean id="datasource" class="org.springframework.jdbc.datasource.drivermanagerdatasource">     <property name="driverclassname" value="${db.driver}"/>     <property name="url" value="${db.url}"/>     <property name="username" value="${db.user}"/>     <property name="password" value="${db.pass}"/> </bean> 

and variables:

hibernate.dialect=org.hibernate.dialect.postgresql9dialect hibernate.show_sql=true hibernate.format_sql=true hibernate.hbm2ddl.auto=create 

ok here is. not 100% sure if helps case think need do: add jdbc connection database database tab (usually right) add jdbc connection database


add hibernate facet module go modules (alt+ctrl+shift+s) add it: enter image description here
have enabled persistance tab on left (usually) , can assign datasource

now add hibernate configuration have add xml file of hibernate. haven't tried adding spring application context instead of hibernate.cfg.xml. maybe work...
enter image description here


have enable presistance configuration intellij , can assign datasource it.
enter image description here
select datasource want , able use jpa console jpa pojos , hsqls
enter image description here


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -