incubator-hise-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbs <...@touk.pl>
Subject Re: Is there a conflict in hise-ds.xml?
Date Thu, 14 Jul 2011 09:15:43 GMT
If you write exactly what you do - every steps, maybe I manage to 
reconstruct the error and then try to help.

Best regards
Pawel
_________
touk.pl


On 07/14/2011 11:07 AM, P.N. wrote:
> Thank You for Your reply!
> Will have to investigate the problem further :-(
>
> Kind regards
> Peter

> pbs schrieb:
>>
>> It is some kind of oversight that there is:
>>
>> <property name="database" value="ORACLE"/>
>>
>> of course for H2 there should be:
>>
>> <property name="database" value="H2"/>
>> <property name="databasePlatform"
>> value="org.apache.openjpa.jdbc.sql.H2Dictionary"/>
>>
>> However that should not cause problem with connection to database. When
>> bean would not have set property 'databasePlatform' then on the basis of
>> property 'database' is set 'databasePlatform'. But when
>> 'databasePlatform' is set in bean definition then wrong name in
>> 'database' should not spoil anything.
>> I have tested settings:
>>
>> <property name="database" value="ORACLE"/>
>> <property name="databasePlatform"
>> value="org.apache.openjpa.jdbc.sql.H2Dictionary"/>
>>
>> and it works fine.
>>
>> Best regards
>> Pawel
>> _________
>> touk.pl
>>
>>> 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