Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] MySQL and Grouper

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] MySQL and Grouper


Chronological Thread 
  • From: "caleb racey" <>
  • To: "blair christensen." <>
  • Cc: "Michael R. Gettes" <>, "Grouper-Users" <>
  • Subject: RE: [grouper-users] MySQL and Grouper
  • Date: Wed, 10 Oct 2007 15:42:33 +0100

I have had a go at building from head and configuring mysql5 dialect so
I can test the support and performance

Unfortunately I can't get an ant schemaexport to run.

I set the grouper.hibernate.properties to have the following

hibernate.dialect = org.hibernate.dialect.MySQL5Dialect

when I run ant schema export I get the error

schemaexport:
[java] Could not instantiate dialect class


I get the same error no matter which hibernate3 dialect I try (oracle
HSQL etc). I get "class not found exceptions" if I put in garbage for
the dialect value suggesting ant can find the hibernate3 classes when
configured sensibly. The hibernate-3 jar is present in the lib dir and
shouldn't conflict with the hibernate2 jar that is there as they have
different packaging names (net.hibernate... becomes org.hibernate...)

The schemexport log is not very helpful just throwing ant errors.

The problems go away if I use the old hibernate.dialect =
net.sf.hibernate.dialect.MySQLDialect setting.

I suspect there are more config settings to tell ant to use the new
hibernate as if I change the Ehcache setting to

hibernate.cache.provider_class =
org.hibernate.cache.EhCacheProvider

I get lots of casting errors between the two hibernate versions e.g.


[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at
edu.internet2.middleware.grouper.internal.dao.hibernate.HibernateDAO.<cl
init>(HibernateDAO.java:69)
[java] at
edu.internet2.middleware.grouper.internal.dao.hibernate.HibernateRegistr
yDAO.initializeSchema(HibernateRegistryDAO.java:47)
[java] at
edu.internet2.middleware.grouper.RegistryInitializeSchema.main(RegistryI
nitializeSchema.java:38)
[java] Caused by: net.sf.hibernate.HibernateException: could not
instantiate CacheProvider: org.hibernate.cache.EhCacheProvider
[java] at
net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
145)
[java] at
net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1172
)
[java] at
net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
a:803)
[java] at
edu.internet2.middleware.grouper.internal.dao.hibernate.HibernateDAO.<cl
init>(HibernateDAO.java:64)
[java] ... 2 more
[java] Caused by: java.lang.ClassCastException:
org.hibernate.cache.EhCacheProvider
[java] at
net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
142)
[java] ... 5 more


Anyone got any pointer on how to use the hibernate3 support?








>-----Original Message-----
>From:
>
>
>[mailto:]
On
>Behalf Of blair christensen.
>Sent: 03 October 2007 03:21
>To: caleb racey
>Cc: Michael R. Gettes; Grouper-Users
>Subject: Re: [grouper-users] MySQL and Grouper
>
>On 9/15/07, caleb racey
><>
> wrote:
>> it mostly works with the exception that the table
"grouper_attributes"
>doesn't get created becuase hibernate tries to create something mysql5
is
>not happy with. The long term solution would be an upgrade to the
latest
>hibernate which has a mysql5 dialect, but that would be non trivial.
>
>I added preliminary support for Hibernate3 to Grouper HEAD about a
>month ago. As I was crunched for time I did the bare minimum
>amount of work needed to convert the existing Hibernate2 support to
>work with Hibernate3. As such, it is far from optimal, initial
>performance testing was less than inspiring and there had been very
>little testing. GRP-32 has a few *sparse* details.
>
>If anyone is using Grouper's Hibernate3 code I'd be curious about your
>experiences and bug reports.



Archive powered by MHonArc 2.6.16.

Top of Page