incubator-hise-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maciek Próchniak <...@touk.pl>
Subject Re: Is there a conflict in hise-ds.xml?
Date Thu, 14 Jul 2011 09:25:58 GMT

Hello Peter,
 
your stacktrace comes from Hibernate & EJB3 - Hise uses neither, 
so I'd assume that the problem comes from some other part of your app?
(I think it's usually better to actually set hibernate dialect on
session configuration...)

br, 
maciek


On Tue, 2011-07-12 at 08:52 +0200, P.N. wrote:
> Hello!
> 
> I've got the following entries in hise-ds.xml:
> 
>      <!-- OpenJPA H2 Driver -->
>      <bean id="jpaVendorAdapter" 
> class="org.apache.hise.dao.vendor.OpenJpaVendorAdapter">
>          <property name="database" value="ORACLE"/>
>          <property name="databasePlatform" 
> value="org.apache.openjpa.jdbc.sql.H2Dictionary"/>
>          <property name="generateDdl"    value="true" />
>          <property name="showSql"      value="false" />
>          <property name="extProperties">
>              <util:map>
>                  <entry key="openjpa.jdbc.SynchronizeMappings" 
> value="buildSchema(ForeignKeys=true,SchemaAction='add')"/>
>              </util:map>
>          </property>
>      </bean>
> 
> 
>      <bean id="dataSource" 
> class="org.springframework.jdbc.datasource.SingleConnectionDataSource" 
> lazy-init="true">
>          <property name="driverClassName" value="org.h2.Driver" />
>          <property name="url" value="jdbc:h2:tcp://localhost/~/test"/>
>          <property name="username" value="sa" />
>          <property name="password">
>              <value></value>
>          </property>
>          <property name="autoCommit" value="false" />
>          <property name="suppressClose" value="true" />
>      </bean>
> 
> As hise should use H2 database (and most of the above is using H2), I'm 
> just confusing about <property name="database" value="ORACLE"/> - is it 
> just providing a name, or it it providing a database type (which might 
> be causing my hibernate problems)?
> 
>  From my stacktrace:
> 
>      ...
> Caused by: org.hibernate.HibernateException: 'hibernate.dialect' must be 
> set when no Connection avalable
> 	at 
> org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:107)
> 	at 
> org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:138)
> 	at 
> org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
> 	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
> 	at 
> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
> 	at 
> org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
> 	at 
> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
> 	... 20 more
> 
> According to some googling, this may be caused by problems with DB 
> connection.
> 
> Kind regards
> Peter
> 

-- 
Maciek Próchniak 
TouK sp. z o.o. s.k.a.
 02-389 Warszawa, al. Bohaterów Września 9
 e-mail: mpr@touk.pl
 tel: 609617360
 http://touk.pl


Mime
View raw message