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 10:06:38 GMT
hmmm...

I think that the problem may be  that there is no specified persistence
provider in persistence.xml in hise-services.jar. The default for jonas
is hibernate...

http://wiki.jonas.ow2.org/xwiki/bin/view/News/JOnAS_5_2_0_M2
- here there is note how to add openjpa as persistnce provider (in
jonas.properties)

If that does not help, please try to add line
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
in file META-INF/persistence.xml in hise-services.jar (it's in
WEB-INF/lib directory of hise war) 

hope this helps, if not we'll investigate further - but have to download
jonas first ;)

br,
maciek 



On Thu, 2011-07-14 at 11:36 +0200, P.N. wrote:
> Thank You for Your reply!
> I'm using JONAS 5, up to now only added JspWiki and now tried to add 
> Hise. Only when I try to deploy Hise, the hibernate exception is thrown, 
> so it must have sth. to do with this deployment.
> 
> However, I'm new to JEE (just wanted to use Hise as a demo, as I'm also 
> interested in the possibilities of WS-HUMAN; the easiest way to learn is 
> to see sth. working.), so I cannot (yet) analyse the problem.
> 
> Kind regards
> Peter
> 
> 
> 
> Maciek Próchniak schrieb:
> >
> > 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