incubator-hise-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "P.N." <peter.nabbef...@gmx.de>
Subject Is there a conflict in hise-ds.xml?
Date Tue, 12 Jul 2011 06:52:57 GMT
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


Mime
View raw message